It would be better to ask questions that are specific to the AppsScript API in forums for AppsScript users, since users in this forum are unlikely to know the answer. See https://developers.google.com/apps-script/support
On Wed, Jul 26, 2017 at 10:31 AM, 'Becca' via Google Visualization API < [email protected]> wrote: > I have the following code and it appears fine to me, but when I run it, I > get the error message *"Cannot call overloaded constructor setDataTable > with parameters (object) because there is more than one matching > constructor signature: interface DashboardPanelBuilder > setDataTable(DataTableBuilder) interface DashboardPanelBuilder > setDataTable(DataTableSource) (line 23, file "Code")." * > > Can someone identify the problem? > > function doGet() { > var sss = > SpreadsheetApp.openById('1DwJ608d0e7HloyYKC-MpClb46tLHvZfXUL57RvX_1d4'); > //replace with source ID > var ss = sss.getSheetByName('Sheet1'); //replace with source Sheet tab > name > var range = ss.getRange('A1:I17'); //assign the range you want to copy > var data = range.getValues(); > > var ageFilter = Charts.newNumberRangeFilter() > .setFilterColumnLabel("Age") > .build(); > > var genderFilter = Charts.newCategoryFilter() > .setFilterColumnLabel("Gender") > .build(); > > var pieChart = Charts.newPieChart() > .setDataViewDefinition(Charts.newDataViewDefinition() > .setColumns([2,9])) > .build(); > > var tableChart = Charts.newTableChart() > .build(); > > var dashboard = Charts.newDashboardPanel() > .setDataTable(data) > .bind([ageFilter, genderFilter], [pieChart, tableChart]) > .build(); > > var uiApp = UiApp.createApplication(); > > dashboard.add(uiApp.createVerticalPanel() > .add(uiApp.createHorizontalPanel() > .add(ageFilter).add(genderFilter) > .setSpacing(70)) > .add(uiApp.createHorizontalPanel() > .add(pieChart).add(tableChart) > .setSpacing(10))); > > uiApp.add(dashboard); > return uiApp; > } > > > -- > 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 google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/60e8fbc6-1835-4467-815c- > a3e9a36f40ab%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/60e8fbc6-1835-4467-815c-a3e9a36f40ab%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- 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 https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJNK6-YgS8GRncXCbi2WWW-Oo2YJ3Mh2%2B5jWNHf_bJC%3Dwg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
