The horizontal alignment of the legend box within the chart area.
The horizontal alignment of the legend box within the chart area. Valid values are left
, center
and right
.
In the case that the legend is aligned in a corner position, the layout
option will determine whether to place it above/below or on the side of the plot area.
2.0
The background color of the legend.
The background color of the legend.
The color of the drawn border around the legend.
The color of the drawn border around the legend.
The border corner radius of the legend.
The border corner radius of the legend.
The width of the drawn border around the legend.
The width of the drawn border around the legend.
Enable or disable the legend.
Enable or disable the legend.
When the legend is floating, the plot area ignores it and is allowed to be placed below it.
When the legend is floating, the plot area ignores it and is allowed to be placed below it.
2.1
In a legend with horizontal layout, the itemDistance defines the pixel distance between each item.
In a legend with horizontal layout, the itemDistance defines the pixel distance between each item.
3.0.3
CSS styles for each legend item when the corresponding series or point is hidden.
CSS styles for each legend item when the corresponding series or point is hidden. Only a subset of CSS is supported, notably those options related to text. Properties are inherited from style
unless overridden here.
CSS styles for each legend item in hover mode.
CSS styles for each legend item in hover mode. Only a subset of CSS is supported, notably those options related to text. Properties are inherited from style
unless overridden here.
The pixel bottom margin for each legend item.
The pixel bottom margin for each legend item.
2.2.0
The pixel top margin for each legend item.
The pixel top margin for each legend item.
2.2.0
CSS styles for each legend item.
CSS styles for each legend item. Only a subset of CSS is supported, notably those options related to text. The default textOverflow
property makes long texts truncate. Set it to null
to wrap text instead. A width
property can be added to control the text width.
The width for each legend item.
The width for each legend item. This is useful in a horizontal layout with many items when you want the items to align vertically. .
2.0
A format string for each legend label.
A format string for each legend label. Available variables relates to properties on the series, or the point in case of pies.
1.3
Callback function to format each of the series' labels.
Callback function to format each of the series' labels. The this keyword refers to the series object, or the point object in case of pie charts. By default the series or point name is printed.
The layout of the legend items.
The layout of the legend items. Can be one of "horizontal" or "vertical".
Line height for the legend items.
Line height for the legend items. Deprecated as of 2.1. Instead, the line height for each item can be set using itemStyle.lineHeight, and the padding between items using itemMarginTop and itemMarginBottom.
2.0
If the plot area sized is calculated automatically and the legend is not floating, the legend margin is the space between the legend and the axis labels or plot area.
If the plot area sized is calculated automatically and the legend is not floating, the legend margin is the space between the legend and the axis labels or plot area.
2.1
Maximum pixel height for the legend.
Maximum pixel height for the legend. When the maximum height is extended, navigation will show.
2.3.0
Options for the paging or navigation appearing when the legend is overflown.
Options for the paging or navigation appearing when the legend is overflown. Navigation works well on screen, but not in static exported images. One way of working around that is to increase the chart height in export.
The inner padding of the legend box.
The inner padding of the legend box.
2.2.0
Whether to reverse the order of the legend items compared to the order of the series or points as defined in the configuration object.
Whether to reverse the order of the legend items compared to the order of the series or points as defined in the configuration object.
1.2.5
Whether to show the symbol on the right side of the text rather than the left side.
Whether to show the symbol on the right side of the text rather than the left side. This is common in Arabic and Hebraic.
2.2
Whether to apply a drop shadow to the legend.
Whether to apply a drop shadow to the legend. A backgroundColor
also needs to be applied for this to take effect. Since 2.3 the shadow can be an object configuration containing color
, offsetX
, offsetY
, opacity
and width
.
When this is true, the legend symbol width will be the same as the symbol height, which in turn defaults to the font size of the legend items.
When this is true, the legend symbol width will be the same as the symbol height, which in turn defaults to the font size of the legend items.
5.0.0
CSS styles for the legend area.
CSS styles for the legend area. In the 1.x versions the position of the legend area was determined by CSS. In 2.x, the position is determined by properties like align
, verticalAlign
, x
and y
, but the styles are still parsed for backwards compatibility.
The pixel height of the symbol for series types that use a rectangle in the legend.
The pixel height of the symbol for series types that use a rectangle in the legend. Defaults to the font size of legend items.
3.0.8
The pixel padding between the legend item symbol and the legend item text.
The pixel padding between the legend item symbol and the legend item text.
The border radius of the symbol for series types that use a rectangle in the legend.
The border radius of the symbol for series types that use a rectangle in the legend. Defaults to half the symbolHeight
.
3.0.8
The pixel width of the legend item symbol.
The pixel width of the legend item symbol. When the squareSymbol
option is set, this defaults to the symbolHeight
, otherwise 16.
A title to be added on top of the legend.
A title to be added on top of the legend.
3.0
Whether to use HTML to render the legend item texts.
Whether to use HTML to render the legend item texts. Prior to 4.1.7, when using HTML, legend.navigation was disabled.
The vertical alignment of the legend box.
The vertical alignment of the legend box. Can be one of top
, middle
or bottom
. Vertical position can be further determined by the y
option.
In the case that the legend is aligned in a corner position, the layout
option will determine whether to place it above/below or on the side of the plot area.
2.0
The width of the legend box.
The width of the legend box.
2.0
The x offset of the legend relative to its horizontal alignment align
within chart.spacingLeft and chart.spacingRight.
The x offset of the legend relative to its horizontal alignment align
within chart.spacingLeft and chart.spacingRight. Negative x moves it to the left, positive x moves it to the right.
2.0
The vertical offset of the legend relative to it's vertical alignment verticalAlign
within chart.spacingTop and chart.spacingBottom.
The vertical offset of the legend relative to it's vertical alignment verticalAlign
within chart.spacingTop and chart.spacingBottom. Negative y moves it up, positive y moves it down.
2.0
JavaScript name:
legend