Blazor WebAssembly SfAccumulationChart State Change

If you attach on event Loaded and try to change a state of the variable you define it won't work, it changes it in that function scope but once you are out of it it goes back to its original value.

3 Replies 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team December 31, 2020 03:38 PM UTC

Hi Jovan,

The chart Loaded event will be triggered after chart is loaded. We can perform the changes in DOM elements which are ready to append. All calculations are performed before Loaded itself. So, we have prepared sample to change the radius of doughnut chart on button click.


Please revert us if you have any concerns.

Regards,
Durga G



JO Jovan January 2, 2021 08:32 AM UTC

Hi, i think we misunderstood each other, I provided an example based on your example, i want dynamically to change title once SfAccumulationChart is loaded but that is not happening.

Attachment: AccChart486658624_4da90be.rar


DG Durga Gopalakrishnan Syncfusion Team January 4, 2021 11:15 AM UTC

Hi Jovan, 

 
We suggest you call StateHasChanged method to change the h1 tag title value. We have attached the modified sample for your reference.  

 
 public void Loaded(AccumulationLoadedEventArgs eventArgs)
    {
        Title = "Works?";
        StateHasChanged();
    }


Please revert us if you are still facing an issue.

Regards,
Durga G


Marked as answer
Loader.
Up arrow icon