google visualization line chart remove horizontal grid lines

前端 未结 2 1134
伪装坚强ぢ
伪装坚强ぢ 2021-01-07 17:26

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

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


        
相关标签:
2条回答
  • 2021-01-07 17:47

    Set gridlines color to none

     gridlines: {
                    color: 'none'
                }
    

    This will also work

    0 讨论(0)
  • 2021-01-07 18:00

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

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

    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.

    0 讨论(0)
提交回复
热议问题