Hi David,
To rotate the axis labels by 90 degrees, please use Axis.setLabelStyle. For example:
c.xAxis().setLabelStyle("Arial", 8, 0x000000, 90);
You can use XYChart.packPlotArea to adjust the plot area size so that all the labels are within the specified bounding box. For example:
c.packPlotArea(10, c.getPlotArea().getTopY(), c.getPlotArea().getRightX(), c.getHeight() - 10);
The packPlotArea needs to be called after you have entered all the data and configures everything (the font size, label format, etc) of the chart. For an example, see:
https://www.advsofteng.com/doc/cdnet.htm#markbar.htm
Hope this can help.
Regards
Peter Kwan |