You may want to check the example below on how this is handled in Flot. Flot is an open-source plotting library based on jQuery, like jqplot. Both libraries are very similar.
This is how fetching and plotting the data with AJAX would look like in code:
function fetchData() {
$.ajax({
url: "json_fetch_new_data.php",
method: "GET",
dataType: "json",
success: function(series) {
var data = [ series ];
$.plot($("#placeholder"), data, options);
}
});
setTimeout(fetchData, 1000);
}
Make sure to check the following demo to see it in action:
For further information on Flot: