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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I had the same problem as you. I found this:
ChartPanel.getChart().getXYPlot().getRangeAxis().setInverted(boolean)
回答2:
to reverse the Y-axis ... you can use
ChartPanel.getChart().getXYPlot().getDomainAxis().setInverted(boolean)
Source: Reverse X-axis numeric labels in JFreeChart