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

Wrong chart scaling in ScatterChart if TickUnit set below 0.5

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u60
    • 8u40
    • javafx
    • Mac OS X 10.9.5

      Spacing between Y - Label and Y-Axis too big, if TickUnit in NumberAxis is set below 0.5 and Y-Axis normalized to 1.0.

      Example see below.

      This was working correctly in latest stable release (jdk1.8.0_31).

      Example code:

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.chart.NumberAxis;
      import javafx.scene.chart.ScatterChart;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;


      public class ScatterTest extends Application {
                  
          @Override
          public void start(Stage primaryStage) {
              StackPane root = new StackPane();
              
              NumberAxis xAxis = new NumberAxis("X-Axis", -1d, 1.0d, 0.1d);
              NumberAxis yAxis = new NumberAxis("Y-Axis", -1.0d, 1.0d, 0.1d);
              
              ScatterChart<Number, Number> scatterChart = new ScatterChart<>(xAxis,yAxis);
                                                   
              root.getChildren().add(scatterChart);
              
              Scene scene = new Scene(root, 500, 500);
              
              primaryStage.setScene(scene);
              primaryStage.show();
          }

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

            jgiles Jonathan Giles
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: