can i create my own custom charts using jfreechart

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

can i create my own custom charts using jfreechart

Post by santhosh » Thu Jan 23, 2003 10:08 am

hi
can i create my own charts like pareto chart by extending or implementing JFreeChart api, if yes how should i go about implementing it.
cheers, have a nice day
santhosh

David Gilbert

Re: can i create my own custom charts using jfreechart

Post by David Gilbert » Fri Jan 24, 2003 10:47 am

Hi Santhosh,

Of course you can. I don't know what a pareto chart is, but all charts that have been implemented so far in JFreeChart extend the Plot class. You need to implement the draw(...) method to draw your data - the JFreeChart object will work out the area available to the plot, then call this method to draw it. You can either use an existing dataset (if your data fits), or define a new one that your plot recognises. If you need axes, it makes a lot of sense to reuse the axis code already contained in the library.

Studying the source code for the different plots already implemented in JFreeChart (PiePlot, ThermometerPlot, CategoryPlot, XYPlot etc) will help you a lot...

Regards,

Dave Gilbert

santhosh

Re: can i create my own custom charts using jfreechart

Post by santhosh » Fri Jan 24, 2003 1:11 pm

thanks for the information

Locked