I already checked coma, semicolon in the code and all seem fine.In Firefox and Chrome it working fine but in IE8 it prompt me Invalid Argument line 80 in Highcharts.js which is point to:
if(!C.namespaces.hcv)C.namespaces.add("hcv","urn:schemas-microsoft-com:vml")
Here is my code
var chart = new Highcharts.Chart({
chart: {
renderTo: container[0],
type: 'column',
style: {
fontFamily: '"Arial", "Helvetica", "sans-serif"',
fontSize: '12px',
fontWeight: 'bold'
},
spacingLeft: 0
},
credits: {
enabled: false
},
title: null,
yAxis: {
title: null,
lineWidth: 2,
lineColor: '#505050',
gridLineWidth: 0,
labels: {
step: 1,
y: 0,
style: {
fontFamily: '"Arial", "Helvetica", "sans-serif"',
fontSize: '11px',
fontWeight: 'normal'
}
},
min: 0,
minRange:0.1
},
xAxis: {
categories:cat,
labels: {
style: {
fontFamily: '"Arial", "Helvetica", "sans-serif"',
fontSize: '11px',
fontWeight: 'normal',
width: '90px'
}
},
tickWidth: 0
},
plotOptions: {
column: {
dataLabels: {
enabled: true,
formatter: function() {
var percent =0;
var catName =this.x;
if(catName.indexOf('TAM')>=0){
percent = this.y ;
if (percent <= 50) {
return '<span style="color: #7b4000">' + percent + '</span>';
} else {
return '<span style="color: #3a5305">' + percent + '</span>';
}
}
else {
percent =Math.round( this.point.shareValue * 100)/100;
if (percent <= 50) {
return '<span style="color: #7b4000">' + percent + '%</span>';
} else {
return '<span style="color: #3a5305">' + percent + '%</span>';
}
}
},
style: {
fontFamily: '"Arial", "Helvetica", "sans-serif"',
fontWeight: 'bold'
},
zIndex: 11,
useHTML: true
},
borderWidth: 0,
shadow: false
}
},
series: [{
data: data
}],
legend: {
enabled: false
},
tooltip: {
enabled: false
}
}, function(chart) {
for (var i = 0; i < 5; ++i) {
chart.renderer.path(['M', 23, 160.5 - 28 * i, 'L', 34, 160.5 - 28 * i]).attr({
'stroke-width': 1,
stroke: 'white',
'stroke-opacity': 0.7,
zIndex: 10
}).add();
if ($.browser.msie && parseInt($.browser.version <= 8) && !CHART_CUT_LINE_FOR_IE) {
continue;
}
chart.renderer.path(['M', 30, 160.5 - 28 * i, 'L', 300, 160.5 - 28 * i]).attr({
'stroke-width': 1,
stroke: 'white',
'stroke-opacity': 0.3,
zIndex: 10
}).add();
}
});
Any idea?
Thanks.