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

labeling legend items

Thread ID:





95133 Jun 22,2010 01:33 PM UTC Jun 28,2010 11:41 AM UTC ASP.NET Web Forms (Classic) 4
Tags: Chart
Administrator [Syncfusion]
Asked On June 22, 2010 01:33 PM UTC

I am using the enclosed code (see snippet) to display an x-y graph. I can't seem to get the program to display the variable names in the graph legend. What am I doing wrong?

code snippet_203ba5df.zip

Jaffersathick B [Syncfusion]
Replied On June 23, 2010 04:23 AM UTC

Hi Jan stiff,

Thank you for using Syncfusion products.

We suggest you to use the Sereis.Text property Legend text and not to use LegendName property. If you like to change the Legend Items text name, then this can be achieved using the Legend items text property.
Please refer the following code snippet:
ChartSeries data = new ChartSeries();
// Setting the Series text will have the same name for Legend.
data.Text = "Series Text";
data.Type = ChartSeriesType.Scatter;
data.Style.Symbol.Size = new Size(10, 10);
data.ScatterConnectType = ScatterConnectType.Spline;


// Case 1:Customozing the Legend Items text. ) is the Item index
this.chartControl1.Legend.Items[0].Text = "Legend Text";

//Case 2: Customizing the Legend Items text in a event.
this.chartControl1.Legend.FilterItems += new LegendFilterItemsEventHandler(Legend_FilterItems);

void Legend_FilterItems(object sender, ChartLegendFilterItemsEventArgs e)
e.Items[0].Text = "Legend text";


Let me know if
it helps.


Administrator [Syncfusion]
Replied On June 25, 2010 03:49 PM UTC

I tried your suggestions but it doesn't seem to be working. No matter what I try, I can get symbols for each series in the legend, but can't seem to get the program to display a label for each symbol in the legend. Do you have any other suggestions?

I have included the actual routine where I build the charts. I currently have the legend turned off. But if I were to turn it back on, where would I put the instructions to make it display properly in this routine?

I am completely confused by this problem



Administrator [Syncfusion]
Replied On June 25, 2010 07:56 PM UTC

Ignore preceeding post. I stumbled across a way to get it to work. All I can say is: I guess they need to "dumb down" the documentation for some of us.

Jaffersathick B [Syncfusion]
Replied On June 28, 2010 11:41 AM UTC

Hi Jan stiff,

Thanks for the update.

We glad to know that the issue is resolved at your end. Thank you for your suggestion regarding the documentation of our controls.
Let me know if you have any other concerns.



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

or the page will be automatically redirected to 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