Trendline Equation

R

RDK45

....I'm using OWC (Office 2000 version) to create some charts in web pages.
It is working fine and doing what I want!!

Well, almost ;-)

I just added some trendlines to a web chart with line type for markers only.
It automatically shows the trendline equation and will let me change the
font, color, .... However, it does not seem to have a property which will
allow me to get the equation text into a string variable so I can parse out
the coefficients.

The equation also falls directly on top of the trendline, making it very
difficult to read the coef and/or see the points. Is there a position
property for this element?

I'm also using the Spreadsheet control to manage my data. Assume the
following code works:

With CalibrationChart.Charts(0).SeriesCollection(0)
.SetData c.chDimSeriesNames, 0, "B1"
.SetData c.chDimXValues, 0, "A2:A52"
.SetData c.chDimYValues, 0, "B2:B52"
' add a trend line for this series
.Trendlines.Add
.Trendlines(0).HasAutoCaption = True
' set the legend caption for this line
.Trendlines(0).Caption = "Trend"
.Trendlines(0).IsDisplayingEquation = True
.Trendlines(0).IsDisplayingRSquared = True
' set the font for the equation to be bold
.Trendlines(0).DataLabel.Font.Bold = True
End With

What new code do I need to get the trendline text into a variable which I
can work with?

Thanks........RDK
 
T

Thao Moua [ms]

Sorry there is no way to reposition the trendline or parse the trendline text

Thao Mou
OWC Webchart Suppor

This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top