ValuesAutoFit Property
Sets or returns whether value labels fit within
graph bars and pie segments.
Syntax
object.ValuesAutoFit
Applies To
Discussion
When creating graphs, you can optionally display the associated numerical values inside the bars or pie sections. Set the ValuesShown property to True to display such values. Set this property to True to automatically adjust the value labels to fit the available bar or pie width. ValuesAutoFit uses the specified font but adjusts the size as required to make values fit. (The largest size it uses is the specified font size.) If set to False, the default font size may cause the value to overwrite bars and other labels.
Default: True
Type
Boolean
Access
Read/Write (Graph)
Write (Graphs)
Example
This example sets the first graph object of the active report to a horizontal simple bar chart and sets the properties for the values shown on the bars.
Sub Main
Dim objPPRep as Object
Dim objPPGraph as Object
Set objPPRep = GetObject(,"CognosPowerPlay.Report")
Set objPPGraph = objPPRep.Graphs.Item(1)
With objPPGraph
.SetType 3,0,0
.ValuesShown = True
.ValuesPosition = 0
.ValuesAutoFit = True
.ValuesFontColor = 10
.ValuesFontSize = 10
.ValuesFontName = "Times New Roman"
End With
Set objPPGRaph = Nothing
Set objPPRep = Nothing
End Sub