2015-03-31 40 views
1

如果我在SP 2013本地站點上使用,但不在SharePoint Online站點上,這將正常工作和執行。它有時會在網上以編輯模式顯示,但在保存後會消失......我使用過內容和腳本編輯器。有任何想法嗎??代碼不適用於使用SEWP的SP在線網站頁面

<script language = "javascript" src="http://code.highcharts.com/highcharts.js"> 
<script language = "javascript" src="http://code.highcharts.com/modules/exporting.js"></script> 
<script type="text/javascript"> 
$(function() { 
$('#container').highcharts({ 
    chart: { 
     plotBackgroundColor: null, 
     plotBorderWidth: null, 
     plotShadow: false 
    }, 
    title: { 
     text: 'Browser market shares at a specific website, 2014' 
    }, 
    tooltip: { 
     pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' 
    }, 
    plotOptions: { 
     pie: { 
      allowPointSelect: true, 
      cursor: 'pointer', 
      dataLabels: { 
       enabled: true, 
       format: '<b>{point.name}</b>: {point.percentage:.1f} %', 
       style: { 
        color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' 
       } 
      } 
     } 
    }, 
    series: [{ 
     type: 'pie', 
     name: 'Browser share', 
     data: [ 
      ['Firefox', 45.0], 
      ['IE',  26.8], 
      { 
       name: 'Chrome', 
       y: 12.8, 
       sliced: true, 
       selected: true 
      }, 
      ['Safari', 8.5], 
      ['Opera',  6.2], 
      ['Others', 0.7] 
     ] 
    }] 
}); 

</script> 

+0

您忘記關閉您的第一個腳本標記。 – Daedalus 2015-04-01 07:48:48

+0

是的,不知道這是怎麼發生的。意識到我發佈後。在我的SharePoint代碼中,它已關閉。 – kryoung 2015-04-01 20:39:53

回答

相關問題