[Bug] Redraw not triggered after setOption call inside custom toolbox feature
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.3.3
### Link to Minimal Reproduction
https://jsfiddle.net/codysoultz/xahwg3j4/22/
### Steps to Reproduce
Two X axis graph with 2-D data. In my example, the data is furnace temperature of a coil of metal where the temperature is the y value and the footage into the coil and the time are the x axis. Check out the jsfiddle for details.
When setOption is called inside of the toolbox handler it never is not redrawn with new options until there is an action that causes a redraw.
### Current Behavior
When the custom toolbox item is pressed nothing visually happens. In the jsfiddle you can cause a redraw by zooming in or out with the mouse wheel then the setOption takes effect
### Expected Behavior
When setOption is called inside of the toolbox handler it should send an action for redraw if requitred.
### Environment
```markdown
No Framework
```
### Any additional comments?
My workaround is to cause a "changeDataView" action to fire inside of the toolbox handler after the setOption function has been called. To see this uncomment lines 77-80 in the js of my jsfiddle. The jsfiddle has both the version with the workaround and without the workaround.
```
extensionAPI.dispatchAction({
type: 'changeDataView',
newOption: {}
});
```
Contributor guide
Assessment
This issue has not been assessed yet.