How to realy pause/stop FlotChart in real Time?

58 views
Skip to first unread message

Roberval Sena 山本

unread,
Jul 12, 2016, 10:25:15 AM7/12/16
to Flot graphs


I am working with FlotCharts, more specific with the real time one,

And I tried to stop it completely I mean "one real pause" , but I was only able do put the "update time"up to 2000ms...

Please, tell me that is possible to real stop it...Google was not that helpfull

Thanks!

Ced

unread,
Jul 12, 2016, 12:18:25 PM7/12/16
to Flot graphs
This isn't really a flot question.
Take a look at the documentation about timers.

You can cancel a timer using the clearTimeout function.

var timeoutID;
var UPDATE_INTERVAL = 2000;

// Click event handler for <button id="cancel-button">Cancel Timer</button>
$
("#cancel-button").on("click", function() {
  window
.clearTimeout(timeoutID);
}

function update() {
 
// Do something here
  timeoutID
= window.setTimeout(update, UPDATE_INTERVAL);
}

timeoutID = window.setTimeout(update, UPDATE_INTERVAL);


Roberval Sena 山本

unread,
Jul 20, 2016, 10:11:15 PM7/20/16
to Flot graphs
It works !!!


Thanks a lot!

[]S sena


Reply all
Reply to author
Forward
0 new messages