谷歌可视化间距
我使用 Google Visualization API 制作了一张类似于下面的图表。我的问题是,在该图表的关键位置的右侧(显示低、中、高)有太多空白。我怎样才能摆脱这个空白?
(来源:securitymonks.com)
I have a chart similar to the one below using the Google Visualization API. My problem is that on the right side of where the key is for this chart(where it says low, medium, high) there is too much white space. How can I get rid of this white space?
(source: securitymonks.com)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用宽度和高度百分比&选项变量中的宽度和高度值,甚至将图例推到底部作为一行。然后将选项传递给您正在绘制的图表。
You can play around with width and height percentages & width and height values in options variable and even push the legend to bottom as one single line. Then pass the options to the chart you are drawing.
作为一种解决方法,我最终只是使图形更宽并在包含的 Div 上使用溢出:隐藏。如果有人知道 API 是否允许缩小空白区域,请告诉我。
As a kind of work around I ended up just making the graph wider and using overflow:hidden on the containing Div. If anyone knows if the API allows to make the white space smaller please let me know.