Click or drag to resize

IChartTrendLine DisplayEquation Property

True if the equation for the trendline is displayed on the chart.
Examples
The following code illustrates how to display equation for IChartTrendLine object:
<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();</para><para>//Set equation in trendline</para><para>trendline.DisplayEquation = true;</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 DisplayEquation { get; set; }

Property Value

Type: Boolean
See Also