How to generate chart data source on the fly?

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

How to generate chart data source on the fly?

Post by Guest » Fri Jun 09, 2006 11:57 pm

I've been looking at all the examples and it seems the chart data source is always created by the Java code. I was hoping to some how come up with an expression that would give me a source appropriate for a Pie chart to hand to a drawable fieldd expression. I have some counts of groups I would like to show in the Header as a pie chart showing the distribution of items in the various groups.

I found some references to PieChartCollectorFunction in the pdf but I have not been able to find these class files in a jar, supporting jars, ext jars.

Anyone else done this? Did you write your own Collector function? Does everyone pretty much define the chart in the java? I would really much rather describe what data to collect and how to draw the chart in the report definition.

Feel free to let me know I'm a nut or an idiot. I'm ok with that. :-|

Mimil
JFreeReport Staff Member
Posts: 69
Joined: Tue Mar 25, 2003 7:33 pm

Post by Mimil » Tue Jul 04, 2006 10:39 am

Hi,

this class is from the Pentaho distribution, so I guess you have to download the Pentaho Report distribution : http://www.pentaho.org
A student of JFree & Pentaho Academies

Bye,
Cedric Pronzato

keene
Posts: 3
Joined: Tue Jun 27, 2006 3:03 am

Post by keene » Fri Jul 28, 2006 1:53 pm

Not sure I fully understand your question. If you are asking whether or not it is possible to dynamically change the values of the pieces of your pie chart the answer is yes.

Simply create your dataset object in the java code, and when you update the dataset the PieChart will automatically update.

Locked