Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,560 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,905 people online right now. Registration is fast and FREE... Join Now!




How to display moving Bar Graph in VB

 
Closed TopicStart new topic

How to display moving Bar Graph in VB

davkav
3 Apr, 2008 - 01:03 AM
Post #1

New D.I.C Head
*

Joined: 11 Mar, 2008
Posts: 35



Thanked: 1 times
My Contributions
I've been trying to get a bar graph to display in my VB6 program.

Basically i want to simulate a Tank filling up and emptying so for the moment i have a timer running on my computer which displays in

Mytext(1).text. I havent a clue where to start. Do i need to load these values into a grid or can i link the graph output directly to my text box value.

I wont post my code for the rest of the program becasue it has no relevance on this section of what im doing. Just that Mytext(1).text has a number constantly counting from 0 to 1000.
If someone could just point me in the right direction or have a good example to hand. Do i use MSChart or the likes...... crazy.gif
Thanks again guys.

This post has been edited by davkav: 3 Apr, 2008 - 03:28 AM
User is offlineProfile CardPM
+Quote Post

davkav
RE: How To Display Moving Bar Graph In VB
3 Apr, 2008 - 02:06 AM
Post #2

New D.I.C Head
*

Joined: 11 Mar, 2008
Posts: 35



Thanked: 1 times
My Contributions
okay so i got it working somewhat. Only thing is I want the graph to stay scaled on the y- axis from 0 to 5000. Instead the y-axis rescales with the increase from 0 to 5000. as in it scales from 0 to 1 then 0 to 100 then 0 to 1000 then 0 to 5000.

CODE

Dim arrData() As Double
  
    ReDim arrData(1)
    arrData(1) = mytext(1)
    
    MSChart1.ChartData = arrData


End Sub

User is offlineProfile CardPM
+Quote Post

davkav
RE: How To Display Moving Bar Graph In VB
3 Apr, 2008 - 03:27 AM
Post #3

New D.I.C Head
*

Joined: 11 Mar, 2008
Posts: 35



Thanked: 1 times
My Contributions
doh!! how stupid of me. Autoscale was set to 'On' in the properties box sad.gif
User is offlineProfile CardPM
+Quote Post

Closed TopicStart new topic
Time is now: 12/2/08 11:34PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month