TrendLine collection
Represents an individual trend line used to track trends in a data series graphically. Interactive Reporting supports trend lines modeled after linear regression analysis. Generally the trend line is represented as a slanted line that crosses the diagram. For example, the trend line can demonstrate an increase or decrease of values over time. It may be accompanied with the calculated goodness of fit (R-squared) value.
Trend lines can be layered on top of the chart graphics (or Z axis for 3 D charts), or positioned to the background. When data is processed to create the trend line, facts from all pages of the chart are included.
Trend lines are always fact based, and only one trend line can be associated with a single fact column. In Scatter and Bubble charts, the trend line is bound to the data series. Multiple trend lines can be created when multiple data series exist if the series has been populated by the Group By feature.
This example shows how to retrieve the label text of the trend line and display it in an Alert box:
Alert(ActiveDocument.Sections["Chart6"].TrendLines[1].GetLabelText())
This example shows how to set the trend line behind the chart elements, and set the trend line on the X axis.
ActiveDocument.Sections["Chart6"].TrendLines[1].DrawingOrder = 1 ActiveDocument.Sections["Chart6"].TrendLines[1].Axis = 1
GetLabelText([optional] Number z), GetRSquared[optional] Number z), Remove()
Read write: Axis as BqChartAxisType, DrawingOrder as BqDrawingOrder, FactIndex as Number, LabelFormat as String, LegendFormat as String, NumberFormat as String, ShowInLegend as Boolean, ShowLabel as Boolean
Style object, Font object