highlight action - series and geo component
The highlight action highlights specified data graphics. For series: dispatchAction({type: 'highlight', seriesIndex?: number | number[], seriesId?: string | string[], seriesName?: string | string[], dataIndex?: number | number[], name?: string | string[]}). For geo component (since v5.1.0): dispatchAction({type: 'highlight', geoIndex?: number | number[], geoId?: string | string[], geoName?: string | string[], name?: string | string[]}).
downplay action - series and geo component
The downplay action downplays specified data graphics. For series: dispatchAction({type: 'downplay', seriesIndex?: number | number[], seriesId?: string | string[], seriesName?: string | string[], dataIndex?: number | number[], name?: string | string[]}). For geo component (since v5.1.0): dispatchAction({type: 'downplay', geoIndex?: number | number[], geoId?: string | string[], geoName?: string | string[], name?: string | string[]}).
select action - series data
The select action selects specified data. Selected data will apply the style of series-bar.select. dispatchAction({type: 'select', seriesIndex?: number | number[], seriesId?: string | string[], seriesName?: string | string[], dataIndex?: number | number[], name?: string | string[]}).
unselect action - series data
The unselect action unselects specified data. dispatchAction({type: 'unselect', seriesIndex?: number | number[], seriesId?: string | string[], seriesName?: string | string[], dataIndex?: number | number[], name?: string | string[]}).
toggleSelect action - series data
The toggleSelect action toggles the selected status of specified data. dispatchAction({type: 'toggleSelect', seriesIndex?: number | number[], seriesId?: string | string[], seriesName?: string | string[], dataIndex?: number | number[], name?: string | string[]}).
dispatchAction usage pattern
Chart actions in ECharts are triggered through the dispatchAction method on the chart instance. All action parameters marked with ?: are optional.
dispatchAction for triggering component actions
Actions can be triggered programmatically through myChart.dispatchAction({ type: '' }) method. This unified approach manages all actions and may record user event paths. This replaces the ECharts 2.x approach of myChart.component.tooltip.showTip.
Sunburst series actions and options changed in v5
In v5, sunburst series deprecated action types: 'highlight' → 'sunburstHighlight', 'downplay' → 'sunburstUnhighlight'. Deprecated series options: series.downplay → series.blur, series.highlightPolicy → series.emphasis.focus.
Pie series actions simplified in v5
In v5, pie series deprecated action types are simplified: 'pieToggleSelect' → 'toggleSelect', 'pieSelect' → 'select', 'pieUnSelect' → 'unselect'. Deprecated event types: 'pieselectchanged' → 'selectchanged', 'pieselected' → 'selected', 'pieunselected' → 'unselected'.
Map series actions simplified in v5
In v5, map series deprecated action types are simplified: 'mapToggleSelect' → 'toggleSelect', 'mapSelect' → 'select', 'mapUnSelect' → 'unselect'. Deprecated event types: 'mapselectchanged' → 'selectchanged', 'mapselected' → 'selected', 'mapunselected' → 'unselected'.
Map series options changed in v5
In v5, map series deprecated options: series.mapType → series.map. series.mapLocation is deprecated.
Graph series focusNodeAdjacency deprecated in v5
In v5, graph series option series.focusNodeAdjacency is deprecated. Use series.emphasis: { focus: 'adjacency'} instead.
highlight action - series and data parameters
The highlight action has two forms. For series data: type is 'highlight', with seriesIndex (number | number[]), seriesId (string | string[]), or seriesName (string | string[]); dataIndex (number | number[]) or name (string | string[]). For geo components (v5.1.0+): geoIndex, geoId, or geoName; and geo region name.
downplay action - cancel highlight
The downplay action takes identical parameters to highlight: for series, use seriesIndex/seriesId/seriesName and dataIndex/name; for geo components (v5.1.0+), use geoIndex/geoId/geoName and region name.
select action - select data
The select action marks specified data with select styling. Parameters: seriesIndex (number | number[]), seriesId (string | string[]), or seriesName (string | string[]); dataIndex (number | number[]) or name (string | string[]).
unselect action - cancel selection
The unselect action cancels selection. Parameters: seriesIndex (number | number[]), seriesId (string | string[]), or seriesName (string | string[]); dataIndex (number | number[]) or name (string | string[]).
toggleSelect action - toggle selection state
The toggleSelect action toggles selection state. Parameters: seriesIndex (number | number[]), seriesId (string | string[]), or seriesName (string | string[]); dataIndex (number | number[]) or name (string | string[]).