A trendline is a straight or curved line that graphically represents the general trend of the data points (section of a series (section In addition to specifying the data and formatting properties of the line, the trendline name and the trendline label can also be specified in the trendline.

A trendline is defined by a sequence of records that conforms to the SERIESFORMAT rule (section specified by the chart sheet substream (section ABNF that contains a SerAuxTrend record (section 2.4.250).

The following records and rules define the significant parts of a trendline:

  • The SeriesText record (section 2.4.254) in the first sequence of records that conforms to the AI rule (section specifies a custom trendline name to display in the legend (section

  • The sequence of records that conforms to the SS rule (section specifies the formatting properties of the trendline. The yi field of the DataFormat record (section 2.4.74) MUST specify the zero-based index of the Series record (section 2.4.252) associated with this trendline in the collection of all Series records in the current chart sheet substream. Each trendline MUST contain zero or one sequences of records that conform to the SS rule.

  • The SerParent record (section 2.4.255) specifies the series associated with the trendline.

  • The SerAuxTrend record specifies properties of the trendline, such as the trendline type and the number of periods to forecast forward and backward, and specifies properties of the content of the trendline label.

  • The LegendException record (section 2.4.153) specifies the formatting of the legend entry in the legend (section that corresponds to the trendline. This record is specified if the legend entry has been deleted or does not use the default formatting of the legend. When the legend entry has non-default formatting, the attached label (section that follows the LegendException record and Begin records (section 2.4.17) specifies the custom formatting of the legend entry.

The following restrictions apply to a trendline:

  • All fields except the cValx and cValy fields in the Series record (section 2.4.252) MUST be ignored. The cValy and cValx fields in the Series records MUST be greater than 0.

  • The BRAI records (section 2.4.29) in the sequence of records that conforms to the AI rule (section MUST be ignored and the ifmt field of the BRAI records MUST equal 0x0000.