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

XYChart: axis cannot be hidden

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u10
    • javafx
    • Win64

      Axis.visible is not considered for XYCharts. Making an axis invisible does not hide it - there seems to be no effect. I'd like to hide the x-axis on a small chart to get more vertical space for the content. This chart is used similar to a CPU load linechart.

      public class ChartAxisVisibleTest extends Application
      {
        public static void main(String[] args)
        {
          Application.launch(args);
        }

        @Override
        public void start(Stage primaryStage) throws Exception
        {
          NumberAxis xAxis = new NumberAxis(0, 50, 1);
          xAxis.setVisible(false);
          
          LineChart<Number, Number> chart = new LineChart<Number, Number>(xAxis, new NumberAxis());
          chart.setLegendVisible(false);
          
          primaryStage.setScene(new Scene(chart));
          primaryStage.show();
        }
      }

            Unassigned Unassigned
            wlehmann Werner Lehmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: