# Dynamically plotting data with google chart

**URL:** <https://forum.bubble.io/t/dynamically-plotting-data-with-google-chart/13812>\
**Category:** Need help\
**Created:** [May 26, 2017, 8:05am UTC](https://forum.bubble.io/t/dynamically-plotting-data-with-google-chart/13812 "2017-05-26T08:05:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lise.nicolas](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lise.nicolas](https://forum.bubble.io/u/lise.nicolas)\
**Post date:** [May 26, 2017, 8:05am UTC](https://forum.bubble.io/t/dynamically-plotting-data-with-google-chart/13812/1 "2017-05-26T08:05:03Z")

</div>

Hi Bubble Community,  
I know a lot of person had face issue with dynamicly plotting their data and there is already a lot of question on the forum about it but I don’t even know where to start…  
I have found the google code for a pie chart but I don’t know where to put it or how to filter my data…  
I understand that I am really novice on the subject but if anyone could teach me how to use google chart and the external api, you would be a life saver…  
Is there somebody who could teach me ?  
Thank you in advance for your time…

---

<div class="post-metadata">

**Author:** ![lise.nicolas](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lise.nicolas](https://forum.bubble.io/u/lise.nicolas)\
**Post date:** [May 31, 2017, 2:13am UTC](https://forum.bubble.io/t/dynamically-plotting-data-with-google-chart/13812/2 "2017-05-31T02:13:44Z")

</div>

Hey, Is there anyone who could give me a hand on that ? I’m still really block…

---

<div class="post-metadata">

**Author:** ![lise.nicolas](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lise.nicolas](https://forum.bubble.io/u/lise.nicolas)\
**Post date:** [July 6, 2017, 9:24am UTC](https://forum.bubble.io/t/dynamically-plotting-data-with-google-chart/13812/3 "2017-07-06T09:24:10Z")

</div>

Hey Everyone,

Could someone please help me to plot dynamically my data?

I do know that i have to create an html box and use the following code :

 google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart);

```
  function drawChart() {

    var data = google.visualization.arrayToDataTable([
      ['Task', ' Hours per Day'],
      ['work', 6],
      ['Eat', 2],
      ['Commute', 2],
      ['Watch TV', 2],
      ['Sleep', 7]
    ]);

    var options = {
      title: 'Statistiques'
    };

    var chart = new google.visualization.PieChart(document.getElementById('piechart'));

    chart.draw(data, options);
  }
</script>

```

But I don’t know how to change it to create a function that search and count what I want in my database…  
Would anyone give me a hand on that ?

Thank you in advance for that, you would really be a life saver !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [August 4, 2017, 8:05am UTC](https://forum.bubble.io/t/dynamically-plotting-data-with-google-chart/13812/4 "2017-08-04T08:05:05Z")

</div>

Closed on August 4, 2017, 8:05am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
