Skip to content

Commit 88d61b7

Browse files
committed
Fix v7 hist drawing when bins are too small
1 parent 1499f60 commit 88d61b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/JSRootPainter.v7hist.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,9 +2286,10 @@
22862286
currx[colindx] = handle.grx[i];
22872287
curry[colindx] = handle.gry[j+dj];
22882288

2289-
colPaths[colindx] += "v" + (handle.gry[j] - handle.gry[j+dj]) +
2290-
"h" + (handle.grx[i+di] - handle.grx[i]) +
2291-
"v" + (handle.gry[j+dj] - handle.gry[j]) + "z";
2289+
var dy = (handle.gry[j] - handle.gry[j+dj]) || 1,
2290+
dx = (handle.grx[i+di] - handle.grx[i]) || 1;
2291+
2292+
colPaths[colindx] += "v"+dy + "h"+dx + "v"+(-dy) + "z";
22922293
}
22932294
}
22942295

0 commit comments

Comments
 (0)