framework7

Open full view…

Add a Google Chart into <Content-Block-Inner> tag

delil
Wed, 11 Oct 2017 15:12:30 GMT

Hi guys im trying to build a WebApp! I have issues to understand the logic behind ajax and page building. If i try to paste the Google chart into an Content-Block, it seems that the block only takes the width and height of the chart but doesnt let the chart appear. Even if i delete width and height. It worked in normal html site. the following <script> i pasted into the <head> Tag: "<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Work', 11], ['Eat', 2], ['Commute', 2], ['Watch TV', 2], ['Sleep', 7] ]); var options = { title: 'My Daily Activities' }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } </script>" and this is the code i pasted into my <content-block-inner>: "<div id="piechart" style="width: 900px; height: 500px;"></div>"

delil
Fri, 13 Oct 2017 01:44:47 GMT

Push