This example demonstrates the basic steps in creating bar charts.
- Create an XYChart object using XYChart.XYChart.
- Specify the plot area of the chart using XYChart.setPlotArea. The plot area is the rectangle bounded by the x and y axes. You should leave some margin on the outside of the plot area for axis labels, chart titles, etc.
- Specify the labels on the x-axis using Axis.setLabels.
- Add a bar layer and specify the data for the bars using XYChart.addBarLayer.
- Generate the chart using BaseChart.makeChart.
- Generate tool tips for the chart using BaseChart.getHTMLImageMap.