Bar Chart Legends

Thread is closed for posting
2 posts, 0 answers
  1. Yehia
    Yehia avatar
    1 posts
    Member since:
    Dec 2011

    Posted 05 Dec 2011 Link to this post

    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 
  2. Petar Marchev
    Petar Marchev avatar
    1029 posts

    Posted 08 Dec 2011 Link to this post

    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">
        <telerik:ChartSeries Type="Bar" DataLabelsColumn="ProductName" DataYColumn="Value" Appearance-LegendDisplayMode="ItemLabels" />

    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
Back to Top