This question is locked. New answers and comments are not allowed.
Hello,
I am using a ChartView RadCartesianChart with a stacked BarSeries and I have a legend defined. My user has asked for custom colors for each of the bars (series). I have managed to set the color of the bars, but the legend retains the original palette colors. How can I set the Legend colors to match the bar colors? Thank you
I am using a ChartView RadCartesianChart with a stacked BarSeries and I have a legend defined. My user has asked for custom colors for each of the bars (series). I have managed to set the color of the bars, but the legend retains the original palette colors. How can I set the Legend colors to match the bar colors? Thank you
<Grid> <telerik:RadLegend Grid.Column="1" Margin="0 0 0 0" Items="{Binding LegendItems, ElementName=CalendarSummaryLargeChart}" HorizontalAlignment="Right" VerticalAlignment="Top"/> <Grid> <Grid.ColumnDefinitions> <!--the second column is for the legend--> <ColumnDefinition Width="9*" MinWidth="0" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <StackPanel Grid.Column="0" Margin="0 0 0 0"> <telerik:RadCartesianChart x:Name="CalendarSummaryLargeChart" Palette="Arctic" MinWidth="620" MinHeight="500" > <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis> </telerik:CategoricalAxis> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis></telerik:LinearAxis> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries x:Name="CalendarSummaryGlobalLargeSeries" ShowLabels="True" ClipToPlotArea="False" CombineMode="Stack"> <telerik:BarSeries.LegendSettings> <telerik:SeriesLegendSettings Title="Global" /> </telerik:BarSeries.LegendSettings> <telerik:BarSeries.PointTemplate> <DataTemplate> <Rectangle Fill="#404040" Stretch="Fill" /> </DataTemplate> </telerik:BarSeries.PointTemplate> </telerik:BarSeries> <telerik:BarSeries x:Name="CalendarSummaryResourceLargeSeries" ShowLabels="True" ClipToPlotArea="False" CombineMode="Stack"> <telerik:BarSeries.PointTemplate> <DataTemplate> <Rectangle Fill="Gold" Stretch="Fill" /> </DataTemplate> </telerik:BarSeries.PointTemplate> <telerik:BarSeries.LegendSettings> <telerik:SeriesLegendSettings Title="Resource" /> </telerik:BarSeries.LegendSettings> </telerik:BarSeries> <telerik:RadCartesianChart.Behaviors > <telerik:ChartTooltipBehavior Placement="Top" VerticalOffset="0" HorizontalOffset="-10" /> </telerik:RadCartesianChart.Behaviors > 