Skip to content

grafit-charts


Interface: LegendOptions

Extends

Properties

background?

optional background?: LegendBackgroundOptions

Panel behind the items.


data?

optional data?: LegendItemOptions[]

Custom items; fully replaces the auto-derived series items.


enabled?

optional enabled?: boolean

Inherited from

Switchable.enabled


floating?

optional floating?: boolean

Overlay the whole chart area (CSS position:absolute style) instead of reserving space.


item?

optional item?: object

label?

optional label?: FontOptions

marker?

optional marker?: object

marker.size?

optional size?: number


offset?

optional offset?: object

Floating only: inset from the anchored edges; along a centered axis — a shift right/down.

x?

optional x?: number

y?

optional y?: number


position?

optional position?: 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.


toggleSeries?

optional toggleSeries?: boolean

Clicking an item toggles series visibility (true by default).