We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart Legend Labels

Thread ID:





88123 Jul 15,2009 07:29 PM UTC Jul 22,2009 07:01 AM UTC ASP.NET Web Forms (Classic) 1
Tags: Chart
Tom Foley
Asked On July 15, 2009 07:29 PM UTC

I have a simple table that contains two columns that I would like to display in a pie chart. How can I display the X axis label in the chart legend rather than the data value?

I attached a simple project that I am using for testing. Thanks for any help.


Saradha [Syncfusion]
Replied On July 22, 2009 07:01 AM UTC

Hi Tom,

Thanks for your interest in Syncfusion products.

We could use the Legend ItemTemplate and show the X, Y or the label values in the legend items.

Please refer to the sample from the below given link that has a DataTemplate written for legend items

In the DataTemplate DataPoint.Item is used to show the labels. Here you could also use DataPoint.X, or Y.

This DataTemplate is assigned to the legend in VB file as shown below.
objLegend.ItemTemplate = TryCast(Me.Resources("LegendTemplate"), DataTemplate)

Please let us know if you have further queries.

K. Saradha Devi


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon