I believe most of what you've described must be done through Apps Script to
make available to Google Sites.

I was going to suggest using pivot tables (I think spreadsheets calls it
Report Editor) to do the filtering, etc. but that would require doing the
manipulations in the spreadsheet directly, which would not be doable in
sites.

After you go through this, if you have any feedback on how we could improve
the Apps Script bridge, please let me know. We don't control it, however we
can push on them to make improvements.

Keep in mind, there are limitations to Apps Script (so that it can maintain
security it uses sandboxing, etc.) so that we can't quite make all the
improvements we'd like...

Another possibility I thought I'd mention, not sure if it would be helpful:
Apps Script supports a dataSourceUrl instead of just a spreadsheet, and the
spreadsheets data source URLs support some amount of querying:
https://developers.google.com/chart/interactive/docs/querylanguage
https://developers.google.com/chart/interactive/docs/spreadsheets#Google_Spreadsheets_as_a_Data_Source

Anyway, please let us know if you have any feedback,
Tom

Thomas Rybka | Software Engineer | [email protected] | Google


On Fri, Jul 12, 2013 at 12:00 PM, asgallant <[email protected]>wrote:

> You might want to look into the Apps Script UI 
> functions<https://developers.google.com/apps-script/reference/base/ui>,
> I think you can do what you want with them.
>
>
> On Friday, July 12, 2013 11:49:17 AM UTC-4, Ryan wrote:
>>
>> 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.
>
>
>

-- 
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.


Reply via email to