SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

1
0

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

Version
4.2
  • You must to post comments
1
0

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.