当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - highcharts IE8 redraw chart issue

问题描述:

I have a problem with highcharts in IE8. I have such simple (for demonstration) code:

$(document).ready(function() {

chart = new Highcharts.Chart({

chart: {

renderTo: 'container',

type: 'area',

},

series: [{

data: [1,2,3]

}]

});

});

that works well.

When I try to redraw a chart

$(document).ready(function() {

chart = new Highcharts.Chart({

chart: {

renderTo: 'container',

type: 'area',

},

series: [{

data: [1,2,3]

}]

});

chart.redraw();//NEW LINE

});

I get an error 'undefined is null or not an object', file - "http://www.highcharts.com/js/testing.js", line 9495.

The code above does work with any browsers but IE8-

Here - http://jsfiddle.net/sUXsu/4/ I have the same code that does work in the same browser (IE8).

I use jquery-1.7.2.min.js and jquery-ui-1.8.16.custom.min.js

Thanks for your answers.

网友答案:

Try to remove the last commas

chart: {
    renderTo: 'container',
    type: 'area', <----
}

IE8 has some issues with those.

See this question also

分享给朋友:
您可能感兴趣的文章:
随机阅读: