Creating Dashboards Using Google Charts. PHP, and MySQL Database (Subtitles Added)

I recommend you turn on the Subtitles for understanding better.

Similar Posts

35 thoughts on “Creating Dashboards Using Google Charts. PHP, and MySQL Database (Subtitles Added)
  1. Please. Can you help me.
    I want to draw another air line, but I do not know where wrong, but could not draw chart.
    $servername = 'localhost';

    $username = 'abc';

    $password = 'xxx';

    $dbname = 'abc';

    $mysqli = new mysqli($servername, $username, $password, $dbname);
    die("Connection failed: ". $mysqli->connect_error);

    $query = "SELECT * FROM data_zigbee";
    $qresult= $mysqli->query($query);
    $results = array();

    while ($res = $qresult->fetch_assoc()) {
    $results[] = $res;

    $line_chart_data = array();
    foreach ($results as $result) {
    $line_chart_data[] = array($result['timeupload'],$result['humidity'],$result['temperature']);


    $line_chart_data = json_encode($line_chart_data);



    <script src=""></script>
    <script type="text/javascript" src=""></script>

    <script type="text/javascript">

    google.load('visualization', '1',{'packages':['corechart'] } );


    function drawAnnotations(){

    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Date');
    data.addColumn('number', 'Humidity');
    data.addColumn('number', 'Temperature');
    data.addRows(<?php echo $line_chart_data?>);

    var options = {
    width: 600,
    height: 400,
    legend: { position: 'top', maxLines: 3},
    line : {groupWidth: '75%'},

    isStacked: true


    var chart = new google.visualization.LineChart(document.getElementById('line_chart_div'));
    chart.draw(data, options);



    <div id='line_chart_div'> </div>


  2. how to download dashboard that youve downloaded under your screen? im little bit confused when you open your application (i mean dreamwaver) and then there are so many chart. how can be like that? thankyou for respon sir.

  3. nice tutorial~! but the background music drove me sleepy within the first 5 min.. let me advice a more dynamic song given that there's no voice explaining/following the instructions.

Leave a Reply

Your email address will not be published. Required fields are marked *