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

[Chart] axis rotate can be lost.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8u20
    • 8
    • javafx
    • 8.0b83

    Description

      Look at the attached movie.

      I set

              x_axis.setTickLabelRotation(45);
              y_axis.setTickLabelRotation(45);

      But you can see, that I changed height of scene, and y_axis labels rotation changed from 45 degrees to 90 degrees.

      Code is here :

          @Override
          public void start(Stage stage) {
              VBox content = new VBox();
              Series s1 = new Series( FXCollections.observableArrayList(
                          new XYChart.Data("First", "Green"),
                          new XYChart.Data("Second", "Blue"),
                          new XYChart.Data("Fourth", "Red")
                      ));
              s1.setName("Set 1");
              Series s2 = new Series( FXCollections.observableArrayList(
                          new XYChart.Data("First", "Red"),
                          new XYChart.Data("Second", "Green"),
                          new XYChart.Data("Fourth", "Blue")
                      ));
              s2.setName("Set 2");
              Series s3 = new Series( FXCollections.observableArrayList(
                          new XYChart.Data("First", "Blue"),
                          new XYChart.Data("Second", "Red"),
                          new XYChart.Data("Third", "Green")
                      ));
              s3.setName("Set 3");
              ObservableList data = FXCollections.observableArrayList(s1, s2, s3);
              Axis y_axis = new CategoryAxis();
              Axis x_axis = new CategoryAxis(FXCollections.<String>observableArrayList("First", "Second", "Third", "Fourth"));
              Chart chart = new ScatterChart(x_axis, y_axis, data);
              content.getChildren().add(chart);
              stage.setScene(new Scene(content, 400, 400));
              stage.show();
              x_axis.setTickLabelRotation(45);
              y_axis.setTickLabelRotation(45);
          }

      Attachments

        Issue Links

          Activity

            People

              msladecek Martin Sládeček
              akirov Alexander Kirov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: