代码之家  ›  专栏  ›  技术社区  ›  shifu

设置标签网格线高度图表上的颜色

  •  1
  • shifu  · 技术社区  · 7 年前

    有没有办法更改标签上线条的颜色? enter image description here

    这是我的代码:

      xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        lineColor: '#FF0000',
        labels:{
            lineColor: '#FF0000',
        },
        gridLineColor: 'red',
      },
    
      yAxis: {
        lineColor: '#FF0000',
        lineWidth: 1,
        labels:{
        x: -50,
        }
      },
    

    供参考: http://jsfiddle.net/vq1tqhrs/

    1 回复  |  直到 7 年前
        1
  •  1
  •   ewolden    7 年前

    您需要设置 tickColor ,如下所示:

    xAxis: {
      tickColor: 'red'
      ...
    }
    

    工作示例: http://jsfiddle.net/ewolden/vq1tqhrs/1/