Click or drag to resize

IChartTrendLine NameIsAuto Property

Indicates if name is default.
Examples
The following code illustrates how to check whether the IChartTrendLine object name is default or not:
<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 Get chart serie</para><para>Chart chart = worksheet.Charts.Add(ExcelChartType.ColumnClustered);</para><para>chart.DataRange = worksheet.Range["A1:C3"];</para><para>IChartSerie serie = chart.Series[0];</para><para>//Get chart trendlines collection and Add trendline</para><para>IChartTrendLines trendLines = serie.TrendLines;</para><para>IChartTrendLine trendline = trendLines.Add(TrendLineType.Logarithmic);</para><para>//Set trendline name</para><para>trendline.Name = "Trendline 1";</para><para>//Check trendline name is automatic</para><para>Console.WriteLine(trendline.NameIsAuto);</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 NameIsAuto { get; set; }

Property Value

Type: Boolean
See Also