My chart in a dialog is not updating

I have following chart, where I add every second a new element to the data series.
The chart is in a radzen dialog and opening when I click a button. The chart is working in general,but the problem is, that the chart is just updating when I press the button. The same chart is updating automaticaly when a new data is addedi and it is located not in a dialog,. What could be the problem?

(I have tried also with adding My_Chart.Reload(), when I add an element to the series, but again the same.

var result = await DialogService.OpenAsync("Simple Dialog", ds =>
@<RadzenStack Gap="1.5rem" >        
            <RadzenChart @ref="My_Chart" style="width: 1000px;height:600px">
                <RadzenLineSeries Smooth="@smooth" Data="@My_Chart_series" CategoryProperty="Date" Title="2025" LineType="LineType.Dashed" ValueProperty="Value">                        
                    <RadzenSeriesDataLabels Visible="@showDataLabels" />
                <RadzenCategoryAxis Padding="0" />
                <RadzenValueAxis Formatter="@FormatAsUSD">
                    <RadzenGridLines Visible="true" />
                    <RadzenAxisTitle Text="Revenue in TRY" />

This won't work in an inline dialog as the content won't refresh. Use a separate .razor file for the chart that will be displayed in the dialog e.g.

await DialogService.OpenAsync<MyChart>( /* other options */ )
1 Like