|
Leggends |
Posted by Eva on Dec-03-2008 18:39 |
|
Hi
I have a problem in reducing the height of the leggend of the charts.
Maybe it can?t be more reduced.
With c.addLegend(300, 0, false).setHeight(50); or other number the leggend doesn?t change.
Can you help me?
Sorry for my English.
Thanks,
Eva |
Re: Leggends |
Posted by Peter Kwan on Dec-04-2008 02:54 |
|
Hi Eva,
If you use "c.addLegend(300, 0, false).setHeight(50);", the height of the legend box will be set to 50 pixels. I think the legend box should have a border around it (unless you have disabled it using setBackground), so you can see the legend box height is really 50 pixels.
Note that if you have many entries in the legend box, it can overflow the box. If you do not want the entries to overflow the box, you may reduce the number of entries (eg. use Layer.setLegendOrder to disable legends for some layers), or use a small legend font size, of smaller margin (see TextBox.setMargin), etc.. You may also put the legend in a location that allows it to grow wider, so the entries can flow from left to right to reduce the number of lines needed in the legend box.
If you need further help, is it possible to attach the complete charting part of your code, together with a chart image showing what you get so far?
Regards
Peter Kwan |
|