Skip to content

Commit 03f1a0b

Browse files
committed
Fix - use Math.floor when search for bin label
1 parent 2a3c645 commit 03f1a0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/JSRootPainter.v6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
var indx = parseFloat(d);
181181
if (!this.regular_labels)
182182
indx = (indx - this.axis.fXmin)/(this.axis.fXmax - this.axis.fXmin) * this.axis.fNbins;
183-
indx = Math.round(indx);
183+
indx = Math.floor(indx);
184184
if ((indx<0) || (indx>=this.axis.fNbins)) return null;
185185
for (var i = 0; i < this.axis.fLabels.arr.length; ++i) {
186186
var tstr = this.axis.fLabels.arr[i];

0 commit comments

Comments
 (0)