Category / Section
How do I change text area color of legend in charts?
1 min read
You can change the text area color of the 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: