JFreeChart - how to reverse axis order

China☆狼群 提交于 2019-12-01 16:06:29

问题


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



来源:https://stackoverflow.com/questions/7971264/jfreechart-how-to-reverse-axis-order

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!