2013-04-16 69 views
0

我HighCharts餅圖沒有得到渲染僅在IE瀏覽器,它在Chrome,FF,Opera和Safari正確呈現。但問題出在我的IE9上。我已經閱讀了stackoverflow中的帖子,我相應地糾正了我的代碼,即使我沒有運氣。 下面是我的示例代碼名爲.jsHighCharts(jQuery的餅圖)是沒有得到呈現在IE

$(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> 

有人能指出我哪裏做錯了

回答

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釋放?