Newer Version Available
apex:legend
Defines a chart legend. This component offers additional configuration options beyond the defaults used by the legend attribute of the <apex:chart> component.
Note: This component must be enclosed within an <apex:chart> component.
Example
Attributes
| Attribute Name | Attribute Type | Description | Required? | API Version | Access |
|---|---|---|---|---|---|
| font | String | The font to be used for the legend text, as a CSS-style font definition. If not specified, this value defaults to "12px Helvetica". | 23.0 | ||
| id | String | An identifier that allows the chart component to be referenced by other components on the page. | 23.0 | global | |
| padding | Integer | The amount of spacing between the legend border and the contents of the legend, in pixels. | 23.0 | ||
| position | String |
The position of the legend, in relation to the chart. Valid options are:
|
Yes | 23.0 | |
| rendered | Boolean | A Boolean value that specifies whether the chart legend is rendered with the chart. If not specified, this value defaults to true. | 23.0 | ||
| spacing | Integer | The amount of spacing between legend items, in pixels. | 23.0 |