Hi All,
I have the following snipped that's producing the above error and the chart
doesn't render. I'm new to JS and gViz API as well. What am I doing wrong?
<table>
<h1>Software Versions - By Role</h1>
<div id="chart_div"></div>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart(){
// Create DataTable object from dremel table
var dt = new google.visualization.DataTable();
dt.addColumn('string', 'name');
dt.addColumn('string', 'role');
dt.addColumn('string', 'vendor');
dt.addColumn('string', 'hw_rev');
dt.addColumn('string', 'sw_rev');
// Populate with data from Dremel query
dt.addRow(['ar01.bog01',
'AR',
'Juniper',
'mx960',
'13.3X2'
]);
dt.addRow(['ar01.bom05',
'AR',
'Juniper',
't4000',
'13.3X2'
]);
dt.addRow(['ar01.bom07',
'AR',
'Juniper',
't4000',
'13.3X2'
]);
dt.addRow(['ar01.ctg01',
'AR',
'Juniper',
'mx960',
'13.3X2'
]);
// More entries omitted
var chart = new google.visualization.Histogram(
document.getElementById('chart_div'));
var column_key = [1, 2];
//var column_opt = [1, {'column':2,
'aggregation':google.visualization.data.count, 'type':'number'}];
var chart_opts = {
title: 'Sofware Revsions by Role',
}
var group = google.visualization.data.group(
dt,
column_key
);
chart.draw(group);
}
</script>
</table>
--
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 [email protected].
To post to this group, send email to [email protected].
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/6162bdb5-65c8-4579-a1ce-3235574d57df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.