Hello,
I have a chart with stackedColumns that will display the information provided in the GroupBy item.
In addition, I have the autogenerateSeries to true. I have no idea how to set My series title to display in the legend the name of ID of each serie.
Here I attach the code of my chart. The series has no title because I have no idea how to bind to the KeyMemberPath of the groupBy.
My GroupBy
<ig:GroupBy x:Key="grouped" ItemsSource="{Binding GraphData,Mode=TwoWay}" GroupMemberPath="ValueDate" KeyMemberPath="AssetId" ValueMemberPath="Balance" />
My Chart
<ig:XamDock x:Name="Graph" Grid.Row="2"> <ig:XamDataChart x:Name="theFuturesScenariosChart" Visibility="{Binding ShowDataChart,Mode=TwoWay}" PlotAreaBackground="Transparent" Style="{StaticResource XamDataChartStyle}" ig:XamDock.Edge="Central" Legend="{Binding ElementName=xmLegend}"> <ig:XamDataChart.Axes> <ig:CategoryXAxis x:Name="xAxis" Interval="1" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=Views:FutureScenariosView} ,Path=Data ,Mode=TwoWay}" Label="{}{Key}"> <ig:CategoryXAxis.LabelSettings> <ig:AxisLabelSettings Foreground="White" Angle="90" Extent="150" /> </ig:CategoryXAxis.LabelSettings> </ig:CategoryXAxis> <ig:NumericYAxis x:Name="yAxis" HorizontalAlignment="Left" Label="{}{0:n0}"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Foreground="White" /> </ig:NumericYAxis.LabelSettings> </ig:NumericYAxis> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:StackedColumnSeries x:Name="stack" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=Views:FutureScenariosView}, Path=Data ,Mode=TwoWay}" XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}" AutoGenerateSeries="True" Visibility="{Binding ShowDataChart, Mode=TwoWay}" > <ig:StackedColumnSeries.ToolTip> <StackPanel Orientation="Vertical"> <ContentPresenter Content="{Binding Series, Converter={StaticResource FutureScenarioKeyConverter}, ConverterParameter='_Balance'}" /> <TextBlock Text="" /> </StackPanel> </ig:StackedColumnSeries.ToolTip> </ig:StackedColumnSeries> </ig:XamDataChart.Series> </ig:XamDataChart> <ig:Legend x:Name="xmLegend" HorizontalAlignment="Stretch" Background="Transparent" Padding="0" BorderBrush="Transparent" Foreground="White" Style="{x:Null}" VerticalAlignment="Top" Margin="2" Content="{x:Null}" ig:XamDock.Edge="OutsideRight"> </ig:Legend> </ig:XamDock>
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and can suggest you see this forum thread:
http://ko.infragistics.com/community/forums/t/64311.aspx
where a similar question is discussed.
Feel free to write me if you have further questions.