apexcharts / Blazor-ApexCharts

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

Must have at least one series exception occurs when changing page before the page fully loaded. #384

Closed herczegzoltan closed 8 months ago

herczegzoltan commented 8 months ago

Hi, I have a blazor details page of an item, when I open this page LineChart shows up, all works good but when I click to navigate to this page and quickly before even the chart would load itself i get an exception: "Chart 52b8a3b825e34ddfa67f944ea24b8266 must have at least one series" on UpdateSeriesAsync if I wait fully load it does not happen. How could I solve this?

joadan commented 8 months ago

Hello,

Please make sure you are on the latest version

herczegzoltan commented 8 months ago

Indeed I could solve this with:

if(itemChartRef.Series > 0)
{
UpdateSeriesAsync()
}

Just curious if there is an another way and it should not throw system exception, could be apexexception.