Search code examples
axisjfreechartreverse

JFreeChart - how to reverse axis order


I'm creating XYPlot and I need to reverse the order on y-Axis (that is, I need lower numbers to be higher on the axis). I would appreciate any hints how to do that.


Solution

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

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