Skip to content

Commit

Permalink
Stop limiting getDecimalForPixel to chart area (#6608)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle authored and etimberg committed Oct 27, 2019
1 parent 29de4af commit 11883aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/core.scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ var Scale = Element.extend({

getDecimalForPixel: function(pixel) {
var decimal = (pixel - this._startPixel) / this._length;
return Math.min(1, Math.max(0, this._reversePixels ? 1 - decimal : decimal));
return this._reversePixels ? 1 - decimal : decimal;
},

/**
Expand Down

0 comments on commit 11883aa

Please sign in to comment.