OED
OED copied to clipboard
chart link slider range does not work
Describe the bug
If you zoom a line graphic with the slider at the bottom of the graph, you can zoom in on a subpart of the data. If you click the chartlink (must open after done) then it includes the value in the link, e.g., sliderRange=2020-08-17T16:06:41Z_2021-07-15T20:23:26Z. If you use this link then you get the same graphic but the slider range is not preserved. The code goes through:
- src/client/app/components/RouteComponent.tsx parses this value and set the sliderRange option.
- src/client/app/actions/graph.ts processes this option and dispatches changeRangeSliderIfNeeded
- This dispatches changeRangeSlider which goes to src/client/app/reducers/graph.ts and modifies rangeSliderInterval in the graph state. The issue is that all of this that seems to work fine (looking at the state.graph.rangeSliderInterval after using the chart link seems to have the correct value) but it does not actually set the Plotly range slider. I suspect that we don't ever (yet) use this state to set the slider in Plotly and it only tracked where it was. If possible, we should find a way to set the slider to this value so it completely reproduces the graphic.
Expected behavior
It set the slider!
Additional context
None.