How to customize the drawing of legend items

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
prolaznik22
Posts: 11
Joined: Fri Feb 03, 2006 9:27 pm

How to customize the drawing of legend items

Post by prolaznik22 » Fri Jun 16, 2006 7:23 pm

Hi,

I have JFreeChart 1.0.1. I want to customize the drawing of legend items. I did the research in the news group, but all the postings talk about re-implementing the draw method in Standard Legend class. I can't find that class in JFreeChart 1.0.1. I know that I have to re-implement some draw method, and I have an idea how to do it. The problem is that I can't find that draw method in JfreeChart 1.0.1. Please help.

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 » Mon Jun 19, 2006 4:28 pm

What kind of customisation do you want to do? You can do some things just by overriding the getLegendItem() method in the renderer. If you want to take over complete control, replace the LegendTitle class (or change the layout code it uses).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked