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
80
Legend is not displayed
posted

Hello,

I am using a xamDoughnutChart and it works fine but the legend does not work.

The Legend is shown but has no entries and I can't find the difference to your sample code.

<UserControl x:Class="rtGuiControl.Statistic.UC_Statistic"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
          xmlns:ig="http://schemas.infragistics.com/xaml"
          mc:Ignorable="d"
          d:DesignHeight="640" d:DesignWidth="1080" Loaded="UserControl_Loaded">
    <Grid>
        <ig:XamDoughnutChart x:Name="doughnutChart" CenterData="{Binding DoughnutTitle}" InnerExtent="40" SliceClick="DoughnutChart_SliceClick" HorizontalAlignment="Left" Margin="200,30,0,0" VerticalAlignment="Top" Height="550" Width="550" AllowSliceExplosion="True">
            <ig:XamDoughnutChart.Series>
                <ig:HierarchicalRingSeries x:Name="ringSeries"
                    ItemsSource="{Binding doughnutData, UpdateSourceTrigger=PropertyChanged, IsAsync=true}"
                    LabelMemberPath="Name"
                    ValueMemberPath="Anteil"
                    ChildrenMemberPath="Children"
                    Legend="{Binding ElementName=legende}"
                    LabelsPosition="BestFit"
                    ToolTip="{}{Name}"
                    LabelExtent="20"
                    OthersCategoryThreshold="1" Loaded="ringSeries_Loaded"
                    />
            </ig:XamDoughnutChart.Series>
        </ig:XamDoughnutChart>
        <ig:ItemLegend x:Name="legende" Content="Legende" VerticalAlignment="Top" HorizontalAlignment="Right" Height="338" Margin="0,10,10,0" Width="250"/>
        <Button Content="Test" Width="150" Height="100" HorizontalAlignment="Right" Margin="0,480,920,0"  VerticalAlignment="Top" FontSize="16" Click="Button_Click"/>
    </Grid>
</UserControl>

Thanks for your support!