The more you know.
Next question is it possible to display a dialog box asking which columns a
visiter wants and then pass that information to my dataDefinitionView prior
to the chart rendering?
Additionally, to provide more information about my end goal. I'm trying to
make this site live in a google site. I'm under the impression that the
only way to do this is to use the google apps script, is this correct?
On Friday, July 12, 2013 7:45:50 AM UTC-7, asgallant wrote:
>
> The Apps Script version doesn't implement event listeners or pulling data
> from DataTables, both of which are required to make my hack work.
>
> On Friday, July 12, 2013 3:01:35 AM UTC-4, Ryan wrote:
>>
>> So here is where I am at right now.
>>
>> I've restructured my data as follows
>> Date in Date format, year*10000+month*100+day, Data column 1,2,3,4
>>
>> But i'm not sure how tie back data2 to duplicate your trick. Once again I
>> appreciate any help you can provide.
>>
>>
>> function doGet() {
>> var ss = SpreadsheetApp.openById('Hidden');
>>
>> var data = ss.getDataRange();
>>
>> var dateFilter =
>> Charts.newNumberRangeFilter().setFilterColumnIndex(1).build();
>>
>> var areaChart = Charts.newAreaChart()
>>
>> .setDataViewDefinition(Charts.newDataViewDefinition().setColumns([0,2,3,4,5]))
>> .setStacked()
>> .setLegendPosition(Charts.Position.BOTTOM)
>> .setTitle('Bug Status Over Time')
>> .setXAxisTitle('Date')
>> .setYAxisTitle('Count')
>> .setDimensions(900, 500)
>> .build();
>>
>> var dashboard = Charts.newDashboardPanel().setDataTable(data)
>> .bind([dateFilter], [areaChart])
>> .build();
>>
>> var data2 = Charts.newDataTable()
>> .addColumn(Charts.ColumnType.NUMBER, 'Index')
>> .addColumn(Charts.ColumnType.STRING, 'name')
>> .addRow([0,'date']);
>>
>> for (var i = 2; i < ss.getLastColumn(); i ++) {
>> data2.addRow([i,ss.getSheetValues(1, i +1, 1, 1).join()]);
>> }
>> data2.build();
>>
>> var table = Charts.newTableChart()
>> .setDataTable(data2)
>> .build()
>>
>>
>> var app = UiApp.createApplication();
>> var filterPanel = app.createVerticalPanel();
>> var chartPanel = app.createHorizontalPanel();
>> filterPanel.add(dateFilter).setSpacing(5);
>> chartPanel.add(areaChart);
>>
>>
>>
>> dashboard.add(app.createVerticalPanel().add(filterPanel).add(chartPanel));
>> app.add(dashboard).add(table);
>>
>> return app;
>>
>> }
>>
>
--
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.