Timeseries chart display

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

Timeseries chart display

Post by Artemis » Sun Sep 15, 2002 3:53 am

Hi all,

I just want to ask what's the max data no. that the time series chart can display.
Should I modify the program to add buttons for backward and forward display ?
Which should I refer to ? (I intend to use the servlet)

Artemis

David Gilbert

Re: Timeseries chart display

Post by David Gilbert » Mon Sep 16, 2002 6:30 am

The maximum number of items? There's no limit.

Regards,

DG.

Mallesh

Re: Timeseries chart display

Post by Mallesh » Mon Feb 03, 2003 12:20 pm

Hi David,

The following code in a loop. It gets values from the html page, parse the data and setting the series paint. This works fine up to nine series addition.

XYPlot subplot = null;
IntervalXYDataset data1 = (IntervalXYDataset)
this.createDatasetLine(ii);
subplot = new XYPlot(data1, null, null, rendererBar);

try{
subplot.setSeriesPaint(plot.getSeriesCount(),
JFParamUtil.getColor( (String)
alstFSBg.get(ii)));

}catch(Exception exp){
System.out.println("Exeception fired : "+exp.toString());
}

On adding 10th series firing the following exception :
Exeception fired : java.lang.ArrayIndexOutOfBoundsException: 9

On ignoring this, the bars color and legend color not displaying same.

I request you tell me what the mistake I did.

thanks in advance.

-Regards,
Mallesh

David Gilbert

Re: Timeseries chart display

Post by David Gilbert » Mon Feb 03, 2003 2:01 pm

It is a bug in the setSeriesPaint(...). As a workaround, you can create an array of Paint objects (with as many colors as you require) and pass this to the other setSeriesPaint(...) method. This code has been changed around for 0.9.5, so the bug should be gone then.

Regards,

Dave Gilbert

Locked