rrag / react-stockcharts

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

Сlipped chart when zoomed maximum or shifted with onPan event #798

Open kalitsinskiy opened 2 years ago

kalitsinskiy commented 2 years ago

In case when the chart is maximum zoomed or shifted with onPan event some sides data points disappear due filtering data logic. I fount out the solution way, just add on extra data point from both side to avoid case when chart looks like clipped, it fixs this issue and not so much impact on perfomance. My production project is very dependent on this package, so I will be very grateful approvement PR in comments below, because as for now I have cloned the package to the repository and manually fixed this issue.

Now

example1_with_issue

After fix

example1_fixed

Now

example2_with_issue )

After fix

example2_fixed

Now

example3_with_issue

After fix

example3_fixed