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();
}
}
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();
}
}