it doesnt show the Columnchart!!!....

this what i have:


<html>
  <head>
    <script type="text/javascript" 
src="https://www.google.com/jsapi";></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
     
      function drawChart() {
           var jsonData = $.ajax({
          url: "goo2.php",
          dataType:"json",
          async: false
          }).responseText;

          
        var data = google.visualization.arrayToDataTable(jsonData);
        
     
        var chart = new 
google.visualization.ColumnChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="chart_div" style="width: 900px; height: 500px;"></div>
  </body>
</html>


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<?php

$con=mysql_connect("localhost","root","") or die("problemas al conectarse 
al server!!!!");
 
mysql_select_db("bdregistro", $con); 

$sth = mysql_query("SELECT * FROM bd_salidas");
$rows = array();
$flag = true;

$table = array();

$table['cols'] = array(

    array('label' => 'PLACA', 'type' => 'string'),
    array('label' => 'SEMANA_1', 'type' => 'number'),
    array('label' => 'SEMANA_2', 'type' => 'number'),
    array('label' => 'SEMANA_3', 'type' => 'number'),
    array('label' => 'SEMANA_4', 'type' => 'number'),
    array('label' => 'SEMANA_5', 'type' => 'number')

);

$rows = array();
while($r = mysql_fetch_assoc($sth)) {
    $temp = array();

$temp[] = array('v' => (string) $r['PLACA']); 
$temp[] = array('v' => (int) $r['S1']); 
$temp[] = array('v' => (int) $r['S2']); 
$temp[] = array('v' => (int) $r['S3']); 
$temp[] = array('v' => (int) $r['S4']); 
$temp[] = array('v' => (int) $r['S5']); 

 
    $rows[] = array('c' => $temp);
}

$table['rows'] = $rows;

$jsonTable = json_encode($table);


?>

it doesnt show an error!!!! just blank page!!!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/mW0r_D-u9HMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to