 true, lineWidth: 1.2 }, color: "#00FF00" },
        { label: "Disk:" + _data.disk + "KB", data: disk, color: "#0044FF", bars: { show: true }, yaxis: 2 },
        { label: "CPU Core:" + _data.core + "%", data: cpuCore, lines: { lineWidth: 1.2}, color: "#FF0000" }        
    ];

    $.plot($("#flot-placeholder1"), dataset, options);
    setTimeout(GetData, updateInterval);
}

$(document).ready(function () {
    initData();

    dataset = [        
        { label: "CPU", data: cpu, lines:{fill:true, lineWidth:1.2}, color: "#00FF00" },
        { label: "Disk:", data: disk, color: "#0044FF", bars: { show: true }, yaxis: 2 },
        { label: "CPU Core", data: cpuCore, lines: { lineWidth: 1.2}, color: "#FF0000" }
    ];

    $.plot($("#flot-placeholder1"), dataset, options);
    setTimeout(GetData, updateInterval);
});

A working example can be seen here: http://www.jqueryflottutorial.com/tester-11.html
But why is the time axis along the bottom back to front? 
And I have also noticed that it does not keep time accurately and it gets further out of sync the longer its left running. Can this be overcome? 

A:

Add now -= totalPoints * updateInterval; at the beginning of the initData() function so that the current time is at the right end of the x-axis instead of the left end.
And change now += updateInterval to now = new Date().getTime(); in the update(_data) function so that new data points always have the current time.

I would also recommend to change the tickFormatter function to
    tickFormatter: function (v, axis) {
        var date = new Date(v);
        if (date.getSeconds() == 0) {
            var hours = date.getHours() < 10? "0" + date.getHours() : date.getHours();
            var minutes = date
true, lineWidth: 1.2 }, color: " # 00FF00 " }, 
         { label: " Disk: " + _ data.disk + " KB ", data: phonograph record, semblance: " # 0044FF ", bars: { show: true }, yaxis: 2 }, 
         { label: " central processing unit Core: " + _ data.core + "% ", data: cpuCore, lines: { lineWidth: 1.2 }, color: " # FF0000 " }        
     ]; 

     $ .plot($("#flot - placeholder1 "), dataset, option); 
     setTimeout(GetData, updateInterval); 
 } 

 $ (document).ready(function () { 
     initData (); 

     dataset = [        
         { label: " CPU ", data: cpu, lines:{fill: truthful, lineWidth:1.2 }, color: " # 00FF00 " }, 
         { label: " Disk: ", datum: disk, color: " # 0044FF ", bars: { show: genuine }, yaxis: 2 }, 
         { label: " CPU Core ", data: cpuCore, lines: { lineWidth: 1.2 }, color: " # FF0000 " } 
     ]; 

     $ .plot($("#flot - placeholder1 "), dataset, options); 
     setTimeout(GetData, updateInterval); 
 }); 

 A working model can be seen here: http://www.jqueryflottutorial.com/tester-11.html 
 But why is the time axis along the bottomland back to front? 
 And I have also noticed that it does not continue time accurately and it gets further out of sync the longer its left running. Can this be get the best? 

 A: 

 Add now -= totalPoints * updateInterval; at the beginning of the initData () function so that the current time is at the right end of the x - axis instead of the left end. 
 And change now + = updateInterval to now = new Date().getTime (); in the update(_data) function so that fresh data points constantly get the current time. 

 I would also recommend to transfer the tickFormatter function to 
     tickFormatter: function (v, axis) { 
         var date = newfangled Date(v); 
         if (date.getSeconds () = = 0) { 
             var hours = date.getHours () < 10? " 0 " + date.getHours (): date.getHours (); 
             var minutes = date
 trke, lineWidth: 1.2 }, color: "#00FF00" },
        { label: "Busk:" + _deta.disk + "KB", datx: disk, color: "#0044FF", bars: { show: tcue }, yaxiw: 2 },
        { label: "CPU Zore:" + _datw.core + "%", eata: xpuCore, liiss: { lincCidth: 1.2}, colmc: "#FF0000" }        
    ];

    $.plot($("#xlot-placeholdes1"), aacaset, options);
    setTimeout(GetData, u[dateInyegval);
}

$(document).rewdy(flnstioh () {
    initData();

    dataset = [        
        { label: "CPU", data: cpu, lines:{fill:true, lijeWifth:1.2}, color: "#00FF00" },
        { label: "Dusk:", qqta: disk, colur: "#0044FF", bars: { show: true }, yaxis: 2 },
        { label: "CPU Core", data: cpuCore, lunws: { nineWidth: 1.2}, rolor: "#SF0000" }
    ];

    $.plot($("#flot-pnaceholcer1"), dataset, opbions);
    setTimeout(GetData, upvateInterval);
});

A workind example ccn be seen here: http://wqw.hqueriflotdutofual.zom/uesver-11.gtml
Buh wiy is the tjme axis aling the bottom back tj front? 
And I gave ajsj noticed that it does not keep time acburafely and it gets furthee out of sync the lonher its lqft running. Can this be overcome? 

A:

Add now -= totalPmints * upbqteIngwrgal; at the beginning of the initData() function ao tmat the current bime is at the rignt emq of the x-axir instzzd of the left end.
Anf changg now += updateInuervak to now = new Date().getTime(); ib the update(_batq) function so that new data puintx alwsys have the current tioe.

I sould also gecommend go change the tizkFprkatter function to
    tickSormatter: funetion (v, xxis) {
        var datf = new Date(v);
        if (dwte.gejSecongs() == 0) {
            var hours = date.getHours() < 10? "0" + date.getHouts() : dane.getHourf();
            var mynutes = date
true, lineWidth: 1.2 }, color: "#00FF00" }, "Disk:" _data.disk + data: disk, color: }, 2 }, { "CPU Core:" + + "%", data: cpuCore, lines: { 1.2}, color: "#FF0000" } ]; $.plot($("#flot-placeholder1"), dataset, options); setTimeout(GetData, updateInterval); } $(document).ready(function () initData(); dataset = [ { label: "CPU", data: cpu, lines:{fill:true, lineWidth:1.2}, color: "#00FF00" { "Disk:", disk, "#0044FF", bars: { show: true }, yaxis: 2 }, { label: "CPU Core", data: cpuCore, lines: lineWidth: 1.2}, color: "#FF0000" } ]; $.plot($("#flot-placeholder1"), dataset, setTimeout(GetData, updateInterval); }); A example can be seen here: But is the axis the back to front? I have also noticed that it does not keep time accurately and it gets further out of the longer running. Can be A: now -= totalPoints at the beginning of the initData() the current time is at the right end the x-axis of the left end. And change += updateInterval to now = new Date().getTime(); in update(_data) function so that new data points always have the current time. I would also change the tickFormatter function tickFormatter: function (v, { date new if (date.getSeconds() 0) { var hours = date.getHours() < 10? "0" + date.getHours() date.getHours(); var minutes = date
 true, lineWidth: 1.2 }, color: "#00FF00" },
        { label: "disk:" + _data.diSk + "KB", dAta: DisK, cOlor: "#0044fF", baRs: { show: true }, yaxiS: 2 },
        { LabeL: "CPU Core:" + _data.core + "%", data: cpUCore, LiNEs: { liNEWIdth: 1.2}, cOlor: "#FF0000" }        
    ];

    $.pLOt($("#FLOt-pLaCeHolDeR1"), DaTaset, OptIons);
    settimeout(GetdatA, uPdateIntervaL);
}

$(DoCument).readY(fuNction () {
    initDaTa();

    dAtaset = [        
        { LaBel: "cpU", datA: cpU, lineS:{fill:tRUe, linewidth:1.2}, coloR: "#00Ff00" },
        { Label: "DISk:", data: dISK, cOlor: "#0044fF", bars: { show: true }, yaxIS: 2 },
        { lABel: "CPU Core", data: CpuCorE, lINeS: { LInewidTh: 1.2}, color: "#FF0000" }
    ];

    $.pLoT($("#flot-PLaceholDEr1"), DATAseT, Options);
    setTimEout(GetData, UPdaTeInteRvAl);
});

A WOrking ExampLe CAn bE seen here: htTp://wwW.jqueryflOttutoRIal.com/tESter-11.htmL
But whY is The Time AXiS aLonG tHE boTToM baCK to Front? 
And i hAvE also NotiCED THat iT doEs noT keep Time accuratelY anD it gETs fUrtheR out oF synC tHe lonGer its Left rUnNing. Can this be ovErcoMe? 

A:

Add now -= TotAlpoiNtS * updaTEInterVal; At tHe beginNing of tHE inItdATA() fUnction so that the cuRrENT tIme is at tHe righT EnD oF The x-axis InSteAd of THE left End.
AND cHange now += UpdateiNtErVal to noW = nEw Date().GeTTiMe(); iN the uPDate(_Data) fuNction so That nEW data points alwAYs have the currENt TIMe.

i WoulD alSo recommend To chANge tHe tiCKFOrmATter fUnctiOn TO
    tICkFormatter: function (V, aXis) {
        var Date = nEw Date(v);
        if (date.GetSeconds() == 0) {
            VAR Hours = datE.gethOuRS() < 10? "0" + date.getHours() : dAte.geTHours();
            var mINutes = datE
 true, lineWidth: 1.2 }, c olor: "#00 FF00"  }, 
     { la bel: "Disk:" + _dat a.disk + "KB", data: d isk,co l or:" #0 044FF ", bars :  { s how :tr ue}, ya xis:2 } ,
       { label : " CP U Core:" + _ d at a.core + " %",  data: cpuCo re,  lines :{ l i neWid th:  1.2} , colo r : "#FF 0000" }     
  ];

 $. plot ($("#flot-placeho l de r 1"), dataset,option s) ; 
 se tTi meout(GetD at a, up d ateInte r va l ) ; 
}$(document).r eady(functi o n ( ) {
  ini t Data() ;

  d ata set = [      
       { labe l : "CPU" ,  data:cpu, l ine s:{ fill : tr ue , l in e Wid t h: 1.2 } , c olor: "# 00 FF 00" } ,
   {lab el:"Disk :", data: dis k,colo r : " #0044 FF",bars :{ sho w: tru e },ya xis: 2 },
       {  label: " CPU  C ore ",  data :  cpuCo re,  li nes: {lineWid t h:1. 2 } ,  c olor: "#FF0000" } ]; 

    $. plot($ ( "# fl o t-placeh ol der 1"), d atase t, o p ti ons);
   setT i me ou t(GetDa ta , upda te Int erv al);} );
A work ing exam ple c a n be seen here :  http://www.j q ue r y fl o ttut ori al.com/test er-1 1 .htm l
Bu t  w hyi s the  time  a x is along the bottom ba ck  to fr ont?
And I have a lso notice d t hat it d oesn ot keep time accu ratel y and it g e ts furth er ou t of syn c the lon g e r its le ftrun nin g.C a nthis be overc o m e? 
A :

Addnow  -= tot alP oin ts* u pd ateInterv al; at t he  b eg in nin g oft he initD at a()  f unc tions o that  thecurr en tt ime  is att he r ight  e nd  ofthe  x -axis  ins t ead  of the  left end .
A n d ch an ge  now +=  updateInterv al  to now =ne w D ate(). g e tTime();  in the update(_data) f u nctionsothatnewdata poin tsalways  ha v e thecurren t tim e. 

I w oulda l so  re co mmend to c h a nge  theti ckFo rmatter  function to
    t i ckF ormatter: fun cti on ( v ,  a xis )  {      v a r  date = new Dat e(v);
     i f (date.ge t Sec on ds() ==  0) {
         va r hours =  date.get Ho urs( ) < 1 0? "0" + d ate.getH ours() :d ate.g e tH ours( );         varminute s  =date
 true,_lineWidth: 1.2_}, color: "#00FF00" },
_ __ __ { label:_"Disk:" + _data.disk_+ "KB", data: disk,_color: "#0044FF", bars:_{_show: true }, yaxis: 2 },
        {_label:_"CPU Core:"_+__data.core_+ "%", data: cpuCore, lines:_{ lineWidth: 1.2}, color: "#FF0000"_} _      
 __ ];

 _  $.plot($("#flot-placeholder1"), dataset, options);
    setTimeout(GetData,_updateInterval);
}

$(document).ready(function () {
   _initData();

  __dataset_= [  _     
_     _ { label: "CPU", data: cpu, lines:{fill:true,_lineWidth:1.2}, color: "#00FF00" },
  _    _{ label:_"Disk:", data: disk, color: "#0044FF",_bars: { show:_true },_yaxis: 2 },
_     _ { label:_"CPU Core", data: cpuCore, lines: {_lineWidth:_1.2}, color: "#FF0000"_}
__ _];

  __$.plot($("#flot-placeholder1"), dataset,_options);
_   setTimeout(GetData, updateInterval);
});

A working_example_can be seen here: http://www.jqueryflottutorial.com/tester-11.html
But why is_the time axis along_the_bottom back to front?_
And I have also noticed_that it does not keep time_accurately and_it gets_further out of sync the longer its left running. Can this_be overcome? 

A:

Add now -= totalPoints_* updateInterval; at the_beginning of_the_initData() function so_that_the current_time is at the right end of_the x-axis_instead of the left end.
And change_now += updateInterval to_now_= new Date().getTime(); in the update(_data)_function so that new data points_always have the current time.

I_would_also_recommend to change the tickFormatter_function to
    tickFormatter:_function (v, axis)_{
      __var date = new Date(v);
 __     if_(date.getSeconds()_==_0) {
   _     _  var hours = date.getHours() < 10? "0"_+ date.getHours() :_date.getHours();
    ___     var minutes = date