# \[Solved\] Google Chart- HTML element does not appearing

**URL:** <https://forum.bubble.io/t/solved-google-chart-html-element-does-not-appearing/9967>\
**Category:** Need help\
**Created:** [January 28, 2017, 7:07am UTC](https://forum.bubble.io/t/solved-google-chart-html-element-does-not-appearing/9967 "2017-01-28T07:07:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![orinai814](https://avatars.discourse-cdn.com/v4/letter/o/90ced4/32.png) [@orinai814](https://forum.bubble.io/u/orinai814)\
**Post date:** [January 28, 2017, 7:07am UTC](https://forum.bubble.io/t/solved-google-chart-html-element-does-not-appearing/9967/1 "2017-01-28T07:07:06Z")

</div>

Hello,

Im trying to create basic chart , using Google Chart embedded in the HTML element. But from what ever reason its doesn’t appear in the preview. (Although if im using JSfiddle it does work)

The code is very basic code:(and based on template i found at the forum)

```
<html>
  <head>
    <script type="text/javascript">
	   var results = [];
	   var x = [5,7,8];
	   var y = [3,6,7];

results.push (['labelx', 'label y']);

		for (i = 0; i < x.length; i++) {
			results.push([parseInt(x[i]),parseInt(y[i])]);
		}

      google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable(results);

        var options = {
          title: 'test',
	  curveType: 'function',
	  hAxis:{title:'date'},
	  vAxis:{title:20,minValue:0},
                       };

        var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));

        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="curve_chart" style="width: 600px; height: 400px;"></div>
  </body>
</html>"

```

[link to the application](https://bubble.io/page?name=index&id=graphtest&tab=tabs-1)

Any help will be highly appricated

---

<div class="post-metadata">

**Author:** ![romanmg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/romanmg/32/237672_2.png) [@romanmg](https://forum.bubble.io/u/romanmg)\
**Post date:** [January 28, 2017, 5:30pm UTC](https://forum.bubble.io/t/solved-google-chart-html-element-does-not-appearing/9967/2 "2017-01-28T17:30:08Z")

</div>

I added some missing code to your page header to load the chart.

```
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
```

---

<div class="post-metadata">

**Author:** ![orinai814](https://avatars.discourse-cdn.com/v4/letter/o/90ced4/32.png) [@orinai814](https://forum.bubble.io/u/orinai814)\
**Post date:** [January 29, 2017, 2:50am UTC](https://forum.bubble.io/t/solved-google-chart-html-element-does-not-appearing/9967/3 "2017-01-29T02:50:16Z")

</div>

> [@romanmg](#):
>
> \<script type=“text/javascript” src=“[https://www.gstatic.com/charts/loader.js](https://www.gstatic.com/charts/loader.js)”\>\</script\>  
> \<script type=“text/javascript”\>

Great Thanks highly appreciated !!! 🙂

---

<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:** [April 8, 2017, 7:07am UTC](https://forum.bubble.io/t/solved-google-chart-html-element-does-not-appearing/9967/4 "2017-04-08T07:07:17Z")

</div>

Closed on April 8, 2017, 7:07am UTC

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