0

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 では空白で表示されます。スライスが来ない`

4

1 に答える 1

1

私はあなたの例を再現しました: http://jsfiddle.net/tHwQK/show/ IE8 (8.0.6001.18702) ですべて正常に動作します。(parseInt(totalComplete))変数の定義/値に関する情報がないため、データのみを値に置き換えました。

ps。使用している IE のバージョンを教えてください。

于 2013-06-14T09:40:12.727 に答える