Google Visualization Spacing

Mik*_*ike 3 charts google-visualization

我有一个类似于下面使用Google Visualization API的图表.我的问题是,在该图表的键的右侧(低,中,高),有太多的空白区域.我怎样才能摆脱这个空白区?

alt text http://blog.securitymonks.com/wp-content/uploads/2010/04/googlecolumn.png

小智 6

您可以在选项变量中使用宽度和高度百分比以及宽度和高度值,甚至可以将图例作为一条线推到底部.然后将选项传递给您正在绘制的图表.

var options2 = { width: 265, height: 200,
            chartArea: { left: 60, top: 20, width: "100%", height: "60%" }, 
            isStacked: true, allowHtml: true, 'legend': 'bottom', titleTextStyle: { color: 'green', fontFamily: 'Arial', fontSize: 16 }, legendTextStyle: { color: '#666666' },
            vAxis: { title: 'Liters', titleTextStyle: { color: 'blue', fontName: 'Arial', fontSize: 10 }, textStyle: { fontSize: 9} },
Run Code Online (Sandbox Code Playgroud)