Allow options for customizing legends with different properties such as legend visibility, height, width, position, legend padding, alignment, textStyle, border, margin, background, opacity, description, tabIndex in the pivot chart.
Allows to set the legend in chart can be aligned as follows:
Defaults to ‘Center’
string
Allows to set the background color of the legend that accepts value in hex and rgba as a valid CSS color string.
Defaults to ‘transparent’
PivotChartBorderModel
Allows options to customize the border of the legend.
string
Allows to set the description for legends.
Defaults to null
string
Allows to set the height of the legend in pixels.
Defaults to null
PivotChartLocationModel
Allows to set 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
.
...
legendSettings: {
visible: true,
position: 'Custom',
location: { x: 100, y: 150 },
},
...
PivotChartMarginModel
Allows options to customize left, right, top and bottom margins of the chart.
number
Allows to set the opacity of the legend.
Defaults to 1
number
Allows option to customize the padding between legend items.
Defaults to 8
LegendPosition
Allows to set the position of the legend in the chart are,
Defaults to ‘Auto’
number
Allows to set the shape height of the legend in pixels.
Defaults to 10
number
Allows to set the padding between the legend shape and text.
Defaults to 5
number
Allows to set the shape width of the legend in pixels.
Defaults to 10
number
Allows to set the tabindex value for the legend.
Defaults to 3
PivotChartFontModel
Allows options to customize the legend text.
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
Allows to set the width of the legend in pixels.
Defaults to null