Linking data from "Fusiontables" to the dashboard

28 views
Skip to first unread message

Alexander Jaramillo

unread,
Jan 13, 2016, 4:42:42 PM1/13/16
to Google Visualization API
Hi, good afternoon, im doing my first dashboard from one of the examples published in the tutorial, and and has a problem because it gives the following error:

"The script has ben completed but did not show any value."

Thank you very much for your help, annex the code I'm using


function doGet() {
  
   function drawVisualization(){
     
      var query = new google.visualization.Query(
      query.send(handleQueryResponse);
    }

    
  function handleQueryResponse(response) {
    
  if (response.isError()) {
        alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
        return;
      }
      
    var data = response.getDataTable();

  var ageFilter = Charts.newNumberRangeFilter()
      .setFilterColumnLabel("Age")
      .build();

  var genderFilter = Charts.newCategoryFilter()
      .setFilterColumnLabel("Gender")
      .build();

  var pieChart = Charts.newPieChart()
      .setDataViewDefinition(Charts.newDataViewDefinition()
                            .setColumns([0, 3]))
      .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;
}
  


Daniel LaLiberte

unread,
Jan 13, 2016, 4:57:20 PM1/13/16
to Google Visualization API
Hi Alexander,

It appears you are using some additional library beyond Google Charts by itself to handle calls like Charts.newNumberRangeFilter(). And the error message is probably coming from that library, so you'll have to consult with the developers of that library, whatever it is.  

If you can point us at a page that shows this example, we might be able to help more.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@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/d16b1bae-03ca-4d91-91be-1d1afbfe2ef2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Alexander Jaramillo

unread,
Jan 14, 2016, 11:27:39 AM1/14/16
to Google Visualization API
Thanks, Daniel,

This is the page, the code of the example is at the end of the page:


I'm trying to run the same example, but with an external data font.

As learn the correct syntax , I hope to start my real exercise.


Thanks again for your time.
Reply all
Reply to author
Forward
0 new messages