I'm trying to output the following data to the screen as both a table
and a chart.  When I try this, I get the table fine, but the Chart
appears without any bars (the y-axis goes from 0 to 1 without any bars
in the graph).  Is there something I'm doing wrong when trying to
output the chart?

    <script type="text/javascript" src="http://www.google.com/jsapi";></
script>
    <script type="text/javascript">
      google.load('visualization', '1', {packages: ['table']});
      google.load('visualization', '1', {packages: ['columnchart']});
    </script>
    <script type="text/javascript">
    function drawVisualization() {
      // Create and populate the data table.
      var JSONObject = {cols: [{id: 'ActivityDate', label:
'ActivityDate', type: 'string'},{id: 'Count', label: 'Count', type:
'number'}], rows: [{c: [{v: 'DateA'},{v: '130'}]},{c: [{v: 'DateB'},
{v: '255'}]},{c: [{v: 'DateC'},{v: '380'}]}]};


      var data = new google.visualization.DataTable(JSONObject);

      // Create and draw the visualization.
      visualization = new google.visualization.Table
(document.getElementById('table'));
      visualization.draw(data, null);


      // Create and draw the visualization.
      new google.visualization.ColumnChart(document.getElementById
('chart_div')).
      draw(data, null);

    }


    google.setOnLoadCallback(drawVisualization);
    </script>


Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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