change the legend

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

change the legend

Post by Narasimha Narahari » Fri Jan 10, 2003 3:28 pm

hi Dave,
Thanks for your mail. I was able to get through a few things. How can i change the legend that appears. There are 4 or 5 colors that appear since there are more than 1 series but i have only one series to represent which always appears as red.

How do i solve the above problem?

Please help.

Thanks,
--Narasimha

David Gilbert

Re: change the legend

Post by David Gilbert » Fri Jan 10, 2003 9:53 pm

Hi Narasimha,

The legend will show the same number of series as you have in your dataset. You can hide the legend (if you prefer not to see it at all) with:

myChart.setLegend(null);

Regards,

Dave Gilbert

Narasimha

change the legend and Mozilla

Post by Narasimha » Mon Jan 13, 2003 11:18 pm

Hi Dave,
Thanks for your reply, i just did that...hid the legend. Also regarding the Mozilla problem, i was trying to display a JSP page but for some reason Mozilla was not able to set the content type to JSP i guess. When i reverted back to displaying the charts as servlets it worked fine in Mozilla.

Any thoughts on the above issue.

Thanks,
--Narasimha

Locked