Interface for a class LegendSettings
string
Legend in chart can be aligned as follows:
string
The background color of the legend that accepts value in hex and rgba as a valid CSS color string.
Options to customize the border of the legend.
string
Description for legends.
string
The height of the legend in pixels.
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
Opacity of the legend.
number
Option to customize the padding between legend items.
string
Position of the legend in the chart are,
number
Shape height of the legend in pixels.
number
Padding between the legend shape and text.
number
Shape width of the legend in pixels.
number
TabIndex value for the legend.
Options to customize the legend text.
boolean
If set to true, series’ visibility collapses based on the legend visibility.
boolean
If set to true, legend will be visible.
string
The width of the legend in pixels.