-
Notifications
You must be signed in to change notification settings - Fork 91
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
add wrapper code for appendSeries #457
Conversation
Hi, Thank you Do you have a description of this pull request? |
I've added a description. RealTime.razor was just VS formatting things it shoudn't. |
Sorry if I'm missing something here but adding series dynamically should be preformed using the razor syntax, like example https://apexcharts.github.io/Blazor-ApexCharts/features/dynamic-series By adding it in code there is a mismatch between the two. |
I believe in that example it works because after adding the series you call await chart?.UpdateSeriesAsync(true); In this chart it's ok because it's static data. In a realtime line chart, calling UpdateSeriesAsync will cause animations to trigger and the data to be reset. I'm honestly just trying to figure out how things are supposed to be done, because they are documented for specific cases only. I need:
So far it works, but I have a feeling apex charts isn't made for realtime data. Still many quirk when it comes to dynamic data, unfortunately I didn't find a better alternative so far. |
Yeah one thing that found in realtime charts is that you can not use the toolbar, which means you can no do interactive zooming and panning. |
You can actually, but it's tricky. Instead of setting the range, every time after appending data to the chart you call c. Then detect via OnZoomed and OnScrolled events if the user is zooming or panning, and suppress calls to ZoomXAsync during this time. I have actually opened an issue about this at apex charts, all of this should be handled internally by the chart: I'm not too optimistic anything will happen there soon though. |
@technyon, Thank you I now understand the issue. I'll merge this. |
Expose apex charts appendSeries method in C# code