Chart presentation

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

Chart presentation

Post by Eric Gavaldo » Tue Apr 30, 2002 1:51 pm

Hi There,
I'm new in using JFreeChart and JFreeReport and I'm really impressed of the quality of the project. That's great !!!

However I guess something is missing in JFreeChart:

One thing that is VERY useful to me with JFreeReport is that it uses a "presentation xml file" to generate the report from the data (in an abstractTableModel). this presentation xml is capable of using functions to calculate sums and so on ...

I'm not seeing the same mechanism in JFreeChart. I think it could be a VERY major improvment.

In my personal application, what I would like to do is to generate a report AND a graph from the same raw data:

1 - take some raw datas from an XML
2 - convert it in a table
3a - take the report presentation xml (calculate some items)
- generate a report
3b - take the chart presentation xml (calculate some items)
- generate a chart (possibly using only calculated items)

Not sure i'm very clear ...

If this is a good requirement, I might be able to help on this ...
Any ideas ?
Eg\*

Eric Gavaldo

Re: Chart presentation

Post by Eric Gavaldo » Thu May 02, 2002 10:19 am

Let me get more in details ...

Often people (like me) will need to get from a single datasheet (xml, object table, whatever ...) a graph + a report. Also, the chart will need to be build from:
1 - a subset of data present in the original datasheet
2 - some data calculated from the original datasheet (sum of values, number of items in a column etc...)
These 2 features are present in JFreeReport but not in JFreeChart.

Is it planned to have JFreeChart getting the same capabilities ?

It would consist in:
1 - creating a "ChartDefinitionContentHandler" class
(similar to "ReportDefinitionContentHandler") with the method "getChart()"
2 - defining an XML syntax (mainly based on the one currently used for reports) - this class would include the type of the chart we want (bar, pie, etc...)
3 - defining a "setData()" method to the JFreeChart class

What do you think ? I guess it would homogeinize (is it english ?) both products and add values to JFreeChart.

Thanks a lot,
Eg\*

Locked