ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  realtime chart for VB6
Posted by jason on Oct-09-2018 19:00
hi

how to use real time chart that draws data from left to right for certain value of time.
graph will displayed for 30 minutes,it started by my own timer instead of system timer.

so when I click a start button it will start the timer and the graph following to that timer ( 1 sec interval). X axis label would be /minutes from 1 - 30.

when timer reached 30mins,graph stop drawing

thank you

  Re: realtime chart for VB6
Posted by Peter Kwan on Oct-10-2018 03:10
Attachments:
Hi Jason,

I think you have already tried the VB6 sample code, which includes a real time chart example. In that example, the data arrays are filled from the right to left. In your chart, you can always fill the data arrays from left to right instead, that is, the first data point is stored at index 0, the second at index 1, etc..

If your timer interval is 1 sec and you want to display 30 minutes of data, you can set the sample size to 1801. In your code, you can stop filling the data arrays when it is full.

I have attached a modified "frmRealTimeDemo.frm" example for your reference. You can use this file to replace the original frmRealTimeDemo.frm in the sample code. This modified example plots the chart from left to right, with 1 second per data point, and stops after 1801 points. The chart only starts only when you press the "Start" button.

Hope this can help.

Regards
Peter Kwan
frmRealTimeDemo.frm
frmRealTimeDemo.frm

8.34 Kb

  Re: realtime chart for VB6
Posted by jason on Oct-12-2018 18:36
thank you so much,

superb charts.
works like a charm, will do license buying really soon.

God bless you