Do you want the user to be able to change it, or should this be
unchangeable?
On Tuesday, June 10, 2014 4:29:34 PM UTC-4, Missy wrote:
>
> I would like to be able to show, only the latest date data (table) when
> the web page renders.
>
> Thanks.
>
>
>
> On Tuesday, June 10, 2014 5:58:25 PM UTC+1, Andrew Gallant wrote:
>>
>> You set up a filter for the date column, are you trying to set the
>> default value for the filter, or do you always want to show only the latest
>> date?
>>
>> On Tuesday, June 10, 2014 5:50:28 AM UTC-4, ali wrote:
>>>
>>> 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.