Function: applySelectionEmphasis()
applySelectionEmphasis<
T>(option,selected,opts?):T
Pure, declarative selection-emphasis transform for a built ECharts option.
Given one or more selected category names, returns a new option in which the
matching data element(s) render at full prominence while the rest are dimmed
via itemStyle.opacity. It is a no-op (returns the input unchanged) when
selected is undefined or empty.
Type Parameters
Section titled “Type Parameters”T
The option object type (typically Record<string, unknown>).
Parameters
Section titled “Parameters”option
Section titled “option”T
The ECharts option produced by one of the build*Option helpers.
selected
Section titled “selected”string | string[] | undefined
The selected category name(s); undefined/empty means no emphasis.
SelectionEmphasisOptions
Optional opacity overrides. See SelectionEmphasisOptions.
Returns
Section titled “Returns”T
A new option with emphasis applied, or the original option when there is no selection.