Daveable
Daveable

Reputation: 53

highstock ie8 error

Getting an error using Highstock using IE8

An Error has occurred in the script on this page
Line: 8
Char: 56
Error: Invalid procedure call or argument
Code: 0
URL: js/highstock.js

It works in all other browsers. How is this fixable?

Upvotes: 1

Views: 864

Answers (1)

Daveable
Daveable

Reputation: 53

Sebastian Bochan answered this in the comments above.

"The most common reason why a chart works in modern browsers but fails in IE6, 7 and 8, is stray commas in the configuration options. Stray commas are commas after the last item of an object or an array in JavaScript. These will pass silently in modern browsers, but cause a JavaScript error in legacy IE. For example:"

var chart = new Highcharts.Chart({
chart: {
    renderTo: 'container'
},
xAxis: {
    type: 'datetime'
},
series: [{
    data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
    pointStart: Date.UTC(2012, 0, 1),
    pointInterval: 24 * 3600 * 1000,
}]
});

So check all of your chart settings for any possible strays. If none are found, try what I did by commenting out settings one-by-one until it runs properly.

Upvotes: 1

Related Questions