How to harcode a Legend names and Colors

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

How to harcode a Legend names and Colors

Post by Juan » Wed Oct 23, 2002 8:16 am

Hello:

I have been trying to create a Legend where I can add whatever number of items and set of colors independently from the number of existent series.

Is this possible? If so how would you do this?

Thanks!

Juan.

Juan

Re: How to harcode a Legend names and Colors

Post by Juan » Wed Oct 23, 2002 8:34 am

I have a Single Series but must have several items in the Legend.
If I use Several Series then all items in the Legend appear correctly but the bars are misaligned to the range values. Any comments?

Dave Gilbert

Re: How to harcode a Legend names and Colors

Post by Dave Gilbert » Wed Oct 23, 2002 8:38 am

Hi Juan,

You could create your own subclass of Legend and put whatever you want into the draw(...) method. Aside from that, I don't think there is another way to do this.

Regards,

DG.

Locked