TimeSeriesTableModel ?

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

TimeSeriesTableModel ?

Post by Alex » Tue Dec 17, 2002 7:47 am

Hi Dave,

I need to create a JTable which adds columns dynamically based on
data from a Time Series.

For example, lets say I have a Time Series A which is Jan 2002-Dec 2002
initially the table will have the following columns.

Jan 2002 Feb Mar Apr May Jun July Aug Sep Oct Nov Dec

Now lets say I add anoother time series which goes from:
Time Series B - Dec 2001 - Nov 2002. I would like the table to add a column at the very front and the table columns should look like
this,

Dec 2001 Jan 2002 Feb Mar Apr May Jun July Aug Sep Oct Nov Dec

Now Lets say I add another time series: Mar 2002 - Jan 2003:

Dec 2001 Jan 2002 Feb Mar Apr May Jun July Aug Sep Oct Nov Dec Jan 2003


Can you point me in the direction of a smart JTable which could use
something like your TimeSeriesTableModel to add columns to a JTable
when necessary when the Time Series period changes?


As always many thanks,

Alex

David Gilbert

Re: TimeSeriesTableModel ?

Post by David Gilbert » Wed Dec 18, 2002 10:04 am

Hi Alex,

The TimeSeriesTableModel class is the only thing available at the moment, so I think you'll have to write a custom table model to handle it...

Regards,

DG

Locked