Articles in this section
Category / Section

How do I change text area color of legend in charts?

1 min read

You can change the text area color of legend in charts by using the following code snippets.

C#

// Adding a New chart to the Worksheet.
IChart chart = workbook.Charts.Add();
chart.Legend.TextArea.Color = ExcelKnownColors.Magenta;

 

VB

' Adding a New chart to the Worksheet.
Dim chart As IChart = workbook.Charts.Add()
chart.Legend.TextArea.Color=ExcelKnownColors.Magenta

 

Here is the sample for your reference:

Chart_Legend.zip

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied