mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-09 09:46:51 +01:00
Fix bumpy line on smooth data set (#4944)
Linear scale getPixelForValue() method doesn't round the returned value anymore.
This commit is contained in:
committed by
Simon Brunel
parent
447ca40a7f
commit
e080e782ab
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user