As you can see above, we've added the data stamp as time, which is 13:43:45 in this example. Every 90 seconds, the chart will now call the following URL:
DataProviderPage.aspx?FCTimeIndex=35454&dataStamp=13:43:45
Here, you can see that dataStamp has been added to the URL. FCTimeIndex is just a parameter added by the chart to avoid caching.
Your code in DataProviderPage.aspx can now request this data stamp and then provide the values occurring after this time. Additionally, after providing the 9 values (for last 90 seconds) your DataProviderPage.aspx will need to update the data stamp by providing the time of the last CPU reading. So, the data output by DataProviderPage.aspx will read something as:
&label=13:43:55,13:44:05,13:44:15,13:44:25,13:44:35,13:44:45,13:44:55,13:45:05,13:45:15|
value=34,23,65,34,23,65,34,45,34&dataStamp=13:45:15
In the above output, we're providing:
- Label for the 9 values
- Value for the same
- Updated data stamp, which is date/time of the last value provided in this update
Once this update reaches the chart, it will update itself to plot the 9 new values and will also update its data stamp. Next time when the chart invokes DataProviderPage.aspx, it will invoke the following URL:
DataProviderPage.aspx?FCTimeIndex=37564&dataStamp=13:45:15
Note how the datastamp has been updated to the one specified by real-time update. This helps constantly update the data stamp and thereby, keep a track of the last data sent to chart.
|