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
can i create my own custom charts using jfreechart
Re: can i create my own custom charts using jfreechart
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
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