Click or drag to resize

IChartLegendEntry IsDeleted Property

If true then this entry deleted. otherwise false.
Examples
The following code illustrates use of IsDeleted property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//Create a chartLegend</para><para>IChartLegend chartLegend = chart.Legend;</para><para>chartLegend.LegendEntries[0].Delete();</para><para>//True if the entry is deleted</para><para>bool isDeletedEntry = chartLegend.LegendEntries[0].IsDeleted;</para><para>if(isDeletedEntry){ //Your code here }</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
bool IsDeleted { get; set; }

Property Value

Type: Boolean
See Also