I am using high chart for plotting dynamic graph. For this I am calling function to get the last data after 1000 ms. But the same code is shown on graph. alert also show the same data.
The code is
load: function() {
var series = this.series[0];
setInterval(function() {
<% Livedynamicgraph l = new Livedynamicgraph(); %>
var x = <%out.println(l.gettime()); %> ;
alert(x)
y = <%out.println(l.getresponsetime()); %>;
series.addPoint([x, y], true, true);
}, 1000);