|
-
January 17th, 1999, 10:32 PM
#1
How to draw the Graph using VB?
Hi,
I have a problem as I do not know how to create a graph chart using VB. I have collected my data. How can I make use of these data that I collected to draw the graph. Pls share with me the way to do this. Basically I know that I know that I may have to use the MSCHART control or the Microsoft Graph 5.0. But I do not know how to do so.
Thanks for reading and helping.
Vivien Lee
-
January 18th, 1999, 11:03 AM
#2
Re: How to draw the Graph using VB?
As you told you have to use MSChart ActiveX control. MSchart control has got some properties that I will list down here.
Rows - No of Items in Y Axis
Columns - No of Items in X axis.
Column - Currently selected X axis element
row - Currentlt selected Y axis element.
You try the following code in your system
Place a MSChart Control in your form.
Rename MSChart1 to MyGraph.
Place a Command Button and rename as Submit
Dim rows as integer, cols as integer
Dim array(10) as integer
Dim counter as integer
Private Sub Form_activate()
rows = 5
cols = 10
counter = 0
MyGraph.rows= rows
MyGraph.Columns = cols
for counter = 0 to 10 step 1
array(counter) = 10 * counter
next
End Sub
Private Sub Submit_Click()
for counter = 0 to 10
Mygraph.row = counter
Mygraph.Column = counter '( Row 1, Column 1)
Mygraph.data = array(counter)
next
end Sub
You make changes as per your needs....
Wish you all the Best
Girish.S.
Project Manager
GuildSoft Pvt. Ltd.
-
January 18th, 1999, 11:23 AM
#3
Re: How to draw the Graph using VB?
Important.......
------------------------+
Instead of Columns and Rows you use RowCount and ColumnCount
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|