Proper way to add/remove a serie

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

Proper way to add/remove a serie

Post by Fabien D. » Sat Jan 27, 2001 12:20 pm

hi,
What is the proper way to add/remove a serie into a time chart ?

First, I have no serie and when I add one or more series, I have a strange exception happening in something I guess is the sun graphic renderer.

David Gilbert

RE: Proper way to add/remove a serie

Post by David Gilbert » Sun Feb 18, 2001 8:12 am

Hi Fabien,

JFreeChart expects all the data to be defined at the time the chart is created. To change the data you need to completely replace the DataSource for the chart.

I plan to implement some dynamic data sources (or you could write your own) to make it easier to modify chart data after the chart has been created. There is a task registered on SourceForge (id = 22711) if you want to add any comments.

Regards,

DG.

Fabien D.

RE: Proper way to add/remove a serie

Post by Fabien D. » Mon Feb 19, 2001 9:24 am

I fixed some bugs and added new feature to your library in order to
to use it in my project (using XYDataSource) :

1 - default axis configuration when there is no data
2 - dynamic add of data (with Y axis automatic bounding)
3 - XYDataSource filtering by specifying bounds for X axis (still working on it in order to make it more generic).

I will post all of this to you as soon as I have finished generalizing the XYDataSource filtering (the third point).

David Gilbert

RE: Proper way to add/remove a serie

Post by David Gilbert » Mon Feb 19, 2001 7:11 pm

Hi Fabien,

This sounds great - I look forward to receiving your code. I've had a hard time lately finding time to enhance JFreeChart so I'm glad that you and others are moving things along.

Regards,

DG.

Locked