StatsLineColor Property
Syntax
object.StatsLineColor(LineNumber)
Applies To
Discussion
Many graphs can be enhanced by the addition of statistical lines. Use StatsLineColor to change the color of a statistical line. If the property is used without the Color parameter, the current color 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.
Default: 0
Parameters |
Description |
---|---|
LineNumber |
Required. Specifies which statistical line to reference: 1 = the minimum line 2 = the maximum line 3 = the mean or average line 4 = the standard deviation line 5 = the regression line 6 = the first user-created line 7 = the second user-created line Type: Integer |
Type
Integer
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