HighCharts(jQuery饼图)没有在IE中呈现

时间:2013-04-16 06:16:46

标签: jquery highcharts

我的HighCharts饼图不会仅在IE中呈现,它在Chrome,FF,Opera和Safari中正确呈现。但问题出在我的IE9上。我已经阅读了stackoverflow中的帖子,我相应地更正了我的代码,即使我没有运气。 下面是我的示例.js代码

$(function () {
    var chart;

    $(document).ready(function () {

        // Build the chart
        $('#Chart').highcharts({
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false
            },
            title: {
                text:'Time-Off Request'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage}%</b>',
                percentageDecimals: 2

            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: true

                }
            },
            series: [{
                type: 'pie',
                name: 'Time-Off Request Details',
                data: [
                    ['Vacation', 45.0],
                    ['Time-Off', 26.8],
                    ['Sick Time',12.8],
                    ['Personal', 8.5],
                    ['Bereavement', 6.2],
                    ['Others', 0.7]
                ]
            }]
        });
    });

});

这是我的Html div,我正在尝试渲染我的饼图

<div id="Chart">
</div>

有人能指出我在哪里做错了吗

1 个答案:

答案 0 :(得分:0)

我在jsfiddle中复制了你的例子,一切正常。

http://jsfiddle.net/z3fZv/ http://jsfiddle.net/z3fZv/show

$(function () {
    var chart;

    $(document).ready(function () {

        // Build the chart
        $('#Chart').highcharts({
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false
            },
            title: {
                text:'Time-Off Request'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage}%</b>',
                percentageDecimals: 2

            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: true

                }
            },
            series: [{
                type: 'pie',
                name: 'Time-Off Request Details',
                data: [
                    ['Vacation', 45.0],
                    ['Time-Off', 26.8],
                    ['Sick Time',12.8],
                    ['Personal', 8.5],
                    ['Bereavement', 6.2],
                    ['Others', 0.7]
                ]
            }]
        });
    });

});

你有最新的highcharts发布吗?