XYSeries source code

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Allyson Gwin

XYSeries source code

Post by Allyson Gwin » Mon Feb 10, 2003 4:54 pm

I need to modify the source code of the XYSeries and XYSeriesCollection so that it does not sort. Does anyone know where I would find this? I have jfreechart 0.9.4 and have the .jar files, but I only see the .class files in there. Any help would be greatly appreciated. Thanks.

Allyson

David Gilbert

Re: XYSeries source code

Post by David Gilbert » Tue Feb 11, 2003 10:25 am

Hi Allyson,

In the distribution, there is a 'src' directory in which you will find all the source code for JFreeChart.

Regards,

Dave Gilbert

Allyson Gwin

Re: XYSeries source code

Post by Allyson Gwin » Thu Feb 20, 2003 11:45 pm

Anyone know where the sorting is in the source code? I found the code (XYSeries.java), but I don't see anywhere that it is sorted. Can someone please give me a hint? Thanks.

Allyson

P.S. I think I need the same thing for the XYSeriesCollection, too. Thanks.

Allyson

Eduardo Ramalho

Re: XYSeries source code

Post by Eduardo Ramalho » Fri Feb 21, 2003 1:05 pm

Look at the line 139 of XYSeries.java.
It returns the index where the "pair" object is going to be inserted in the already sorted "data" list.

// make the change (if it's not a duplicate time period)...
int index = Collections.binarySearch(data, pair);

Eduardo

Locked