Guest User

Untitled

a guest
Jul 13th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         chart = new Highcharts.Chart({
  2.             chart: {
  3.                 renderTo: 'container',
  4.                 type: 'spline',
  5.                 marginRight: 10,
  6.                 events: {
  7.                     load: function() {
  8.    
  9.                         // set up the updating of the chart each second
  10.                         var series = this.series[0];
  11.                         setInterval(function() {
  12.                             var x = (new Date()).getTime(), // current time
  13.                             $.get("../api/?action=getStat&stat=queueSize&apikey=<?php echo $apikey; ?>&userid=<?php echo $userid; ?>",function(data){
  14.                                 alert("FDSDFS");
  15.                             },"text");
  16.                                 y = 15;
  17.                             series.addPoint([x, y], true, true);
  18.                         }, 1000);
  19.                     }
  20.                 }
  21.             },
Add Comment
Please, Sign In to add comment