Hi
Here’s my XAML:
<s:SciChartDonutSurface ChartTitle="Times Distribution" ItemsSource="{Binding TimeGroups}">
<s:SciChartDonutSurface.ItemTemplate>
<DataTemplate DataType="s">
<s:DonutSegment SegmentValue="{Binding Path=Duration}" Text="{Binding Path=Name}"/>
</DataTemplate>
</s:SciChartDonutSurface.ItemTemplate>
</s:SciChartDonutSurface>
And I have correctly created ObservableItems named TimeGroups, with properties Duration and Name.
I’m not seeing a thing…
What am I doing wrong?
Thnanks
- Gabriel Wainmann asked 7 years ago
- You must login to post comments
Hi there,
Your ItemsSource collection should be of IPieSegmentViewModel type:
public ObservableCollection<IPieSegmentViewModel> TimeGroups { get; set; }
Also I see in your xaml code that you wrote your DataTemplate of DataType”s” maybe it can be the reason of the issue.
We have the documentation for SciChartDonutSurface here https://www.scichart.com/documentation/v4.x/webframe.html#The%20Donut%20Chart%20Type.html
And example of how to use it here https://www.scichart.com/example/wpf-chart-donut-chart-example/
Best regards,
Taras B.
SciChart Developer
- Taras Bulka answered 7 years ago
- last edited 7 years ago
- You must login to post comments
Please login first to submit.