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

Charts Item Label

1 Answer 60 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 19 Jan 2011, 03:27 AM
Good Day;

There any way to concatenate 2 values in the Item Label, for example
5320
78%

The percentage value is the result of the same data.
Greetings
Carlos

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 24 Jan 2011, 02:49 PM
Hi Carlos,

To be able to show the YValue and the percentage of this value in one and the same Series item Label you can use the following approach:
Assuming that your chart is databound you should wire the ItemDataBound event, retrieve the ChartSeriesItem and customize it as per your requirements:
protected void RadChart1_ItemDataBound(object sender, ChartItemDataBoundEventArgs e)
   {
       ChartSeriesItem item = e.SeriesItem;
       DataRowView dataItem = (DataRowView)e.DataItem;
       item.Label.TextBlock.Text = dataItem["QuantityInStock"].ToString() + " " + "#%";
   }

QuantityInStock is the name of the property used for databinding the chart as shown in our help article. The "#%" is one of the DefaultLabelValues that can be used with RadChart.

Regards,
Evgenia
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Chart (Obsolete)
Asked by
Carlos
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or