Is it possible to show a graph where the values are gathered from PHP. I 
have the code below but it doesnt plot anything though i know the values 
are there

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";>

<head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>Month Detail</title>

  <link rel="stylesheet" href="../styles/dailykpi.css" media="all" />

  <?php include("monthdetail.php"); ?>

  <!--Load the AJAX API-->
  <script type="text/javascript" 
src="https://www.gstatic.com/charts/loader.js";></script>
  <script type="text/javascript">

    // Load the Visualization API and the corechart package.
    google.charts.load('current', {'packages':['corechart']});

// Set a callback to run when the Google Visualization API is loaded.
    google.charts.setOnLoadCallback(drawChart);

    // Callback that creates and populates a data table, instantiates the 
pie chart, passes in the data and draws it.
    function drawChart() {

      // Create the data table.
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'Day Of The Month');
      data.addColumn('number', 'Amount Of Sales');
      data.addRows([
        ['Day 01', <?php $IntFormattedNum01d ?>],
        ['Day 02', <?php $IntFormattedNum02d ?>],
        ['Day 03', <?php $IntFormattedNum03d ?>],
        ['Day 04', <?php $IntFormattedNum04d ?>],
        ['Day 05', <?php $IntFormattedNum05d ?>],
        ['Day 06', <?php $IntFormattedNum06d ?>],
        ['Day 07', <?php $IntFormattedNum07d ?>],
        ['Day 08', <?php $IntFormattedNum08d ?>],
        ['Day 09', <?php $IntFormattedNum09d ?>],
        ['Day 10', <?php $IntFormattedNum10d ?>],
        ['Day 11', <?php $IntFormattedNum11d ?>],
        ['Day 12', <?php $IntFormattedNum12d ?>],
        ['Day 13', <?php $IntFormattedNum13d ?>],
        ['Day 14', <?php $IntFormattedNum14d ?>],
        ['Day 15', <?php $IntFormattedNum15d ?>],
        ['Day 16', <?php $IntFormattedNum16d ?>],
        ['Day 17', <?php $IntFormattedNum17d ?>],
        ['Day 18', <?php $IntFormattedNum18d ?>],
        ['Day 19', <?php $IntFormattedNum19d ?>],
        ['Day 20', <?php $IntFormattedNum20d ?>]
      ]);

      // Set chart options
      var options = {'title':'Daily Sales For Current Month',
                     'width':960,
                     'height':540};

      // Instantiate and draw our chart, passing in some options.
      var chart = new 
google.visualization.BChart(document.getElementById('chart_div'));
      chart.draw(data, options);
    }
  </script>

</head>

<body class="body">

    <!--Div that will hold the pie chart-->
    <div id="chart_div"></div>

</body>

</html>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/b17d51f4-477b-4c98-a1b5-f91cfb7e6a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to