Hello,
I'm using the bar series in my UWP app:
The code behind:
public class LineChartData
{
public int Value { get; set; }
public string Name { get; set; }
}
public ObservableCollection<LineChartData> ParticipationData { get; set; } = new ObservableCollection<LineChartData>();
The XAML code:
<telerik:RadCartesianChart Name="dgrm_1" PaletteName="DefaultLight" Height="250">
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis/>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis/>
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.Grid>
<telerik:CartesianChartGrid MajorLinesVisibility="Y" StripLinesVisibility="Y"/>
</telerik:RadCartesianChart.Grid>
<telerik:BarSeries Name="dgrm_1_bar" ItemsSource="{x:Bind Path=ParticipationData}">
<telerik:BarSeries.ValueBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Value"/>
</telerik:BarSeries.ValueBinding>
<telerik:BarSeries.CategoryBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Name"/>
</telerik:BarSeries.CategoryBinding>
</telerik:BarSeries>
</telerik:RadCartesianChart>
When I'm loading this page the first time the chart is loading without problems. But if I navigate to another page and then back to the page with the chart there's no displayed but only the message "No data found".
But I've ensured that the data is loaded to the ObservableCollection "ParticipationData" and if I check the values of the ItemsSource of the BarSieries then I can see the data of the ObservableCollection. So I think that only the UI is not refreshed. I've also tried the "UpdateLayout"-method. But this also not works.
Does someone has an idea what I can do?
Thank you in forward.
Best regards
Matthias