[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Chart

Posted on 2001-06-04
19
Medium Priority
?
238 Views
Last Modified: 2010-05-02
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
Comment
Question by:leachim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 9
19 Comments
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6152774
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
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6152811
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
 

Author Comment

by:leachim
ID: 6152819
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:leachim
ID: 6152882
Maxim i have a colleague i suspect is using the same medium for our ongoing problem
sorry to have inconvenienced you
0
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6152890
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
 

Author Comment

by:leachim
ID: 6152920
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
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6152975
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
 

Author Comment

by:leachim
ID: 6152997
Maxim we dont have vc++ installed so will call it quits for now
much appreciation to you for ongoing help
0
 
LVL 3

Accepted Solution

by:
Maxim10553 earned 200 total points
ID: 6156194
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
 

Author Comment

by:leachim
ID: 6156228
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
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6156265
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
 

Author Comment

by:leachim
ID: 6156303
THATS CORRECT I WOULD BE VERY GRATEFUL
0
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6156430
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
 

Author Comment

by:leachim
ID: 6156486
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
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6161364
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
 

Author Comment

by:leachim
ID: 6162732
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
 
LVL 3

Expert Comment

by:Maxim10553
ID: 6164373
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
 

Author Comment

by:leachim
ID: 6167697
Maxim i am much obliged for your time and research
gratitude and thanks from
leachim and colleagues
0
 

Expert Comment

by:costello
ID: 6400316
Force accepting Maxim's answer.

costello
Community Support Moderator @ Experts-Exchange
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question