Click or drag to resize

IChartSerie TrendLines Property

Represents serie trend lines collection. Read only.
Examples
The following code illustrates how IChartTrendLines collection can be accessed from a particular IChartSerie:
<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</para><para>IChart chart = worksheet.Charts.Add();</para><para>//Set range</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set trend line</para><para>IChartTrendLines trendLines = chart.Series[0].TrendLines;</para><para>IChartTrendLine trendLine = trendLines.Add(TrendLineType.Linear);</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
IChartTrendLines TrendLines { get; }

Property Value

Type: IChartTrendLines
See Also