Skip to content

Commit 8773c89

Browse files
committed
Fix - use proper formatting for entries and integral (#179)
If statistical values not a round value - use float representation
1 parent 8e144d0 commit 8773c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/JSRootPainter.hist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@
970970
switch(fmt) {
971971
case "stat" : fmt = pave.fStatFormat || JSROOT.gStyle.fStatFormat; break;
972972
case "fit": fmt = pave.fFitFormat || JSROOT.gStyle.fFitFormat; break;
973-
case "entries": if (value < 1e9) return value.toFixed(0); fmt = "14.7g"; break;
973+
case "entries": if ((Math.abs(value) < 1e9) && (Math.round(value) == value)) return value.toFixed(0); fmt = "14.7g"; break;
974974
case "last": fmt = this.lastformat; break;
975975
}
976976

0 commit comments

Comments
 (0)