简体   繁体   中英

Google Charts Api Multiple charts in the same canvas

I am using google charts api. It is perfect for my needs. I am now trying to incorporate multiple pie charts in the same page. I have moved the charts to the bottom of the page. How to add four pie charts in the same canvas or should I create multiple canvas on the same page.

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

I appreciate any help.

Do not understand what you means by canvas. But if you've 4 Google charts, each chart can be displayed in its own DIV. So you'll need 4 'chart_div'. For example, this is how the Web Reporting of icCube is working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM