• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

Chart

I have a constant stream of numbers going into a listbox.
Could anyone kindly give me some code to graph those numbers and show them like a cardiograph screen
0
leachim
Asked:
leachim
  • 9
  • 9
1 Solution
 
Maxim10553Commented:
the best way to do this would be to create the basic graph in Excel, use Excel'S COM to update the graph
dynamically according to your input, and view the updated graph in an OLE container on your VB app.
0
 
Maxim10553Commented:
hey, why did you change your name and post this question again? you could of just added added comments to your original question. unbelivable. for experts the original question is here. this is a dup

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20129440&jsessionid=64578989954224301
0
 
leachimAuthor Commented:
Maxim i have drawn an ole object on the form then browsed to my xl.app which has a cell that recieves  a stream information plots it to a chart but when i run the form it shows only the last update it doesnot  update
where am i going wrong?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
leachimAuthor Commented:
Maxim i have a colleague i suspect is using the same medium for our ongoing problem
sorry to have inconvenienced you
0
 
Maxim10553Commented:
dim xl as excel.application
use this code as a template, you will need to change the values, hope this helps

'open
set xl = createobject("excel.application")
xl.Workbooks.Open "C:/Temp.xls"

'create the link to your ole container and the excel graph
OLE1.CreateLink "C:/Temp.xls", "chart1"

'do this for the cells you need to update
xl.workbooks("temp.xls").worksheets("sheet1").cells(1,1) = yourstreaminput
0
 
leachimAuthor Commented:
Maxim it works lovely thanks but it answers only part of my question
my quest is to manipulate the graph so as to achieve a hospital cardiograph visual effect
sadly the graph in xl does not achieve this for me
could i ask you for any more pointers
Thanks for your help so far
0
 
Maxim10553Commented:
Looked around for an ocx you could possible use, the only one i found was here http://adcsoft.hypermart.net/products/infoscope/screenshots.shtml but you need VC++ installed. I think you could acutally create the cardigraph in Excel, and actually simulate the data constantly changing.
0
 
leachimAuthor Commented:
Maxim we dont have vc++ installed so will call it quits for now
much appreciation to you for ongoing help
0
 
Maxim10553Commented:
leachim, i have done my best to answer your question. Unless you build a custom Active Control in VB to simulate a cardiograph or build a plotted grid in Excel to call from your application, there really is no way around this.
0
 
leachimAuthor Commented:
Maxim thanks for your hard work on my behalf
what i will do now is search for a book on the subject and take it from there a book that shows how to manipulate pic.line  x1 blah blah etc.
thanks again
0
 
Maxim10553Commented:
if i get a chance today i will try to simulate a cardiograph in excel. I believe you want the graph to represent a constant stream similar to the cardiographs in hospitals, correct?
0
 
leachimAuthor Commented:
THATS CORRECT I WOULD BE VERY GRATEFUL
0
 
Maxim10553Commented:
hey, can you give me some sample data from your input stream that you want plotted. it would help me greatly, and please label the data, thanks
0
 
leachimAuthor Commented:
Maxim i have data coming in very quickly to a textbox
the values have a margin of 2 up and 2 below
the figures coming in are floating point between 0.5 and 9
Thanks again
0
 
Maxim10553Commented:
ok i have some working code, last thing i need to know is how the data is coming in. You have 2 streams right? give me the code for the data coming in and sample values and i will implement them in my code and give it to you.
0
 
leachimAuthor Commented:
Maxim i am so grateful for your help
I have only one stream of data coming in and in comes into a textbox at the rate a thousand a second
Draw a text box and
set this timer to 1

Private Sub Timer1_Timer()
text1.Text = Rnd * (9)
End Sub

Thanks again
0
 
Maxim10553Commented:
just tested it and found out it is defintely too much data being processed for VB/Access to handle. Updating the graph every 1/1000 of a second will cause it to flicker way too much. If you are going to do this with VB and Excel you need to slow the data coming in down to maybe to 10 new values a second instead of 1000, sorry, i can still give you the source if you want it.
0
 
leachimAuthor Commented:
Maxim i am much obliged for your time and research
gratitude and thanks from
leachim and colleagues
0
 
costelloCommented:
Force accepting Maxim's answer.

costello
Community Support Moderator @ Experts-Exchange
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 9
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now