Readonly backgroundInterface for attaching listeners to user interaction events (click, pointerenter, etc.) on legend background.
// Example syntax
chart.legend.background.addEventListener('click', (event) => {
console.log(event)
})
For syntax examples, refer to EventInterface. Available event keys are listed under LCJSInteractionEventMap
Readonly titleInterface for attaching listeners to user interaction events (click, pointerenter, etc.) on legend title.
// Example syntax
chart.legend.title.addEventListener('click', (event) => {
console.log(event)
})
For syntax examples, refer to EventInterface. Available event keys are listed under LCJSInteractionEventMap
Add a new entry to the legend.
Object itself.
Optional component: LUT | Chart | AttachableAttachable, Chart, or LUT.
Optional options: LegendEntryOptionsLegendEntryOptions
Get the current entries of the legend.
LegendEntry array.
Get the current options of specific entry.
LegendEntryOptions
Attachable component of the entry.
Get the current options for the legend.
LegendOptions
Remove existing entry from the legend.
Object itself.
Component of the entry.
Override LegendEntryOptions of an specific entry.
Object itself.
Component of the entry to be modified.
New LegendEntryOptions
Set the options of the legend.
Object itself.
LegendOptions
Class for all legend implementations.