Query: How to set empty data in Blazor Accumulation Chart

Answer:


By setting the data label setting visibility property as false, when empty data is assigned to the accumulation chart. Here is the code snippet for your reference.

<SfAccumulationChart>

//…

<AccumulationDataLabelSettings Visible="@visibility">AccumulationDataLabelSettings>

//…

SfAccumulationChart>

@code {

public bool visibility = true;

public void ChangeData()

{

this.Orders = new List();

if (this.Orders.Count == 0)

this.visibility = false;

else

this.visibility = true;

this.StateHasChanged();

}

}


Find the sample for to set Empty data in accumulation chart from here.


Loader.
Up arrow icon