Click or drag to resize

IChartLegend Clear Method

Clears chart legend.
Examples
The following code illustrates how to use the Clear method for legend of chart:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Clears the legend of chart</para><para>worksheet.Charts[0].Legend.Clear();</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
void Clear()
See Also