Java Code Examples for javafx.scene.chart.CategoryAxis#setSide()
The following examples show how to use
javafx.scene.chart.CategoryAxis#setSide() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LabeledHorizontalBarChart.java From MyBox with Apache License 2.0 | 6 votes |
public static LabeledHorizontalBarChart create(boolean displayCategoryAxis, ChartCoordinate chartCoordinate) { CategoryAxis categoryAxis = new CategoryAxis(); categoryAxis.setSide(Side.LEFT); categoryAxis.setTickLabelsVisible(displayCategoryAxis); categoryAxis.setGapStartAndEnd(true); NumberAxis numberAxis = new NumberAxis(); numberAxis.setSide(Side.TOP); switch (chartCoordinate) { case LogarithmicE: numberAxis.setTickLabelFormatter(new LogarithmicECoordinate()); break; case Logarithmic10: numberAxis.setTickLabelFormatter(new Logarithmic10Coordinate()); break; case SquareRoot: numberAxis.setTickLabelFormatter(new SquareRootCoordinate()); break; } return new LabeledHorizontalBarChart(numberAxis, categoryAxis) .setChartCoordinate(chartCoordinate); }
Example 2
Source File: LabeledBarChart.java From MyBox with Apache License 2.0 | 6 votes |
public static LabeledBarChart create(boolean displayCategoryAxis, ChartCoordinate chartCoordinate) { CategoryAxis categoryAxis = new CategoryAxis(); categoryAxis.setSide(Side.BOTTOM); categoryAxis.setTickLabelsVisible(displayCategoryAxis); categoryAxis.setGapStartAndEnd(true); NumberAxis numberAxis = new NumberAxis(); numberAxis.setSide(Side.LEFT); switch (chartCoordinate) { case LogarithmicE: numberAxis.setTickLabelFormatter(new LogarithmicECoordinate()); break; case Logarithmic10: numberAxis.setTickLabelFormatter(new Logarithmic10Coordinate()); break; case SquareRoot: numberAxis.setTickLabelFormatter(new SquareRootCoordinate()); break; } return new LabeledBarChart(categoryAxis, numberAxis) .setChartCoordinate(chartCoordinate); }