Configures the legends in charts.
Legend in stock 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 in stock chart.
Defaults to ‘transparent’
Options to customize the border of the legend.
Options to customize left, right, top and bottom padding for legend container of the stock chart.
string
Description for legends in stock chart.
Defaults to null
boolean
If set to true, legend will be visible using pages in stock chart.
Defaults to true
string
The height of the legend in pixels.
Defaults to null
boolean
If set to true, legend will be Reversed in stock chart.
Defaults to false
number
Option to customize the padding between legend items.
Defaults to null
Specifies the location of the legend, relative to the Stock chart.
If x is 20, legend moves by 20 pixels to the right of the Stock chart. It requires the position
to be Custom
.
<div id='StockChart'></div>
let stockChart: StockChart = new StockChart({
...
legendSettings: {
visible: true,
position: 'Custom',
location: { x: 100, y: 150 },
},
...
});
stockChart.appendTo('#StockChart');
Options to customize left, right, top and bottom margins of the stock chart.
number
maximum width for the legend title in stock chart.
Defaults to 100
Mode of legend items.
number
Opacity of the legend in stock chart.
Defaults to 1
number
Option to customize the padding around the legend items.
Defaults to 8
Position of the legend in the Stock chart are,
Defaults to ‘Auto’
number
Shape height of the legend in pixels.
Defaults to 10
number
Padding between the legend shape and text in stock chart.
Defaults to 8
number
Shape width of the legend in pixels.
Defaults to 10
number
TabIndex value for the legend in stock chart.
Defaults to 3
Options to customize the legend text.
string
Title for legends in stock chart.
Defaults to null
legend title position in stock chart.
Defaults to ‘Top’
Options to customize the legend title in stock chart.
boolean
If set to true, series’ visibility collapses based on the legend visibility in stock chart.
Defaults to true
boolean
If set to true, legend will be visible.
Defaults to false
string
The width of the legend in pixels.
Defaults to null