Table of contents
Collapse the table of content
Expand the table of content

Trendline.DisplayRSquared Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

True if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). Read/write Boolean.


expression. DisplayRSquared

expression A variable that represents a Trendline object.


Setting this property to True automatically turns on data labels.


Note Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example displays the R-squared value and equation for trendline one of the first chart in the active document. You should run the example on a 2-D column chart that has a trendline for the first series.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Trendlines(1)

            .DisplayRSquared = True

            .DisplayEquation = True

        End With

    End If

End With

See also


Trendline Object

© 2018 Microsoft