You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all, thank you for all the work on this library. It's by far the best JS stock chart lib I've seen.
Currently, as one scrolls through the chart, it does a great job of fitting all of the candles so that the visible high is as high as possible and the visible low is as low as possible. However, this seems to stop applying if the chart is scrolled so that only the most recent data is shown. Please see screenshot below how all the candles are near the center of the chart and not fitting to the available vertical space.
It would be great if there could be an option (or change the default behavior) so that the chart still fits the candles for these cases.
Feature Description
Hi, first of all, thank you for all the work on this library. It's by far the best JS stock chart lib I've seen.
Currently, as one scrolls through the chart, it does a great job of fitting all of the candles so that the visible high is as high as possible and the visible low is as low as possible. However, this seems to stop applying if the chart is scrolled so that only the most recent data is shown. Please see screenshot below how all the candles are near the center of the chart and not fitting to the available vertical space.
It would be great if there could be an option (or change the default behavior) so that the chart still fits the candles for these cases.
I investigated a bit and I think this may be related to the
getVisibleRange
not being updated anymore for these cases. If I'm not mistaken, I think this is the function responsible: https://github.com/liihuu/KLineChart/blob/main/src/store/TimeScaleStore.ts#L134To Do
@liihuu do you think this is a good change? If so, I'm happy to try to make a PR for it.
The text was updated successfully, but these errors were encountered: