apexcharts / Blazor-ApexCharts

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

Code-only series creation/manipulation #503

Open jbaumflek opened 2 weeks ago

jbaumflek commented 2 weeks ago

While v2 introduced dynamic series of a sort, I have the need to add series completely from the back end. The only difference with the Dynamic* series classes is that they don't rely on parameterized settings.

joadan commented 2 weeks ago

Hi I'm a bit curious why you need this?

jbaumflek commented 2 weeks ago

Before v2, I pulled src and added these classes to dynamically clear and add series based on user input, etc. I have attempted to upgrade to the nuget package for v2, using the dynamic display based on StateHasChanged to cause the rerendering of the new set of data, but part of the change is from one chart to another, from a 4 column chart to a categorized 8 column chart. I am updating options, updating series, and rendering on the chart but I'm only getting 4 columns unless I click twice on my tab. It may be I'm doing something wrong, but I have invested a lot of time in getting these reports to run with the DynamicSeries class I made and I have a lot of reports to update. Since I'm having trouble with just the first one, I would rather keep using the class I made as it is working well for me. It might help someone else.

joadan commented 2 weeks ago

I'm sorry but I would need some more details about the problem and alternative solutions before accepting this pr. Dynamically changing a chart should be possible as it is right now. Could you provide simple repo that would show your issue?