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

setAlternativeColumnFillVisible and setAlternativeRowFillVisible do nothing

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 8
    • 8
    • javafx

      Methods setAlternativeColumnFillVisible and setAlternativeRowFillVisible do nothing.
      This seems to be a problem with Modena look (in at least Lombard b85 it produced some effect on chart appearance).

      To reproduce, use the following code:

      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.chart.BubbleChart;
      import javafx.scene.chart.NumberAxis;
      import javafx.scene.chart.XYChart;
      import javafx.stage.Stage;
       
      public class BubbleChartSample extends Application {
       
          private BubbleChart<Number, Number> chart = createChart();
          private NumberAxis xAxis;
          private NumberAxis yAxis;
       
          private BubbleChart<Number, Number> createChart() {
              xAxis = new NumberAxis();
              yAxis = new NumberAxis();
              final BubbleChart<Number, Number> bc = new BubbleChart<>(xAxis, yAxis);
              // setup chart
              bc.setTitle("Advanced BubbleChart");
              xAxis.setLabel("X Axis");
              yAxis.setLabel("Y Axis");
              // add starting data
              XYChart.Series<Number, Number> series1 = new XYChart.Series<>();
              series1.setName("Data Series 1");
              for (int i = 0; i < 20; i++) {
                  series1.getData().add(
                          new XYChart.Data<Number, Number>(Math.random() * 100, Math.random() * 100, (Math.random() * 10)));
              }
              XYChart.Series<Number, Number> series2 = new XYChart.Series<>();
              series2.setName("Data Series 2");
              for (int i = 0; i < 20; i++) {
                  series2.getData().add(
                          new XYChart.Data<Number, Number>(Math.random() * 100, Math.random() * 100, (Math.random() * 10)));
              }
              bc.getData().addAll(series1, series2);
              return bc;
          }
       
          public Parent createContent() {
              return chart;
          }
       
          @Override
          public void start(Stage primaryStage) throws Exception {
              System.out.println(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
              primaryStage.setScene(new Scene(createContent()));
              //chart.setAlternativeColumnFillVisible(true); // Should change chart appearance?
              //chart.setAlternativeRowFillVisible(true); // Should change chart appearance?
              primaryStage.show();
          }
       
          /**
           * Java main for when running without JavaFX launcher
           */
          public static void main(String[] args) {
              launch(args);
          }
      }

            psomashe Parvathi Somashekar (Inactive)
            ilatyshe Irina Grineva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: