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

Series and Legend Label in Chart/Aggregate example

1 Answer 57 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Karlkim Suwanmongkol
Top achievements
Rank 1
Karlkim Suwanmongkol asked on 28 Jan 2010, 10:51 PM
Hi,
  I am trying to follow the example here, http://demos.telerik.com/silverlight/#Chart/Aggregates. I can link the RadGridView with RadChart fine.

However, sometime some column in my data might be empty string or null.

For example, in the http://demos.telerik.com/silverlight/#Chart/Aggregates, if any record does have an empty region or make data, the legend label will be something like "Series X" while the label on the X-Axis will be a number like 1.

Is there a way to change the series or legend label to show something like "N/A" instead?

I look at something like ItemLabelFormat, but I am not sure if that is the solution. Or I should replace empty string with "N/A" on ItemsSource itself?

Thanks,
karlkim

1 Answer, 1 is accepted

Sort by
0
Velin
Telerik team
answered on 03 Feb 2010, 08:09 AM
Hi Karlkim Suwanmongkol,

By default, the chart legend gets the name of the data series from the DataSeries.LegendLabel property when you manually populate the chart control. In data binding scenarios it is the SeriesMapping.Legendlabel which holds the legend label.

When using the grouping and aggregation functionality of RadChart the series are auto generated with legend label matching the value on which the data has been grouped.

Hope this will help.

Greetings,
Velin
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Chart
Asked by
Karlkim Suwanmongkol
Top achievements
Rank 1
Answers by
Velin
Telerik team
Share this question
or