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!
Attached is a sample I created for you that demonstrates how to show the Legend items of a XamDoughnutChart with HierarchicalRingSeries. Hope that helps!
Best Regards,
Nelly Tacheva
Infragistics, Inc.
thanks for your reply. Your example works fine. I updated Infragistics from 15.2 to 16.1 but I still can't get the legend to work in my application. I only see the 'Legend' tag but nothing else. I got the same issue with a xamDataChart (StackedColumnSeries).
I imported my UC into your sample solution and it works. So the XAML (and code behind) is not the problem.
Do you have any idea what could be the problem?
Best regards
Daniel
Let me make sure I understand what the issue is:
- your code works in 15.2 but does not in 16.1
- your User Control works in the sample I provided but does not in your application
- there is no other code in your application which might interfere with the way the component is rendered.
Thank you!
Nelly Tacheva said: your code works in 15.2 but does not in 16.1
my application does not work, neither in 15.2 nor in 16.1
Nelly Tacheva said:- your User Control works in the sample I provided but does not in your application
exactly
Nelly Tacheva said:- there is no other code in your application which might interfere with the way the component is rendered.
As far as i can see no. I've got some other User Controls with infragistics components and all work well. Everything except the legend works as expected.
Thank you for clarifying. Please provide an isolated sample of your application that reproduces the issue so that we can investigate further. Thank you!