StatsLineOn Property
Syntax
object.StatsLineOn(LineNumber)
Applies To
Discussion
Many graphs can be enhanced by the addition of statistical lines. Use StatsLineOn to pick the types of statistical lines to turn on or off. If the Switch property is used without the parameters, the current Boolean value is returned.
Up to three lines can be added, as determined by the StatsLineOn property.
The applicable graph types are simple bar, clustered bar, correlation, simple line, multiple line, and scatter.
Parameters |
Description |
---|---|
LineNumber |
Required. Specifies which statistical line to reference: 1 = minimum: a line that spans across the minimum value 2 = maximum: a line that spans across the maximum value 3 = mean: a line that spans across the average value 4 = standard deviation: two lines spanning pre-defined deviants from the mean 5 = regression: a logarithmic regression line 6 = the first user-created line 7 = the second user-created line Type: Short |
Return Type
Long
Access
Read/Write
Example
This example sets the first Graph object to the clustered bar type and displays a custom statistical line. The custom line is referred to as the Limit, and it is set to 100,000.
Sub Main()
Dim objPPRep As Object
Dim objPPGraph As Object
Set objPPRep = GetObject(, "CognosPowerPlay.Report")
Set objPPGraph = objPPRep.Graphs.Item(1)
With objPPGraph
.SetType 4,1,1
.StatsLineOn 6,True 'custom line
.StatsLineColor 6,2 'green
.StatsLineStyle 6,1 'dashed style
.StatsLineUserValue 6,100000
.StatsLineCaption 6,"Limit"
End With
Set objPPGraph = Nothing
Set objPPRep = Nothing
End Sub