LegendComponent
Represents the Kendo UI for Angular Chart Legend configuration (see example).
Definition
Package:@progress/kendo-angular-charts
Selector:kendo-chart-legend
Syntax:
<kendo-chart>
<kendo-chart-legend position="top" [visible]="true">
</kendo-chart-legend>
</kendo-chart>
Inputs
align
"center" | "start" | "end"
Specifies the alignment of the legend.
The legend is horizontally aligned when legend.position is set to "top" or "bottom".
The legend is vertically aligned when legend.position is set to "left" or "right".
'center'
background
string
Specifies the background color of the legend. Accepts a valid CSS color string, including hex and rgb.
'white'
Specifies the focus highlight configuration of the legend.
height
number
Specifies the height of the legend.
Specifies the inactive items configuration of the legend.
Specifies the item configuration of the legend.
Specifies the labels configuration of the legend.
Specifies the margin of the Chart legend. A numeric value sets all paddings.
5
Specifies the markers configuration of the legend.
offsetX
number
Specifies the X offset of the Chart legend. The offset is relative to the default position of the legend.
For example, a value of 20 moves the legend 20 pixels to the right of its initial position.
Negative values move the legend to the left of its current position.
0
offsetY
number
Specifies the Y offset of the chart legend. The offset is relative to the current position of the legend.
For example, a value of 20 moves the legend 20 pixels down from its initial position.
Negative values move the legend upwards from its current position.
0
orientation
"vertical" | "horizontal"
Specifies the orientation of the legend items.
'vertical'
Specifies the padding of the Chart legend. A numeric value sets all paddings.
5
position
"top" | "bottom" | "left" | "right" | "custom"
Specifies the positions of the Chart legend.
Setting the legend position to custom allows you to position the legend using the legend.offsetX and legend.offsetY options.
'right'
reverse
boolean
Determines whether the legend items are reversed.
false
spacing
number
Specifies the spacing between legend items.
Specifies the title configuration of the legend.
visible
boolean
Determines whether the Chart displays the legend. By default, the Chart legend is visible.
true
width
number
Specifies the width of the legend.
Methods
Updates the component fields with the specified values and refreshes the Chart.
Use this method when the configuration values cannot be set through the template.
An object containing the updated input fields.