0

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.

unidha
  • 307
  • 5
  • 20
  • You didn't provide whole code. Using your chart code, setting up my `categories` and `data`, and including jquery 1.8.3 (`$.browser.msie` is not available from 1.9.0 on) I got chart without error. It'd best to prepare example in jsFiddle. – Anto Jurković Dec 19 '13 at 08:15
  • please provide full code – SPandya Dec 19 '13 at 09:13

2 Answers2

0

Try to change that line:

if ($.browser.msie && parseInt($.browser.version <= 8) && !CHART_CUT_LINE_FOR_IE) {
            continue;
        }

to:

if ($.browser.msie && parseInt($.browser.version, 10) <= 8 && !CHART_CUT_LINE_FOR_IE) {
            continue;
        }
Paweł Fus
  • 44,795
  • 3
  • 61
  • 77
0

I bumped into this URL: Highcharts IE issues with jQuery ajax load . I commented the snippet below from my highcharts.js file

,C.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; }

It works, now it working in IE.

Community
  • 1
  • 1
unidha
  • 307
  • 5
  • 20