How can I fix Highcharts error #13?

前端 未结 9 2097
迷失自我
迷失自我 2020-12-11 15:59

I use highchart so, the user can close and open the chart page and redraw the chart, in some case give me this error, how can I fix it, Thanks Here is my code



        
9条回答
  •  醉梦人生
    2020-12-11 16:29

    Categories needs to be a collection, it was like this:

    categories: xaxis
    

    Change it to this:

    categories: ['xaxis']
    

    Some of the data fields need to be enclosed in single quotes like this:

    data: 'blue'
    

    Here is a fiddle without any errors for you:

    http://jsfiddle.net/MVcBe/

    Good luck with the rest. :)

    ps I sometimes find it easier to edit a working fiddle from the highcharts site and adapt it to what you need. Like this one:

    http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/line-basic/

提交回复
热议问题