apache / apache/echarts

[Feature] Clear axis range selection by action in parallel coordinates plot

Open
#18,446 7 comments 1 reaction 0 assignees View on GitHub
difficulty: easy en new-feature topic: parallel
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

There is no action available to clear the axis range selection in parallel coordinates plot. The only option is to click on an axis, but it would be helpful to clear the axis range selection by dispatching an action.
For now, a workaround is
`Object.values((echart as any)._componentsMap)`
` .map(x => (x as any).axisModel)`
` .filter(Boolean)`
` .forEach(x => {`
` x.activeIntervals = [];`
`});`
Here we need to access the internal state of the echart.
There is an event 'axisareaselected' (https://echarts.apache.org/en/api.html#events.axisareaselected), but there is no action documented to trigger it.

### What does the proposed API look like?

An action could look like this:
`dispatchAction( { type: 'clearAxisRangeSelection', axes: ['x', 'y'] } )`
should clear the axis selection range on the axes named 'x' and 'y' (the name as defined in the `option.parallelAxis[i].name` property).
Additionally,
`dispatchAction( { type: 'clearAxisRangeSelection'} )`
could be used to clear the axis selection range on all axes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.