I think the following question (JQPlot auto refresh chart with dynamic ajax data) comes close to what I would like to achieve. Problem is that my knowledge of js is very limited so I find it very hard to understand.
The situation is like this: I plot a jqplot graph that is generated using a json file. I would like to update the graph without having to refresh the page. In order to plot the graph right I determin some parameters using php inside the javascript (such as the max and min limits for the xaxis and yaxis).
my (simplified) js to plot the graph looks like this:
var plot = $.jqplot('chartdiv', [<?php echo $alllines;?>] ,
{
seriesColors: ["#FAB534", "#9495E0", "#75E07E", "#F558F5", "#00EEFF", "#F558F5"],
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
tickInterval: '1 minute',
min:'<?php echo $startlimit ?>',
max:'<?php echo $endlimit ?>'
},
yaxis:{
tickInterval: 10,
min: <?php echo $ymin; ?>,
max: <?php echo $ymax; ?>,
},
},
});
how would I be able to rerender the graph wihtout a page refresh, considering that I also need to run some php to determin my json data using php?
thanks!