Hi All,
I am Novice to JFreeChart. Does any one know about how to change or set the custom legend on JFreeChart. Also, is it possible to change the position and shape of the legend?.
By default the JFreeChart displays Legends at the bottom. is it possible to change it?.....
Customizing Legend in TimeSeries Chart
I am also interested in doing something like this. I'm trying to figure out the cleanest way to manually construct LegendItems and then create a new LegendTitle out of them. I'm getting confused because a LegendTitle only has one method that takes a LegendItem (createLegendItemBlock). Is this what I want to use to add labels to my legend?
I didn't see a section for this in the developer's guide. Help / suggestions appreciated.
I didn't see a section for this in the developer's guide. Help / suggestions appreciated.
This site also has a good example 
It shows how to customise the legend in the pie chart.
zhaoyl.javaeye.com/blog/208278
The translated version is:
translate.google.com.au/translate?hl=en&sl=zh-CN&u=<ADDHTTP://>zhaoyl.javaeye.com/blog/208278&sa=X&oi=translate&resnum=2&ct=result&prev=/search%3Fq%3Dexample%2Busage%2Bof%2Blegendtitle%2Bfor%2Bjfreechart%26start%3D10%26hl%3Den%26sa%3DN
I also can't post links.
so you have to add "http" to the front of the links and to the ADDHTTP section in the translate link

It shows how to customise the legend in the pie chart.
zhaoyl.javaeye.com/blog/208278
The translated version is:
translate.google.com.au/translate?hl=en&sl=zh-CN&u=<ADDHTTP://>zhaoyl.javaeye.com/blog/208278&sa=X&oi=translate&resnum=2&ct=result&prev=/search%3Fq%3Dexample%2Busage%2Bof%2Blegendtitle%2Bfor%2Bjfreechart%26start%3D10%26hl%3Den%26sa%3DN
I also can't post links.

-
- Posts: 3
- Joined: Thu Sep 25, 2008 12:42 pm
Re: Customizing Legend in TimeSeries Chart
I hope this will help you.
To change the legend position - use the below statement
chart.getLegend().setPosition(RectangleEdge.LEFT);
to set the legend in left side
To change the legend position - use the below statement
chart.getLegend().setPosition(RectangleEdge.LEFT);
to set the legend in left side