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

How to change *only* legend names while preserving the default coloring scheme?

2 Answers 55 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Przemyslaw
Top achievements
Rank 1
Przemyslaw asked on 21 Jul 2010, 09:17 AM
Hi,

I display a number of series. I want to override the legend names and preserve the default coloring. When I set the UseAutoGeneratedItems to False and add ChartLegendItems then the colors for my series stop matching the colors in the legend. How to programatically change the legend names and only legend names?

Przemek

2 Answers, 1 is accepted

Sort by
0
Accepted
Giuseppe
Telerik team
answered on 21 Jul 2010, 03:28 PM
Hello Przemyslaw,

You can set the desired legend label for each series via the respective DataSeries.LegendLabel property (if you are building your series manually) or via the respective SeriesMapping.LegendLabel property (if you are using the chart databinding feature).

Hope this helps.


All the best,
Freddie
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Przemyslaw
Top achievements
Rank 1
answered on 22 Jul 2010, 08:11 AM
Hi Freddie,

thanks, of course this works now.

best regards, Przemek
Tags
Chart
Asked by
Przemyslaw
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Przemyslaw
Top achievements
Rank 1
Share this question
or