How can I fix Highcharts error #13?

前端 未结 9 2198
迷失自我
迷失自我 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条回答
  •  -上瘾入骨i
    2020-12-11 16:14

    I had the same issue and fixed it using the correct container:

    In my case I used the following:

    // Use Meteor.defer() to create chart after DOM is ready:
    Meteor.defer(function() {
      // Create standard Highcharts chart with options:
      Highcharts.chart('Charts', {
        chart: {
          renderTo: 'container',
            type: 'column',
            options3d: {
                enabled: true,
                alpha: 15,
                beta: 15,
                depth: 50,
                viewDistance: 25
            }
        },....
      }.....
    }
    
    Template.body.helpers({
      createChart: function () {...}
    

    and in the HTML file:

    {{createChart}}

    I found the fix from Highcharts: http://forum.highcharts.com/viewtopic.php?f=9&t=15610

    Regards.

提交回复
热议问题