JFreeChart how to draw ordered lines

独自空忆成欢 提交于 2020-01-15 05:30:46

问题


I am currently using JFreeChart scatter graph to display a number of points. When I use the scatter graph to draw lines it draws them in the wrong order for example: the ordered list (2,3),(2,5),(3,4) is the desired order to be printed. JFreeChart takes this and draws the line in this order (2,5),(2,3),(3,4). Is there an alternative chart type I could use that could display this differently or is there a way I can override their default ordering system? Thanks.


回答1:


An XYSeries is typically used to create a scatter plot's data set. It includes constructors that exert control over the sorting. There's a related example here.




回答2:


create XYSeries with autoSort flag set to false



来源:https://stackoverflow.com/questions/8250355/jfreechart-how-to-draw-ordered-lines

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