chart:legend

Description

A legend is displayed when the chart has multiple series, with the Chart Legend tag you can customise the legend with a title, border and location on the chart along with other things. This tag must be nested in the Chart Display tag.

Usage

as element:
<chart:legend
       [title="{string}"]
       [align="{string}"]
       [vertical-align="{string}"]
       [layout="{string}"]
       [x="{string}"]
       [y="{string}"]>
</chart:legend>

Directive info

  • This directive creates new scope.

Parameters

Param Type Details
title
(optional)
string

The title of the legend.

align
(optional)
string

The horizontal alignment of the legend box within the chart area. Valid values are 'left', 'center' and 'right'.

vertical-align
(optional)
string

The vertical alignment of the legend box. Valid values are 'top', 'middle' or 'bottom'.

layout
(optional)
string

The layout of the legend items. Can be one of 'horizontal' or 'vertical'.

x
(optional)
string

The x offset of the legend relative to its horizontal alignment 'align'. Negative x moves it to the left, positive x moves it to the right.

y
(optional)
string

The vertical offset of the legend relative to it's vertical alignment 'verticalAlign'. Negative y moves it up, positive y moves it down.

Example

Source