Use for displaying chart legends with interactive item selection.
dataAn array of objects that contain the data to be displayed.
formatThe format of the value displayed in the legend.
hoveredItemIdhovered-item-idThe id of the item to set as hovered.
selectedItemIdselected-item-idThe id of the item to set as selected.
The q2-legend element exposes events that can be used to send and receive data from the component based on user interaction.
Emitted when a legend item is clicked.
IDonutChartDataEmitted when the mouse enters a legend item.
IDonutChartDataEmitted when the mouse leaves a legend item.
IDonutChartDataEmitted when a legend item is clicked.
IDonutChartDataEmitted when the mouse enters a legend item.
IDonutChartDataEmitted when the mouse leaves a legend item.
IDonutChartDataThis component uses other components in the Tecton library, including:
click-elsewhereOther components in the Tecton library use this component, including:
q2-chart-donutThe following CSS variables are available to override the default theme styles of the q2-legend component.
Many Tecton components consume other components to maintain visual and functional consistency. If you are looking for a CSS variable you think should exist but are not seeing it, it may be defined in one of the dependent components below. Either way, if you think it's something we should expose more conveniently, let us know!