google.load('visualization', '1', {'packages':['motionchart']});
google.setOnLoadCallback(initialize);
function initialize() {
var query = new google.visualization.Query(
'http://spreadsheets.google.com/pub?key=pbD-qQOd8BSUVbHnvf7AGUQ');
query.setRefreshInterval(10);
// Create only one instance of the chart and pass it to a draw function,
// which will return a function that we will use for the query response.
var chart = new google.visualization.MotionChart(document.getElementById('chart_div'));
query.send(draw(chart));
}
function draw(chart) {
// Note that this returns a function.
return function(response) {
if (response.isError()) {
alert('Error in query')
}
var myData = response.getDataTable();
chart.draw(myData, {width: 516, height:410, state: '{"dimensions":{"iconDimensions":["dim0"]},"nonSelectedAlpha":0.4,"orderedByX":false,"xZoomedDataMax":4102444800000,"iconType":"BUBBLE","showTrails":true,"uniColorForNonSelected":false,"yLambda":1,"duration":{"timeUnit":"Y","multiplier":1},"yZoomedDataMax":2667,"time":"2005","sizeOption":"_UNISIZE","xLambda":1,"xZoomedDataMin":1104537600000,"yZoomedDataMin":906,"stateVersion":3,"xAxisOption":"_TIME","playDuration":15,"iconKeySettings":[],"yAxisOption":"3","yZoomedIn":false,"xZoomedIn":false,"orderedByY":false,"colorOption":"4"}', showXMetricPicker:false, showXScalePicker:false, showYScalePicker:false,showSelectListComponent:false, showSidePanel:false });
};
}
--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/3a03caa8-a01d-4e01-a4d2-aaded06a139a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
• • • • | Sergey Grabkovsky Software Engineer Google, Inc |