rrag / react-stockcharts

Highly customizable stock charts with ReactJS and d3
http://rrag.github.io/react-stockcharts
MIT License
3.88k stars 958 forks source link

View jumps to show whole plot if xExtents is updated from value to undefined. #741

Open MaxYari opened 4 years ago

MaxYari commented 4 years ago

Specific use case: On the first render of my plot, I set up xExtents to show last n entries, on all further updates (when new data arrives for example) my xExtents is undefined.

Expected behaviour: plot view doesn't change on data updates. Current pan and zoom positions are preserved.

Current behaviour: View jump to show the entirety of the plot (I assume this is a "default" xExtents position) on the first event of xExtents being undefined. It doesn't jump on any further data updates.