Are there some guidelines for creating a new renderer ? I didn't find anything here nor in the developer's guide.
Of course some things can be learned from the source code (like it is a good idea to extend the AbstractRenderer). But maybe there some best practice documentation on how to do this.
How to create a new renderer
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
There isn't any good documentation for implementing your own custom renderer - yet. It would be an excellent addition to the JFreeChart Developer Guide, so I'll add it to my to do list.
Until that is done, the best advice I can give is to copy an existing renderer and start modifying it to meet your requirements.
The original idea was that renderers should be small classes that just handled the drawing of data items. In practice it turns out that more and more functions have had to be pushed from the CategoryPlot and XYPlot classes into the renderers, in order to provide flexibility. Because of this, renderers have become more complex, and as you rightly point out more documentation is required.
Until that is done, the best advice I can give is to copy an existing renderer and start modifying it to meet your requirements.
The original idea was that renderers should be small classes that just handled the drawing of data items. In practice it turns out that more and more functions have had to be pushed from the CategoryPlot and XYPlot classes into the renderers, in order to provide flexibility. Because of this, renderers have become more complex, and as you rightly point out more documentation is required.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

