apache / apache/echarts

[Feature] Add data range threshold to show/hide symbol

Open
#19,167 3 comments 0 reactions 0 assignees View on GitHub
en new-feature topic: line
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

The chart does not look good with too many data and symbols, so that would be useful to add threshold to show/hide symbol based on the number of data in a certain range. Technically we can already do that by using event function, but this new property makes our life easier.
For example, if threshold is 50 and there are 51 data in the range, hide symbol. If there are less than or equal to 50 data, show the symbol.

image

### What does the proposed API look like?

In the `dataZoom` property, there should be something like this.

```js
symbolThreashold: {
threshold: number,
type: 'show' | 'hide'
}
```

`threshold ` takes the number of data threshold in the range. `type` takes ` 'show' | 'hide'`. `type` indicates that when `show` is taken, show the symbol when a number of data in the range, otherwise hide the symbol. When `hide` is taken, hide the symbol when a number of data in the range. otherwise show the symbol.

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.