Series and Legend Label in Chart/Aggregate example

2 posts, 0 answers
  1. Karlkim Suwanmongkol
    Karlkim Suwanmongkol avatar
    41 posts
    Member since:
    Aug 2012

    Posted 28 Jan 2010 Link to this post

    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
  2. Velin
    Admin
    Velin avatar
    391 posts

    Posted 03 Feb 2010 Link to this post

    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.
  3. DevCraft banner
Back to Top