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

How to change legend entry ?

Thread ID:





93918 Apr 12,2010 12:46 PM UTC Apr 15,2010 06:38 AM UTC ASP.NET Web Forms (Classic) 3
Tags: XlsIO
Julian Bercovici
Asked On April 12, 2010 12:46 PM UTC


when i generate a chart and change the bars colors, the chart's legend changes as well.

I'm using the following command to change the colors of the bars:

ExcelStyle.Series[oDataSerie.Caption].DataPoints[j].DataFormat.Fill.ForeColor = oDataSerie.Color;

I would like to know if i'ts possible to edit the legend entries and captions so it will look like the original legend, or to prevent the change from happening all together.
I basically need to be able to change individual bars color in a chart without affecting the legend.

I've attached to the post two images, one is the default look with the original legend and the other is the colored one where the legend entries changed.



Sathish Babu R [Syncfusion]
Replied On April 13, 2010 11:52 AM UTC

Hi Lulian

Thank you for your interest on Syncfusion Products.

Changing the Chart’s bar color is also changes the color of the Legend which is the default behavior of Microsoft Excel. The Essential XlsIO providing the same feature like Microsoft Excel.

Please let us know if you have any questions.


Julian Bercovici
Replied On April 14, 2010 04:44 PM UTC


i don't mind it changing the legend entries color, my problem is that it changed the legend entries text, and added more entries then there were at the begining.

You can see in the "default.jpg" file attached to the original message that the legend has one entry called "OrderQty".
When i change the points color, you can see in the other file, "color.jpg", that the legend entry changed into five entries with different names.
I would like to be able to restore the original single entry with the original name, i don't mind the color since i changed it.

So, could it be done ?


Sathish Babu R [Syncfusion]
Replied On April 15, 2010 06:38 AM UTC

Hi Lulian,

Thank you for your interest in Syncfusion Products.

Suppose we collapsed the chart area. We are able to reproduce it to the original state. The sample is executed and it is recorded as video. Could you please see the below link.

Please let us know if you have any questions.




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