2
votes

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.

1
Are you sure it doesn't work ? It works for me. Why do you want to redraw your chart after render it ? Doesn't make sense.Ricardo Alvaro Lohmann
I had another weird "undefined is not an object" issue with Highcharts that was fixed once I switched from JQuery 1.4.2 to 1.8.2. (The demo version of the Flux editor linked to 1.4.2 by default.)Sergey Orshanskiy

1 Answers

2
votes

Try to remove the last commas

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

IE8 has some issues with those.

See this question also