Legend
A legend displays labels for the series in a chart, usually along with a small graphic item that identifies the series (by color and/or style). It is even possible to add more than one legend to a chart.
The legend will typically contain one legend item for each series displayed in a chart. The item has a small graphic that identifies the series in the chart, and a label that corresponds to the series name.
Legend Properties
Property | Name | Type | Description |
Visible | visible | Boolean | Flag that indicates whether or not this legend should be displayed. |
Width | width | Float | Preferred width of the legend. |
Height | height | Float | Preferred height of the legend. |
Margins | margins | Data Table | Margin around the outside of the legend's frame. See Rectangle Insets. |
Padding | padding | Data Table | Area of whitespace inside the legend's frame. See Rectangle Insets. |
Frame | frame | Data Table | Border that will be drawn around the legend. See Block Frame. |
Position | position | String | Position of the legend within the chart (Top, Bottom, Left, or Right). |
Horizontal Alignment | horizontalAlignment | String | Horizontal alignment for the legend. Usually used if Position is Top or Bottom. |
Vertical Alignment | verticalAlignment | String | Vertical alignment for the legend. Usually used if Position is Left or Right. |
Background Paint | backgroundPaint | Data Table | Background paint for the legend. |
Item Font | itemFont | Data Table | Font for the legend item labels. |
Item Label Padding | itemLabelPadding | Data Table | Padding for the item labels. See Rectangle Insets. |
Item Paint | itemPaint | Data Table | Legend item paint. |
Legend Item Graphic Anchor | legendItemGraphicAnchor | String | The location of the item graphic within its rectangle is determined by two attributes, the anchor point and the location. The anchor point is a point on the item graphic that can be aligned with the location point. Available anchor values are Center, Top, Bottom, Left, Right, Top Left, Top Right, Bottom Left, and Bottom Right. |
Legend Item Graphic Edge | legendItemGraphicEdge | String | Location of the item graphic relative to its text (Top, Bottom, Left, or Right). |
Legend Item Graphic Location | legendItemGraphicLocation | String | Location of item graphic, relative to the bounding box of the legend item. Available location values are Center, Top, Bottom, Left, Right, Top Left, Top Right, Bottom Left, and Bottom Right. |
Legend Item Graphic Padding | legendItemGraphicPadding | Data Table | Padding around the legend item graphic. See Rectangle Insets. |
Was this page helpful?