Add a public API for subchart interactions
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
Would it be appropriate to add a public API that allows for more programmatic subchart interactions? e.g. clearing the subchart selection or setting the extent?
Something along the lines of:
``` javascript
var chart = c3.generate({
...
});
chart.subchart.extent([5,10]).update();
chart.subchart.clear();
```
I'm currently providing a similar functionality in my wrapper API using the internal API's.
``` javascript
function clear(chart) {
if (chart.internal.config.subchart_show) {
chart.internal.brush.clear().update();
chart.internal.redrawForBrush();
}
};
```
I don't really want to be depending on any internal APIs, and would be willing to contribute something back if this is a desired functionality.
Contributor guide
Assessment
This issue has not been assessed yet.