Google Analitics real time query with filters doesn´t draw in Pie Chart

11 views
Skip to first unread message

latam...@gmail.com

unread,
Apr 29, 2016, 10:48:38 AM4/29/16
to Google Visualization API
Hello to everyone,

PLEASE HELP !!!

I´m working drawing querys from Google Analitycs pretty good, but when the query is with Filters not draw nothing.
CODE:

<html>
<head>
  <title>Solicitudes:</title>

  <!--Load the AJAX API-->
  <script type="text/javascript"
    src='https://www.google.com/jsapi?autoload={"modules":[{"name":"visualization","version":"1"}]}'>
  </script>

  <!-- Visualization -->
  <script type="text/javascript">
    google.setOnLoadCallback(drawVisualization);

    function drawVisualization() {

      var browserWrapper = new google.visualization.ChartWrapper({
          // Example Browser Share Query
         "containerId": "browser",
                         
// "query": 'SELECT * WHERE rt:PageTitle = Paso 2 - Proceso de Compra - LAN.com'
         "refreshInterval": 1,
         "chartType": "PieChart",
         "options": {
            "showRowNumber" : true,
            "width": 630,
            "height": 440,
            "is3D": true,
            "title": ""
         }
       });

      browserWrapper.draw();
    
    }
  </script>
</head>
<body>
  <h1>Solicitudes:</h1>
  <div id="browser" style="margin:auto;width:630px;"></div>
  <div id="country" style="margin:auto;width:630px;"></div>
</body>
</html>

Daniel LaLiberte

unread,
Apr 29, 2016, 11:18:10 AM4/29/16
to Google Visualization API
Your dataSourceUrl has a localhost url, which no one else can use.  Could you put up a public spreadsheet for test purposes?

The PieChart shouldn't be any different than any other type of chart if the problem is in fetching the data.  

But the resulting data, once you get it, might be incorrect for the chart, so I would recommend using a 'Table' chart at first.

--
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/40497a48-d990-451b-93b6-c495d0e9354a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages