New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chart] Scrolling problems with live data #1457
Comments
This probably is again related to the things outlined in #1410. When the series data is being set, the charts update function is called: barista/libs/barista-components/chart/src/chart.ts Lines 232 to 236 in 24647e8
In this update function, we need to destroy the current chart object and reinstantiate it again. Highcharts has an update function, although this will not let the consumer update all properties of the series or chart options. This has been leading to problems in the past, which is why we implemented the re-instantiation functionality in 6df1df8. Before the change, the update function looked like this, where the new series and options were passed to the barista/src/lib/chart/chart.ts Lines 543 to 553 in dd7fa6f
For a brief period of time during it's reconstruction, the chart element will have a height of 0, which causes the rescrolling. @ffriedl89 @lukasholzer One solution to this problem would be to read the current height of the chart in the update method and setting it onto the host element, and removing it again after the update. But I fear this could cause some side-effects. What do you think? |
Yea regarding the side effects I'm not sure as we always check for the I think the best approach would be to test it out to gain insights on how it improves. @TannerGilbert do you want to contribute this fix to the library? For sure we can assist you even with a pair programming session. |
@lukasholzer I'd like to assist in fixing the bug, but my knowledge of the barista codebase and highcharts is quite limited. Also the pair programming session sounds good to me. Maybe lets discuss a time for in on Slack. |
Moved to internal issue tracking |
Bug Report
Expected Behavior
Scrolling should not be influenced by live graph.
Current Behavior
Bar Chart with live data creates problems with scrolling.
Steps to Reproduce
Used Versions:
Attachments
The text was updated successfully, but these errors were encountered: