JFreeChart - how to reverse axis order

后端 未结 2 1535
情书的邮戳
情书的邮戳 2021-01-18 06:08

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.

相关标签:
2条回答
  • 2021-01-18 06:30

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

    ChartPanel.getChart().getXYPlot().getRangeAxis().setInverted(boolean)
    
    0 讨论(0)
  • 2021-01-18 06:36

    to reverse the Y-axis ... you can use

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

    Source: Reverse X-axis numeric labels in JFreeChart

    0 讨论(0)
提交回复
热议问题