This is a migrated thread and some comments may be shown as answers.

Two stacked BarSeries with the same color

1 Answer 43 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ulrich Reinhardt
Top achievements
Rank 1
Ulrich Reinhardt asked on 09 Sep 2015, 09:55 AM

Hi,

i have two StackedGroup BarSeries and i want that both have the same color. Like you can see in the picture i want that the right bar should have the same Colors like the left one also blue and yellow.

thats my Code:

<chart:RadCartesianChart Grid.Row="1" x:Name="CategoryChart" PaletteName="DefaultLight">

for (var i = 0; i < knowledgeTable.KnowledgesesList.Count; i++)
            {
                var categorySeries = new BarSeries
                {
                    LegendTitle = knowledgeTable.KnowledgesesList.ElementAt(i).SeriesName,
                    ShowLabels = false,
                    PaletteMode = SeriesPaletteMode.Series,
                    CombineMode = ChartSeriesCombineMode.Stack,
                    StackGroupKey = "Main"
                };
for (var i = 0; i < knowledgeTable.KnowledgesesList.Count; i++)
           {
               var categorySeries = new BarSeries
               {
                   LegendTitle = knowledgeTable.KnowledgesesList.ElementAt(i).SeriesName,
                   ShowLabels = false,
                   CombineMode = ChartSeriesCombineMode.Stack,
                   StackGroupKey = "Comp"
               };

1 Answer, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 12 Sep 2015, 03:52 PM
Hello Ulrich,

Thank you for contacting us.

With the series PaletteIndex property you can specify which entry from the palette will be used. I have attached a sample application for demonstration.

I hope this helps. 

Regards,
Rosy Topchiyska
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Ulrich Reinhardt
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Share this question
or