Google Chart未显示正确的高度和宽度

时间:2016-01-16 19:42:03

标签: javascript jquery html asp.net-mvc google-visualization

我的谷歌图形显示为默认大小(宽度:400px和高度:200px)时遇到此问题,而我希望它的大小不同。我想知道这是否与它在某个部分视图或其他东西有关,但如果我改变代码中的大小并刷新它有时显示正确。如果你能事先帮助我,那就谢谢了。

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

没有丢失,因为它在布局html文件上,因此包含在标题中。再次,如果你可以提前帮助我,谢谢你。

This is how it displays on the page now

2 个答案:

答案 0 :(得分:0)

首先,确保在高度后包括分号。

<div id="graph" style="width: 900px; height: 500px;"></div>

答案 1 :(得分:0)

options.chart

没有宽度/高度 - properties

您必须将widthheight定义为options

的属性
var options = {
                  width: 900,
                  height: 500,
                  chart: {
                           title: 'Interest Performance',
                           subtitle: 'Threads, Votes, and Comments'                      
                         }              
              };
相关问题