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
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