Configures the legends in charts.
string
Legend in chart can be aligned as follows:
Defaults to ‘Center’
string
The background color of the legend that accepts value in hex and rgba as a valid CSS color string.
Defaults to ‘transparent’
Options to customize the border of the legend.
string
Description for legends.
Defaults to null
boolean
If set to true, legend will be visible using pages.
Defaults to true
string
The height of the legend in pixels.
Defaults to null
Specifies the location of the legend, relative to the chart.
If x is 20, legend moves by 20 pixels to the right of the chart. It requires the position
to be Custom
.
<div id='Chart'></div>
let chart: Chart = new Chart({
...
legendSettings: {
visible: true,
position: 'Custom',
location: { x: 100, y: 150 },
},
...
});
chart.appendTo('#Chart');
Options to customize left, right, top and bottom margins of the chart.
number
maximum width for the legend title.
Defaults to 100
number
Opacity of the legend.
Defaults to 1
number
Option to customize the padding between legend items.
Defaults to 8
string
Position of the legend in the chart are,
Defaults to ‘Auto’
number
Shape height of the legend in pixels.
Defaults to 10
number
Padding between the legend shape and text.
Defaults to 5
number
Shape width of the legend in pixels.
Defaults to 10
number
TabIndex value for the legend.
Defaults to 3
Options to customize the legend text.
string
Title for legends.
Defaults to null
string
legend title position
Defaults to ‘Top’
Options to customize the legend title.
boolean
If set to true, series’ visibility collapses based on the legend visibility.
Defaults to true
boolean
If set to true, legend will be visible.
Defaults to true
string
The width of the legend in pixels.
Defaults to null