javascript - Live realtime graph with Highstock, PHP and Mysql -
i working on web app , have no idea on how this, using highstock static charts, retrieve temperatures mysql database, , using php class myself designed send data through use of json javascript. know trying it's possible, there's jsfiddle example (http://jsfiddle.net/ovhb3jp1/) in highcharts webpage graphs random js generated data.
my guess have make js script retrieves temperatures php script , sends highstock script graphs, correct? how write such script? know lot of php , mysql, knowledge of js pretty vague, apreciated.
this existing js script
<script> $(function () { $('#container').highcharts('stockchart', <?php echo $chart; ?>); }); </script>
this part of class generates json $chart variable
function __tostring(){ $this->datos(); return json_encode($this->hs); }
the hs attribute of class array loaded parameters of highstock api, through above php code converted json , put above js script.
thanks!
Comments
Post a Comment