jquery - JQPlot replot with meter -
i need getting replot method work.
i have simple script , doesn't update needle. i've 'dumbed' down hard coded change onload of '1' update of '3'. update doesn't change meter.
$(function(){ var usageplot = $.jqplot('usagemeter',[[1]],{ options dont matter} }); function networkrefresh() { usageplot.data=[[3]]; usageplot.replot(); } var gn = setinterval(networkrefresh,2000); }
and
<div id="usagemeter"></div>
markup
it renders 1 value corectly, networkrefresh updates 2 seconds later. don't redraw. remains @ 1.
what missing?
i able find user similar issue , answer: reuse jqplot object load or replot data
need shove series value in like:
usageplot.replot({data:[[3]]});
in replot call instead of in data call itself.
Comments
Post a Comment