简体   繁体   English

Google Charts Api同一画布中的多个图表

[英]Google Charts Api Multiple charts in the same canvas

I am using google charts api. 我正在使用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. 但是,如果您有4个Google图表,则每个图表都可以显示在其自己的DIV中。 So you'll need 4 'chart_div'. 因此,您需要4个“ chart_div”。 For example, this is how the Web Reporting of icCube is working. 例如,这是icCubeWeb报表的工作方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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