【发布时间】:2018-04-18 21:52:43
【问题描述】:
我刚刚获得了一些使用 Google 图表的经验,但我很难理解在图表选项中设置宽度和高度与在图表区域设置中设置宽度和高度之间的区别。例如,我已经看到这样做了:
var options = {
width: '500px',
height: '400px',
chartArea: {
left: "15%",
top: "5%",
height: "80%",
width: "75%"
},
//chartArea: { top: 10, left: 80, bottom: 50 },
legend: { position: 'bottom', alignment: 'start' },
annotations: { alwaysOutside: true},
hAxis: {
gridlines: { count: 10 },
},
如果我不得不猜测,这告诉 Google Charts 使用 500 x 400 像素的“画布”大小,但图表本身应该只占用 75% 的宽度和 80% 的高度。这是正确的吗?
【问题讨论】:
标签: charts google-visualization