http://new-landing-page-94e5db.webflow.io/chart
Yes. If you use the same drawchart (by id!) for 30 elements. This is a little buggy. Again this is more issue of google charts (You should know how to code this).
Example of two charts on the same page:
https://codepen.io/ezra_siton/pen/mQeEyj
For more details write me in private.
code (With some comments)
<h2>Chart1</h2>
<div id="barchart_material" style="width: 100%; height: 300px;"></div>
<hr>
<h2>Chart2</h2>
<div id="barchart_material2" style="width: 100%; height: 300px;"></div>
<!-- load this only one time!! -->
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js">
</script>
<script type="text/javascript">
/* write only one time */
google.charts.load('current', {
'packages': ['bar']
});
/*chart 1*/
google.charts.setOnLoadCallback(drawChart);
/* chart 2 */
google.charts.setOnLoadCallback(drawChart2);
/* draw chart1*/
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses', 'Profit'],
['2014', 1000, 400, 200],
['2015', 1170, 460, 250],
['2016', 660, 1120, 300],
['2017', 1030, 540, 350]
]);
var options = {
chart: {
title: 'Company Performance',
subtitle: 'Sales, Expenses, and Profit: 2014-2017',
},
bars: 'horizontal' // Required for Material Bar Charts.
};
/* change her the ID */
var chart = new google.charts.Bar(document.getElementById('barchart_material'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
/* draw chart2*/
function drawChart2() {
var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses', 'Profit'],
['2014', 1000, 400, 200],
['2015', 1170, 460, 250],
['2016', 660, 1120, 300],
['2017', 1030, 540, 350]
]);
var options = {
chart: {
title: 'Company Performance',
subtitle: 'Sales, Expenses, and Profit: 2014-2017',
},
bars: 'vertical' // Required for Material Bar Charts.
};
/* change her the ID */
var chart = new google.charts.Bar(document.getElementById('barchart_material2'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
</script>