JFreeChart - how to change the axis order

I am creating an XYPlot, and I need to change the order to y-Axis (i.e. I need lower digits to be higher on the axis). I would appreciate any tips on how to do this.

+6
source share
2 answers

I had the same problem as you. I found this:

ChartPanel.getChart().getXYPlot().getRangeAxis().setInverted(boolean) 
+10
source

to cancel the y axis ... you can use

 ChartPanel.getChart().getXYPlot().getDomainAxis().setInverted(boolean) 

Source: X-axis inverse numeric labels in JFreeChart

0
source

Source: https://habr.com/ru/post/900550/


All Articles