|
Combine Realtime Update and Zooming-Scrolling |
Posted by slaniwani on Feb-16-2011 18:59 |
|
Hi Peter,
thanks for your great help with my thread before : drop_down_list so select different metrics.
Iam on it but I didnt find my error, yet.
Now I found out that I have another problem with the Time Remaining and realtime Update function from the this sample code:
function updateDisplay()
{
// Utility to get an object by id that works with most browsers
var getObj = function(id) { return document.getElementById ? document.getElementById(id) : document.all[id]; }
// Get the configured update period
var updatePeriodObj = getObj("UpdatePeriod");
var updatePeriod = parseInt(updatePeriodObj.value);
// Subtract 1 second for the remaining time - reload the counter if remaining time is 0
if (!updatePeriodObj.timeLeft || (updatePeriodObj.timeLeft <= 0))
updatePeriodObj.timeLeft = updatePeriod - 1;
else
updatePeriodObj.timeLeft = Math.min(updatePeriod, updatePeriodObj.timeLeft) - 1;
// Update the chart if configured time has elasped
if ((updatePeriodObj.timeLeft <= 0) && window.JsChartViewer)
JsChartViewer.get('ChartImage1').partialUpdate();
// Update the display to show remaining time
getObj("TimeRemaining").innerHTML = updatePeriodObj.timeLeft + ((updatePeriodObj.timeLeft > 1) ? " seconds" : " second");
}
I want to use it to update it in my graphs from Zooming-Scrolling Demonstration.
I dont know what I have to change that it works.
There is no chart Image like "ChartImage1" in Zooming Scrolling Demonstration.
There are functions for partial Update, fullUpdate and in the html code is this:
<!-- ****** Here is the chart image ****** -->
%(viewer.renderHTML())s
How can I combine this methods?
I want that the Chart Image is being updated when the time is elapsed.
Brgds |
Re: Combine Realtime Update and Zooming-Scrolling |
Posted by slaniwani on Feb-16-2011 19:51 |
|
Sorry that I created this thread.
I came to the clue that it makes no sense to include the UpdatePeriod in the script.
If you want to have the current data, I can use the Pointer as well.
Because my query looks like :
between now() and now-30days....I always get the current data points.
I decided to seperate it into 2 scripts. |
|