ChartPanel -> SVG

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
bonododo
Posts: 9
Joined: Wed Mar 17, 2004 5:27 pm

ChartPanel -> SVG

Post by bonododo » Mon Jun 07, 2004 12:45 pm

hi everybody,

i was just wondering the way JfreeChart export chartPanel to SVG.
Does it export a SVG containing a PNG, or a real SVG file using xml???

thanks for your answer

bonododo

joelwyland
Posts: 15
Joined: Wed Jun 02, 2004 10:26 pm

Re: ChartPanel -> SVG

Post by joelwyland » Wed Jun 09, 2004 4:51 pm

bonododo wrote: Does it export a SVG containing a PNG, or a real SVG file using xml???
JFreeChart itself doesn't do the outputing to XML, but it allows you to use other APIs in conjunction with JFreeChart to export real SVG/XML files. Look at the Batik API. It provides an implementation of java.awt.Graphics2D which will output XML when you draw stuff to it. So, if you pass their Graphics2D into the ChartPanel's paint() method, it will draw the chart in SVG/XML format. There are examples on the website and whatnot.

Kenny

Locked