Charts > Using the Charts Library > Decorations Display > Displaying a Legend > Setting General Properties
 
Setting General Properties
The following table shows the properties defined for a chart legend object.
Property
Methods
Default Value
General Properties
Surrounded by a Frame
isShowingFrame
showFrame
IlvTrue
 
Drawn without a
Background and a Shadow
isTransparent
setTransparent
IlvFalse
 
Automatically Recomputed
isAutoRecomputing
setAutoRecompute
IlvTrue
 
Automatically Fit to Contents
isAutoFitting
setAutoFit
IlvTrue
 
Properties Related to the Legend Items
Palette Used to Display the
Legend Items
getItemPalette
setItemPalette
0
 
Space Between the Area
where the Graphic Part is
Displayed and the Label of a
Legend Item
getLabelSpacing
setLabelSpacing
4
 
Space between the
Legend Items
getItemSpacing
setItemSpacing
4
 
Width of the Area where the
Graphic Part of the Legend
Items is Displayed
getBoxWidth
setBoxWidth
20
 
Height of the Area where the
Graphic Part of the Legend
Items is Displayed
getBoxHeight
setBoxHeight
10
 
By default, a legend is drawn surrounded by a filled rectangle with a shadow. This means that the flag indicating whether the legend is surrounded by a frame is set to IlvTrue and the flag indicating whether the legend is drawn without a background and a shadow is set to IlvFalse.
When a legend object is created, it does not contain any legend items. Since the property “Automatically Recomputed” is set to IlvTrue by default, the legend items corresponding to the displayers defined in a chart will be computed automatically and added to the legend when the legend is set on the chart. Also, the legend items are rearranged when the legend is resized, when the inner spacing of the legend is modified, and so on. New legend items are also added automatically and arranged when new displayers are added to the chart.
By default, the legend is resized automatically to fit the legend items that it contains because the property “Automatically Fit to Contents” is set to IlvTrue. If you do not want the size of the legend to be systematically recomputed from the legend items, you have to set the property “Automatically Fit to Contents” to IlvFalse.

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.