Hi,
How can I create event, which can render table's only showing yesterday's
date data (recent date only - 9June). I have started the function and but
little unclear about the coding logic. Any guide would be greatly
appreciated. Thanks.
function drawVisualization() {
// Prepare the data
var data = google.visualization.arrayToDataTable([
['Country', 'Region/State', 'City', 'Date'],
['USA', 'California', 'San Francisco', '9 June'],
['USA', 'California', 'Los Angeles', '9 June'],
['USA', 'California', 'Mountain View', '9 June'],
['USA', 'New York', 'New York', '8 June'],
['USA', 'New York', 'Albany', '8 June'],
['France', 'Ile-de-France', 'Paris', '8 June'],
['France', 'Ile-de-France', 'Orly', '6 June'],
['France', 'Provence', 'Marseille', '6 June'],
['France', 'Provence', 'Nice', '6 June']
]);
var datePicker = new google.visualization.ControlWrapper({
'controlType': 'CategoryFilter',
'containerId': 'control3',
'options': {
'filterColumnLabel': 'Date',
'ui': {
'labelStacking': 'vertical',
'allowTyping': false,
'allowMultiple': false
}
}
});
// Define a table.
var table = new google.visualization.ChartWrapper({
'chartType': 'Table',
'containerId': 'chart2',
'options': {
'width': '500px'
}
});
new
google.visualization.Dashboard(document.getElementById('dashboard')).bind([countryPicker,
regionPicker, datePicker], [table]).draw(data);
google.visualization.events.addListener(table, 'ready',
function () {
var filteredData = table.getDataTable();
var group = filteredData.getDistinctValues(4);
for (var i = 0; i < group.length; i++) {
// little confused here
}
});
}
--
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/d/optout.