Interface: LegendOptions
Extends
Properties
avoidCaptions?
optionalavoidCaptions?:boolean
Floating only: make the title and subtitle flow around the legend box instead of running underneath it (true by default). Set to false to allow the overlap.
background?
optionalbackground?:LegendBackgroundOptions
Panel behind the items.
data?
optionaldata?:LegendItemOptions[]
Custom items; fully replaces the auto-derived series items.
enabled?
optionalenabled?:boolean
Inherited from
floating?
optionalfloating?:boolean
Overlay the whole chart area (CSS position:absolute style) instead of reserving space.
item?
optionalitem?:LegendItemStyleOptions
Styling shared by all items.
maxHeight?
optionalmaxHeight?:Length
Height the legend never goes past, in pixels or as a percentage of the room it was offered ('30%'): rows beyond it are paginated. On a horizontal legend this caps the rows per page along with maxRows, on a vertical one the items per page.
maxRows?
optionalmaxRows?:number
Rows per page for a horizontal legend; 2 by default. A vertical one pages by height.
maxWidth?
optionalmaxWidth?:Length
Width the legend never goes past, in pixels or as a percentage of the room it was offered ('40%'). A vertical legend (left/right) is what this is usually for — it stops long names from eating the plot, and a label that no longer fits is cut with an ellipsis. A horizontal one wraps within it instead.
offset?
optionaloffset?:object
Floating only: inset from the anchored edges; along a centered axis — a shift right/down.
x?
optionalx?:number
y?
optionaly?:number
position?
optionalposition?:LegendPlacement
The docking side (first token) plus an optional alignment along it: 'top-right' docks to the top edge, right-aligned ('top' centers). With floating: true the same value anchors the legend over the chart.
reverse?
optionalreverse?:boolean
Renders the items back to front.
toggleSeries?
optionaltoggleSeries?:boolean
Clicking an item toggles series visibility (true by default).