This is a migrated thread and some comments may be shown as answers.
Color each XCategory Item
1 Answer 6 Views
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 2
Dario asked on 26 Mar 2013, 01:28 PM
Can I choose single color for each XCategory Item?

Thi is my chart

<telerik:RadChart ItemsSource="{Binding Situazione}" Margin="2">
    <telerik:RadChart.DefaultView>
        <telerik:ChartDefaultView>
            <telerik:ChartDefaultView.ChartLegend>
                <telerik:ChartLegend UseAutoGeneratedItems="True" Visibility="Collapsed" />
            </telerik:ChartDefaultView.ChartLegend>
        </telerik:ChartDefaultView>
    </telerik:RadChart.DefaultView>
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMappingCollection>
            <telerik:SeriesMapping>
                <telerik:SeriesMapping.SeriesDefinition>
                    <telerik:BarSeriesDefinition  />
                </telerik:SeriesMapping.SeriesDefinition>
                <telerik:SeriesMapping.ItemMappings>
                    <telerik:ItemMapping DataPointMember="YValue" FieldName="Conteggio" />
                    <telerik:ItemMapping DataPointMember="XCategory" FieldName="Tipo" />
                </telerik:SeriesMapping.ItemMappings>
            </telerik:SeriesMapping>
        </telerik:SeriesMappingCollection>
    </telerik:RadChart.SeriesMappings>
</telerik:RadChart>

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 29 Mar 2013, 12:33 PM
Hi Dario,

You should use the LegendDisplayMode property of the BarSeriesDefinition. Setting it to DataPointLabel will color each bar in a category with a different color, even though they belong to the same series, as shown in this help topic.

Regards,
Ivan N.
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Dario
Top achievements
Rank 2
Answers by
Missing User
Share this question
or