Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093103

[Axis] Y-Axis can not handle big values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u40
    • 8u20
    • javafx
    • Windows 7 64bit, JDK 8u20 Build b23

      If the Y-Value is greater than or equal to 73529411764706d the chart does not show the content.
      If 73529411764705d is the Y-Value everything works fine. (I did not investigate the digits).


      import javafx.application.Application;
      import javafx.collections.FXCollections;
      import javafx.scene.Scene;
      import javafx.scene.chart.LineChart;
      import javafx.scene.chart.NumberAxis;
      import javafx.scene.chart.XYChart.Data;
      import javafx.scene.chart.XYChart.Series;
      import javafx.stage.Stage;

      public class Test extends Application {

      @SuppressWarnings("unchecked")
      @Override
      public void start(Stage stage) throws Exception {

      Series<Number, Number> series = new Series<>();
      series.getData().add(new Data<>(1, 73529411764706d));
      // If you use 73529411764705d is works
      // (I did not investigate the digits)

      LineChart<Number, Number> lineChart = new LineChart<Number, Number>(new NumberAxis(), new NumberAxis(), FXCollections.observableArrayList(series));
      stage.setScene(new Scene(lineChart));
      stage.show();
      }

      public static void main(String[] args) {
      launch(args);
      }

      }

            msladecek Martin Sládeček
            aliebelt Andreas Liebelt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: