Article ID: 112650
Article Last Modified on 1/8/2003
NumSets = (Number of Bars) * (Sections on a Bar)or
NumSets = NumPoints * (typically 2)To make the graph more readable, you can set the range of the horizontal axis using YAxisStylealong with YAxisMax. To place tick marks, use YAxisTicks. To clear previous data assigned to the graph, use DataReset.
| 5 7 11
1 | [------------]<-------------->
|
| 6 8 15
2 | [-----------]< --------------------->
|
|__________________________________________________
Make the following assignments:
Graph1.ThisSet = 1 ' Beginning of intervals Graph1.GraphData = 5 Graph1.GraphData = 6 Graph1.GraphData = 7 Graph1.GraphData = 8 Graph1.ThisSet = 2 ' End of intervals Graph1.GraphData = 7 Graph1.GraphData = 8 Graph1.GraphData = 11 Graph1.GraphData = 15After assigning values to the graph, set the GraphType to 5 to indicate a Gantt chart, and set GraphStyle to 1 if you want spaced bars. Set DrawMode to 2 and DrawStyle to 1 if you want color.
Sub Form_Load ()
Graph1.NumSets = 4
Graph1.YAxisStyle = 2
Graph1.YAxisMax = 20
Graph1.YAxisTicks = 10
Graph1.DataReset = 1
End Sub
Sub Graph1_Click ()
Graph1.ThisSet = 1 ' Set starting values for bar sections
Graph1.GraphData = 5 ' Left half
Graph1.GraphData = 6
Graph1.GraphData = 7 ' Right half
Graph1.GraphData = 8
Graph1.ThisSet = 2 ' Set ending values for bar sections
Graph1.GraphData = 7 ' Left half
Graph1.GraphData = 8
Graph1.GraphData = 11 ' Right half
Graph1.GraphData = 15
Graph1.GraphType = 5
Graph1.GraphStyle = 1
Graph1.DrawMode = 2
Graph1.DrawStyle = 1
End Sub
Additional query words: 3.00
Keywords: KB112650