LegendSpec
@elastic/charts • Exports
@elastic/charts / LegendSpec
Interface: LegendSpec
The legend configuration
Contents
Extended By
Properties
customLegend?
customLegend?:
CustomLegend
Override the legend with a custom component.
Source
packages/charts/src/specs/settings.tsx:470
flatLegend?
flatLegend?:
boolean
Display the legend as a flat list.
Default Value
false
Source
packages/charts/src/specs/settings.tsx:447
legendAction?
legendAction?:
LegendAction
Render slot to render action for legend
Source
packages/charts/src/specs/settings.tsx:461
legendColorPicker?
legendColorPicker?:
LegendColorPicker
Source
packages/charts/src/specs/settings.tsx:462
legendMaxDepth
legendMaxDepth:
number
Limit the legend to the specified maximal depth when showing a hierarchical legend
Remarks
This is not the max depth, but the number of level shown: 0 none, 1 first, 2 up to the second etc. See https://github.com/elastic/elastic-charts/issues/1981 for details
Source
packages/charts/src/specs/settings.tsx:435
legendPosition
legendPosition:
Position
|LegendPositionConfig
Set legend position
Default Value
Position.Right
Source
packages/charts/src/specs/settings.tsx:422
legendSize
legendSize:
number
Sets the exact legend width (vertical) or height (horizontal)
Limited to max of 70% of the chart container dimension Vertical legends limited to min of 30% of computed width
Source
packages/charts/src/specs/settings.tsx:442
legendSort?
legendSort?:
SeriesCompareFn
A SeriesSortFn to sort the legend values (top-bottom)
Source
packages/charts/src/specs/settings.tsx:466
legendStrategy?
legendStrategy?:
LegendStrategy
Choose a partition highlighting strategy for hovering over legend items.
Default Value
LegendStrategy.Path
Source
packages/charts/src/specs/settings.tsx:452
legendTitle?
legendTitle?:
string
a title for the table legend
Source
packages/charts/src/specs/settings.tsx:474
legendValues
legendValues:
LegendValue
[]
Add one or more computed statistics to each legend item. The available statistics depends by chart type.
Source
packages/charts/src/specs/settings.tsx:427
onLegendItemClick?
onLegendItemClick?:
LegendItemListener
Source
packages/charts/src/specs/settings.tsx:455
onLegendItemMinusClick?
onLegendItemMinusClick?:
LegendItemListener
Source
packages/charts/src/specs/settings.tsx:457
onLegendItemOut?
onLegendItemOut?:
BasicListener
Source
packages/charts/src/specs/settings.tsx:454
onLegendItemOver?
onLegendItemOver?:
LegendItemListener
Source
packages/charts/src/specs/settings.tsx:453
onLegendItemPlusClick?
onLegendItemPlusClick?:
LegendItemListener
Source
packages/charts/src/specs/settings.tsx:456
showLegend
showLegend:
boolean
Show the legend
Default Value
false
Source
packages/charts/src/specs/settings.tsx:417
Generated using typedoc-plugin-markdown and TypeDoc