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

[XYChart] when labels rotated, free space is estimated icorrectly, when decision about label hiding is done.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:
    • Environment:

      8.0b83

      Description

      Look at the attached movie.

      I change height, and label "blue" disappears, but there is still enough place for its allocation

      Code:

          @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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: