PIE Chart在使用HighCharts的IE 8中不起作用

时间:2013-06-13 19:09:56

标签: jquery image internet-explorer-8 highcharts

我正在使用Jquery 1.6.2.min和High Charts 3.0.1
     饼图在Firefox中正常显示,但在IE8中没有切片。我正在使用Ruby on rails:         以下是我用于HighCharts的代码:         ================================================== ================================

$(document).ready(function () {
    $('#pie1').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: 'Testing'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                showInLegend: true,
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    formatter: function () {
                        return '<b>' + this.point.name + '</b>: ' + this.y;
                    }
                }
            }
        },
        series: [{
            type: 'pie',
            name: 'Summary',
            point: {
                events: {
                    click: function (e) {
                        switch (e.point.name) {
                            case 'Awaiting Validation':
                                $('select[name="rpt_type"]').find('option:contains("To Be Validated")').attr("selected", true);
                                $('#fileFilter').val($('select[name="rpt_type"]').find('option:contains("To Be Validated")'));
                                TTST.searchList();;
                            case 'Not Started':
                                $('select[name="rpt_type"]').find('option:contains("To Be Scrubbed")').attr("selected", true);
                                $('#fileFilter').val($('select[name="rpt_type"]').find('option:contains("To Be Scrubbed")'));
                                TTST.searchList();;
                            case 'Completed':
                                $('select[name="rpt_type"]').find('option:contains("Completed")').attr("selected", true);
                                $('#fileFilter').val($('select[name="rpt_type"]').find('option:contains("Completed")'));
                                TTST.searchList();;
                        }
                    }
                }
            },
            data: [{
                name: 'Awaiting Validation',
                y: parseInt(scrubbed)
            }, {
                name: 'Not Started',
                y: parseInt(ntStarted)
            }, {
                name: 'Completed',
                y: parseInt(totalComplete),
                sliced: true,
                selected: true
            }]
        }]
    });
});

在Firefox中我得到了正确的饼图,但是在IE8中它显示为空白。没有切片即将来临

1 个答案:

答案 0 :(得分:1)

我复制了你的例子:http://jsfiddle.net/tHwQK/show/,所有这些都在IE8(8.0.6001.18702)中正常工作。我只用值替换了数据(parseInt(totalComplete)),因为我没有关于变量定义/值的信息。

PS。你有哪个版本的IE?

相关问题