Highcharts问题,TypeError:无法读取未定义的属性“ indexOf”

时间:2020-01-14 12:33:20

标签: javascript highcharts

当我尝试在lineColor和pixelIntervals中使用linearGradient时,出现此错误。

TypeError: Cannot read property 'indexOf' of undefined
    at eval (highcharts.js?ea7f:42)
    at Array.forEach (<anonymous>)
    at c.SVGRenderer.eval (highcharts.js?ea7f:42)
    at Object.c.fireEvent (highcharts.js?ea7f:30)
    at c.SVGElement.complexColor (highcharts.js?ea7f:40)
    at c.SVGElement.fillSetter (highcharts.js?ea7f:66)
    at c.SVGElement.O.stroke-widthSetter.O.strokeSetter (highcharts.js?ea7f:68)
    at c.SVGElement.eval (highcharts.js?ea7f:45)
    at n (highcharts.js?ea7f:12)
    at c.SVGElement.attr (highcharts.js?ea7f:45) "
    in HighchartsWrapper (created by CompactPeerComparison)
    in CompactPeerComparison (created by CompactPeerComparisonWrapper)
    in CompactPeerComparisonWrapper"

这是我的配置,

yAxis: [
      {
        labels: {
          format: '{value} %'
        },
        tickPixelInterval: 175,
        startOnTick: true,
        endOnTick: true,
        ceiling: 200,
        floor: -100
      },
      lineColor: {
        linearGradient: ['100%', 0, 0, 0],
        stops: [
          [0, '#58DA5D'],
          [1, '#ED4E4E']
        ]
      }
    ]

0 个答案:

没有答案