从Google图表中删除填充或边距 [英] Remove padding or margins from Google Charts

查看:160
本文介绍了从Google图表中删除填充或边距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://code.google.com/intl/pl/apis /chart/interactive/docs/quick_start.html

和例如:

http://jsfiddle.net/invernizzie/T4yWz/1/

如何删除此示例中的填充或边距?

how to remove padding or margins in this example?

推荐答案

通过添加和调整 API文档,您可以创建很多不同的样式。例如,这里是一个版本,通过设置 chartArea.width来删除大部分额外的空白到 100% chartArea.height 80% $ c> legend.position 底部

By adding and tuning some configuration options listed in the API documentation, you can create a lot of different styles. For instance, here is a version that removes most of the extra blank space by setting the chartArea.width to 100% and chartArea.height to 80% and moving the legend.position to bottom:

// Set chart options
var options = {'title': 'How Much Pizza I Ate Last Night',
               'width': 350,
               'height': 400,
               'chartArea': {'width': '100%', 'height': '80%'},
               'legend': {'position': 'bottom'}
    };

如果要进一步调整,请尝试更改这些值或使用上述链接中的其他属性。

If you want to tune it more, try changing these values or using other properties from the link above.

这篇关于从Google图表中删除填充或边距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆