Fix bumpy line on smooth data set (#4944)

Linear scale getPixelForValue() method doesn't round the returned value anymore.
This commit is contained in:
jcopperfield
2017-11-14 13:56:45 +01:00
committed by Simon Brunel
parent 447ca40a7f
commit e080e782ab
3 changed files with 6 additions and 7 deletions

View File

@@ -170,11 +170,10 @@ module.exports = function(Chart) {
if (me.isHorizontal()) {
pixel = me.left + (me.width / range * (rightValue - start));
return Math.round(pixel);
} else {
pixel = me.bottom - (me.height / range * (rightValue - start));
}
pixel = me.bottom - (me.height / range * (rightValue - start));
return Math.round(pixel);
return pixel;
},
getValueForPixel: function(pixel) {
var me = this;