Add support for API for toolbox features like dataView, magicType
- 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 are API available for two toolbox features
1. saveAsImage: Using [echartsInstance.getDataURL](https://www.echartsjs.com/en/api.html#echartsInstance.getDataURL)
2. dataZoom: Using [action.dataZoom](https://www.echartsjs.com/en/api.html#action.dataZoom)
If API is made available for `dataView` and `magicType`, external action buttons can be used to trigger these functionalities.
In many applications, external action buttons can be used configured according to the application UI requirement.
### What does the proposed API look like?
May be action button for `dataView` can be provided like
```
action.dataView.toggle()
// or
action.dataView.show() and action.dataView.hide()
```
Similar can be for `magicType` like
```
dispatchAction({
type: 'magicType',
switching: 'line' // or `bar` or `stack`, etc.
})
```
Contributor guide
Assessment
This issue has not been assessed yet.