2

I have a simple barchart which does not render correctly under IE8 (columns are not visible). It does display correctly with firefox and IE 9+.

I'am using jQuery 1.8.3 and highcharts 3.0.3.

I keep datas in the code sample because the number of columns to draw is important in reproducing the problem. The graph renders correctly in IE8 if I remove one serie.

Here is the code :

$(function () {
    $(document).ready(function() {
        var barOptions = {
            chart: {
                renderTo: 'container',
                width:450,
                height:350,
                type: 'column'
            },
            xAxis: {
                categories: [0,1,2,3,4,5,6,7,8,9,10]
            },
            series: [{
                name: 'NC',
                data: [7057, 6858, 6643, 6570, 6115, 107, 31, 635, 203, 2, 2]
            }, {
                name: 'OK',
                data: [54047, 52484, 50591, 49479, 46677, 33, 156, 947, 408, 6, 2]
            }, {
                name: 'KO',
                data: [11388, 11115, 10742, 10757, 10290, 973, 914, 4054, 732, 34, 2]
            }, {
                name: 'VALID',
                data: [8836, 8509, 8255, 7760, 7621, 973, 914, 4054, 732, 34, 2]
            }, {
                name: 'CHECK',
                data: [115, 162, 150, 187, 172, 973, 914, 4054, 732, 34, 2]
            }, {
                name: 'COR',
                data: [12566, 12116, 11446, 10749, 10439, 973, 914, 4054, 732, 34, 2]
            }]
        };

       barChart = new Highcharts.Chart(barOptions);
    });
});

Any ideas on how to fix this ?

4

2 回答 2

1

正如其他人所说,这看起来像是 Highcharts 中的一个错误。一种解决方法是在图表呈现后立即以编程方式隐藏和显示其中一个系列。

JSFiddle 在这里。在这里尝试在IE8中。

$(function () {
    var barOptions = {
        chart: {
            renderTo: 'container',
            width: 450,
            height: 350,
            type: 'column'
        },
        xAxis: {
            categories: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
        },
        series: [{
            name: 'NC',
            data: [7057, 6858, 6643, 6570, 6115, 107, 31, 635, 203, 2, 2]
        }, {
            name: 'OK',
            data: [54047, 52484, 50591, 49479, 46677, 33, 156, 947, 408, 6, 2]
        }, {
            name: 'KO',
            data: [11388, 11115, 10742, 10757, 10290, 973, 914, 4054, 732, 34, 2]
        }, {
            name: 'VALID',
            data: [8836, 8509, 8255, 7760, 7621, 973, 914, 4054, 732, 34, 2]
        }, {
            name: 'CHECK',
            data: [115, 162, 150, 187, 172, 973, 914, 4054, 732, 34, 2]
        }, {
            name: 'COR',
            data: [12566, 12116, 11446, 10749, 10439, 973, 914, 4054, 732, 34, 2]
        }]
    };

    barChart = new Highcharts.Chart(barOptions);
    barChart.series[0].hide();
    barChart.series[0].show();
});
于 2013-08-01T15:11:13.080 回答
1

它看起来像错误,向我们的开发人员报告:https ://github.com/highslide-software/highcharts.com/issues/2091

于 2013-08-01T15:00:21.503 回答