Dear All
I am looking for assitance to set up a dashboard with controls which will
take in data from a URL. It will be great if you can point me to an
example.
Thank you in Advance.
rgds
The specific code in my case is :
function drawVisualization () {
var query = new
google.visualization.Query('http://spreadsheets.google.com/tq?key=0AvLT-nrDD-z7dHJwWkJwSFZTNGZzRVpTY1JVRzRtVUE&pub=1');
query.setQuery('SELECT A, B, C, D ,E, F ');
query.send(function (response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
var data = response.getDataTable();
var regionFilter = new google.visualization.ControlWrapper({
'controlType': 'CategoryFilter',
'containerId': 'control1',
'options': {
'filterColumnLabel': 'Region',
'ui': {
'allowTyping': false,
'allowMultiple': false,
'selectedValuesLayout': 'belowStacked'
}
},
// Define an initial state, i.e. a set of metrics to be initially
selected.
'state': {'selectedValues': ['India']}
});
var yearFilter = new google.visualization.ControlWrapper({
'controlType': 'CategoryFilter',
'containerId': 'control2',
'options': {
'filterColumnLabel': 'Year',
'ui': {
'allowTyping': false,
'allowMultiple': false,
'selectedValuesLayout': 'belowStacked'
}
},
// Define an initial state, i.e. a set of metrics to be initially
selected.
'state': {'selectedValues': ['2011']}
});
var barChart = new google.visualization.ChartWrapper({
'chartType': 'ColumnChart',
'containerId': 'chart1',
'options': {
'width': 400,
'height': 180
},
'view': {'columns': [3,4]}
});
// Create the dashboard.
var dashboard = new
google.visualization.Dashboard(document.getElementById('dashboard')).
// Configure the category picker to affect the gauge chart
bind(regionFilter, barChart).
// Draw the dashboard
draw(data);
});
}
--
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.