I have small project which makes a graph plot of a data in database. One record in DB is like this:
ID, Name, Xcoord, Ycoord
For example, I've added 10 points coordinates of which is more or less like this:
1st(1:1) 2nd(2:2) 3rd(3:3) 4th(4:4) ... 10th(10:10);
After that I want to add one more point 11th(5,7:5,7)
, and 10th must connect with 11th. So line must go leftwards. Now XYPlot
sorts my XYDataset
and 11th point gets plotted in between of 5th and 6th Points, and I don't want that.
Can anyone help?
UPDATE : As correctly supposed by mr.Trashgod i was using org.jfree.data.xy.XYSeries(), and setting autosort flag to false lead to correct plotting.
XYDataset
are you using? – Leverrier