I'm trying to use the Radzen Charts with dynamic series as shown in this example:
My data is in a nested Dictionary:
Dictionary<string, Dictionary<string, int>> myData = new Dictionary<string, Dictionary<string, int>>();
So far, this is what I have:
<RadzenChart>
@foreach (var myDataItem in myData)
{
<RadzenLineSeries Data="@myDataItem.Value"
Title="@myDataItem.Key"
CategoryProperty="@(((Dictionary<string, int>) myDataItem.Value).Keys)"
ValueProperty="@myDataItem.Value.Select(x => x.Value).ToString()" />
}
</RadzenChart>
"myDataItem.Key" represents the Parent Dictionary's Key, and is set to the Title of each Series.
But for CategoryProperty and ValueProperty, I cannot seem to find the right syntax to access the Key and Value of the Child Dictionary.
I've also tried "myDataItem.Value.Key" but that doesn't work either.
Does anyone have any idea that could help?