XML data files with JFreeChart

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

XML data files with JFreeChart

Post by pmsangal » Tue Mar 18, 2003 9:11 pm

Does anyone have a simple example of using an xml file with data inside, and generating the charts using jfreechart xml api? I have been scratching my head all day long over it to find an easy way to do it.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Mar 18, 2003 11:41 pm

There are two demos in the distribution: XMLPieChartDemo and XMLBarChartDemo.

Regards,

Dave Gilbert

pmsangal

piedata.xml

Post by pmsangal » Thu Mar 20, 2003 12:56 am

Thanks. You might wanna remove the unwanted extra character from the end of the XML file supplied with the example. It causes an exception because the XML file takes an invalid syntax. Otherwise it runs fine.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Mar 20, 2003 5:47 pm

Thanks. That character is being added by an incorrect usage of the CRLF converter in the Ant script. I've fixed it now.

Regards,

Dave Gilbert

mhilpert

XML source also for chart definitions?

Post by mhilpert » Mon Mar 31, 2003 9:54 am

does the current XML API only read dataset sources? is there another XML API planned to also read chart definitions from XML, e.g. chart type, fonts, colors, labels, ...?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Apr 01, 2003 5:13 pm

Yes, there are plans for an XML chart definition format. We are going to use this to integrate charts into JFreeReport. Work is just beginning, so I'm not sure how long it will take.

Regards,

Dave Gilbert

Locked