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

Message ListMessage List     Post MessagePost Message

  Simple test about the speedometer
Posted by Eason on Apr-24-2014 14:02
Attachments:
Hello,
Recently I heared the ChartDirector, and I decided to make some test about the realtime speedometer, to see if it can be used in my project. In the attachment, I define a buffer and want to see test if the speedometer can update every 2 seconds, but failed. So could you tell me what happened, I just can't understand.
Futhur more, do you have some ideas about how to apply it in a realtime speedometer model? The data comes from some sensors and stored in a large buffer in the programme.

Thankyou.
                                                                                               Eason
roundmeter.aspx
roundmeter.aspx

3.71 Kb

  Re: Simple test about the speedometer
Posted by Peter Kwan on Apr-25-2014 01:54
Attachments:
Hi Eason,

There are two issues in your code:

(a) You forget to include the ChartDirector Javascript library:

   <script type="text/javascript" src="cdjcv.js"></script>

(b) You have set the count to 0. So the count is always 0 in your code. Your code
increments the count, but it would not persist, because the Page object will be destroyed
immediately after the result is sent to the browser. When the next update comes, ASP.NET
will create a brand new Page object, and your code initialize the count to 0 again.

For testing, you may simply use the current second of minute modulo the buffer length as
the index. I have attached the modified code for your reference.

Hope this can help.

Regards
Peter Kwan
roundmeter.aspx
roundmeter.aspx

3.63 Kb