Hi,
I have chart within child component, the chart is create dynamically.
After populating the chart, I would like to clear it. How to clear the chart?
Thanks,
Omar
<TelerikChart @ref="GNChart">
<ChartSeriesItems>
@{
var swedishCulture = new CultureInfo("sv-SE");
}
@foreach(var group in ChartData.Select(c=>c.text).Distinct().ToList())
{
<ChartSeries Type="ChartSeriesType.Line"
Data="@ChartData.Where(c=>c.text==group)"
Name="@group"
Field="@nameof(ChartDataClass.value)"
CategoryField="@nameof(ChartDataClass.month)">
<ChartSeriesTooltip Visible="true">
<Template>
<TelerikSvgIcon Icon="SvgIcon.InfoCircle" />
@((context.DataItem as ChartDataClass).value.ToString("N0", swedishCulture)) | @((context.DataItem as ChartDataClass).text)
</Template>
</ChartSeriesTooltip>
</ChartSeries>
}
<ChartValueAxes>
<ChartValueAxis Color="purple">
<ChartValueAxisLabels Format="{0:N0}"></ChartValueAxisLabels>
</ChartValueAxis>
</ChartValueAxes>
</ChartSeriesItems>
<ChartTitle Text="Quarterly revenue per product" Visible="false"></ChartTitle>
<ChartLegend Position="ChartLegendPosition.Bottom">
</ChartLegend>
</TelerikChart>