--- a/viewcalls.php +++ b/viewcalls.php @@ -1,7 +1,16 @@ prepare('select distinct date_trunc(\'day\', call_timestamp) as rdate from recordings order by rdate'); + + $sth->execute(); + foreach( $sth->fetchAll() as $row) { +echo ''.$row['rdate'].'
'; +} + ?>
@@ -12,12 +21,19 @@ var options = { lines: { show: true }, points: { show: true }, - xaxis: { mode: "time" }, + xaxis : { + mode : 'time', + labelsAngle : 45 + }, selection : { mode : 'x', fps : 30 }, series: { lines: { show: true }, points: { show: true } - } + }, + mouse : { + track : true, + relative : true + } }; $(function () { // graph @@ -32,7 +48,7 @@ // Draw graph with new area graph = drawGraph({ - xaxis: {min:area.x1, max:area.x2}, + xaxis: {min:area.x1, max:area.x2, mode : 'time', labelsAngle : 45}, yaxis: {min:area.y1, max:area.y2} }); }); @@ -41,7 +57,7 @@ Flotr.EventAdapter.observe(placeholder, 'flotr:click', function () { drawGraph(); }); - getData('','',''); + getData('','',''); }); @@ -84,3 +100,4 @@ +