changeset 7734:adba413b52d3

RT-38285 [Axis] Y-Axis can not handle big values (cont.): follow-up fix
author Martin Sladecek <martin.sladecek@oracle.com>
date Wed, 20 Aug 2014 15:21:06 +0200
parents 9130fc16c129
children 798a93a61616
files modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Wed Aug 20 15:03:27 2014 +0200
+++ b/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Wed Aug 20 15:21:06 2014 +0200
@@ -392,7 +392,7 @@
             } else {
                 final StringBuilder formatterB = new StringBuilder("0.");
                 final boolean ratioHasFrac = Math.rint(ratio) != ratio;
-                for (int i = 0, n = (ratioHasFrac ? exp + 1 : exp); i < n; ++i) {
+                for (int i = 0, n = (ratioHasFrac ? Math.abs(exp) + 1 : Math.abs(exp)); i < n; ++i) {
                     formatterB.append("0");
                 }
                 formatter = formatterB.toString();