Since you're not using the query, I pulled out all of that code. You then
need to use the same variable name for the DataTable object (you create one
called ticketsData and then try to populate one called dataTable - I
assumed that ticketsData is the one you wanted, but you can change it
easily enough). Here is the modified code:
google.load('visualization', '1', {packages: ['corechart']});
google.setOnLoadCallback(drawChart);
function drawChart () {
// create data table object
var ticketsData = new google.visualization.DataTable();
// define columns
ticketsData.addColumn('string','Place / Movie');
ticketsData.addColumn('number', 'London');
ticketsData.addColumn('number', 'Paris');
ticketsData.addColumn('number', 'Moscow');
// define rows of data
ticketsData.addRows([
['Pi',5,25,7],
['Requiem',9,20,30],
['Fountain', 1,3,6]
]);
var chart = new google.visualization.ColumnChart(document.getElementById
('chart_div'));
chart.draw(ticketsData, {
isStacked: true,
legend: 'bottom',
vAxis: {
title: 'Number of tickets'
}
});
}
--
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/-/m8it4IWAh8cJ.
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.