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

Bar Chart Legends

1 Answer 53 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Yehia
Top achievements
Rank 1
Yehia asked on 05 Dec 2011, 01:59 PM
I am creating a bar chart to display the frequency each item occurred in a data set .

The problem is that legend display the item name and on the chart the each bar has an ID I want to either add the ID to the legend or replace the Id with the Item name.

Thank you and Best Regards 
Yehia 

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 08 Dec 2011, 02:05 PM
Hello Yehia,

Did you try setting the DataLabelsColumn property of the Series? This property needs to be set to the name of the property that represents your item's name. The code below should help.

<telerik:RadChart runat="server" ID="radChart1">
  <Series>
    <telerik:ChartSeries Type="Bar" DataLabelsColumn="ProductName" DataYColumn="Value" Appearance-LegendDisplayMode="ItemLabels" />
  </Series>
</telerik:RadChart>

public class Product
{
  public string ProductName { get; set; }
  public double Value { get; set; }
}

This should display the item's name along with the bar.

Hope this helps.

All the best,
Petar Marchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Chart (Obsolete)
Asked by
Yehia
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or