Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
'OtherCategory' doesn't work on the XamPieChart.?
posted

I coded like below. All other items in the list shows perfectly. But Other Category doesn't shows on the XamPieChart. Actually I don't know what's the problem.

I need to know what problem I am doing. And how to show other category with 'Label' as text mentioned in the OtherCategoryText and 'Value' as calculation of the all items stored in the other category.

This is my code:

        <igD:XamDock>
            <ig:ItemLegend
                x:Name="Legend"
                igD:XamDock.Edge="OutsideRight"
                igD:XamDock.VerticalDockAlignment="Center"/>

            <ig:XamPieChart Name="pieChart"
                 Grid.Row="2"
                 ItemsSource="{StaticResource data}"
                 LabelMemberPath="Label"
                 ValueMemberPath="Value"
                 OthersCategoryType="Percent"
                 OthersCategoryText="Other"
                 OthersCategoryThreshold="20"
                 Legend="{Binding ElementName=Legend}" >

                <ig:XamPieChart.LegendItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <ContentPresenter Content="{Binding}" ContentTemplate="{Binding Series.LegendItemBadgeTemplate}"/>
                            <TextBlock Text="{Binding Item.Label}"/>
                            <TextBlock Text="{Binding Item.Value}"/>
                        </StackPanel>
                    </DataTemplate>
                </ig:XamPieChart.LegendItemTemplate>

            </ig:XamPieChart>
        </igD:XamDock>