谷歌可视化折线图删除水平网格线 [英] google visualization line chart remove horizontal grid lines

查看:221
本文介绍了谷歌可视化折线图删除水平网格线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何删除Google可视化折线图中的水平网格线?我已经尝试设置

How do I remove the horizontal grid lines in a Google visualization line chart? I have already tried setting

minorGridlines: {count: 0 }, gridlines: {count: 0 } 

在hAxis和vAxis上都有。

on both hAxis and vAxis.

这是我的一个jsfiddle图表。

Here is a jsfiddle of my chart.

http://jsfiddle.net/martlark/2XBhc/

推荐答案

vAxis.gridlines.color 选项设置为透明消失:

Set the vAxis.gridlines.color option to "transparent" to make them disappear:

vAxis: {
    gridlines: {
        color: 'transparent'
    }
}

这对于在IE< 9(因为这些版本使用VML而不是SVG,并且图表不支持VML中的透明度)。在这种情况下,您需要设置网格线颜色以匹配图表的背景颜色。

This doesn't work for the charts when displayed in IE < 9 (as those versions use VML instead of SVG, and the chart's don't support transparency in VML). In this case, you will need to set the gridline color to match the background color of the chart.

这篇关于谷歌可视化折线图删除水平网格线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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