apexcharts / Blazor-ApexCharts

A blazor wrapper for ApexCharts.js
https://apexcharts.github.io/Blazor-ApexCharts
MIT License
784 stars 91 forks source link

Add AppendDataBySeriesNameAsync() method #404

Closed technyon closed 6 months ago

technyon commented 6 months ago

I ran into some problems displaying a realtime chart with multiple series. I've opened an issue (#403), but realized that using UpdateSeriesAsync() is not optimal and AppendDataAsync() is better suited since it doesn't reset the series options on call.

My problem was it works fine with a single series, but there's no way to append to a specific series. As far as I can see the data passed to AppendDataAsync() is added to all existing series, which makes little sense in my opinion (correct me if I misunderstood something). I've added a method that allows to add data to specific series, referencing them by name. This maybe is not optimal, since names are not necessarily unique, but it works for my case. Ultimately it would be better to add a unique identifier to the Series object, so that series could be better adressed.

joadan commented 6 months ago

Thank you!