Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to show a line graph which the data is run time..

Status
Not open for further replies.

andi21

Junior Member level 1
Joined
Mar 26, 2010
Messages
15
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Location
indonesia
Activity points
1,374
dear all master...:D

i have a problem in vb

I have a run time data (from micro), and I upload the data into a line graph in vb, and store the data into Ms.Access..

my problem is, in this program, if my data more than 20,it will be unread..
I want to make the X axis is flexible..
ex:
if the sample data only 15,so the X axis is 15
if the sample data 200, so the X axis is 200
can anyone help???

-----------------------------------------------


here is my simple graph :

Private Sub Form_Load()
Dim i As Integer
Dim x As Single
Dim y As Single

Picture1.Scale (0, 20)-(20, 0)

' Draw X axis.
Picture1.Line (-10, 0)-(10, 0)
For i = -20 To 20
Picture1.Line (i, -20)-(i, 20)
Next i

' Draw Y axis.
Picture1.Line (0, -10)-(0, 10)
For i = -20 To 20
Picture1.Line (-20, i)-(20, i)
Next i

Picture1.ForeColor = vbBlue
x = 0
y = x + 1
Picture1.CurrentX = x
Picture1.CurrentY = y
For x = 0 To 10 Step 0.25
y = x + 1
Picture1.Line -(x, y)
Next x

End Sub

----------------------------------------------
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top