2015-04-15 38 views
0

更新:我試圖與hightcharts雷達圖,但我無法連接這個值(例如具有星號的):連接限制在Highcharts系列

 $('#container').highcharts({  
 
     plotOptions: { 
 
      series: { 
 
       enableMouseTracking: false 
 
      } 
 
     }, 
 
     chart: { 
 
      polar: true, 
 
      type: 'line' 
 
     }, 
 
     title: { 
 
      text: 'Graph', 
 
      x: -80 
 
     }, 
 
     pane: { 
 
      size: '80%' 
 
     }, 
 
     xAxis: { 
 
      categories: ["Sponsor/Developer","Banks","SPV","Bank Legal DD","Services Legal contracts","Environmental license","Grid connection license","Construction License","Generation License","Site Studies\/License","Property\/terrain","Technical studies","EPC","Financial model"], 
 
      tickmarkPlacement: 'on', 
 
      lineWidth: 0       
 
     }, 
 
     yAxis: { 
 
      gridLineInterpolation: 'polygon', 
 
      lineWidth: 0, 
 
      min: 0    
 
     }, 
 
     tooltip: { 
 
      shared: true, 
 
      pointFormat: '<span style=\'color:{series.color}\'>{series.name}: <b>\${point.y:,.0f}</b><br/>' 
 
     }, 
 
     legend: { 
 
      align: 'right', 
 
      verticalAlign: 'top', 
 
      y: 70, 
 
      layout: 'vertical' 
 
     },       
 
     series: [{"name":"Legal","data":[4,3,4,4,4,4,4,null,null,null,null,null,null,4],"color":"#206ef0"},{"name":"Licenses and Permits","data":[null,3,null,null,null,4,4,4,4,4,4,null,null,null],"color":"#f07820"},{"name":"Technical","data":[null,null,null,null,null,null,null,null,null,null,4,4,4,null],"color":"#ff0000"},{"name":"Financial","data":[null,null,null,null,null,null,null,null,null,null,null,null,null,null]}]});
<div id="container"></div> 
 

 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> 
 
<script src="http://code.highcharts.com/highcharts.js"></script> 
 
<script src="http://code.highcharts.com/highcharts-more.js"></script>

目標是連接任何系列的系列限制。我的意思是,如果在Excel中我有同樣的系列,財務模型贊助商/開發商將通過藍線連接。看: excel graph 我該怎麼辦? 謝謝。

+0

的值沒有被鏈接,因爲點之間是空值。刪除此值然後打印。每個點你只能使用y的pair [x,y] instad。 –

+0

我剛剛編輯我的問題。它的代碼正在運行。例如,當我在Excel中創建這個圖表並且我擁有相同的系列時,**財務模型**和**贊助商/開發人員**將通過藍線連接 – Luis

+0

我還添加了一個Excel圖像 – Luis

回答

0

在圖表中,您可以使用具有啓用lineWidth的散點圖系列。在最後一點之後,添加對第一點的引用,然後將打印行。

{ 
     "name": "Legal", 
     "data": [[0,4], [1,3], [2,4], [3,4], [4,4], [5,4], [6,4], null, null, null, null, null, null,[13,4],[0,4]], 
     "color": "#206ef0" 
} 

通過設置tickInterval/endOnTick/max選項,您可以在邊上設置線條。

yAxis: { 
     max:4, 
     tickInterval:1, 
     endOnTick:true, 
     gridLineInterpolation: 'polygon', 
     lineWidth: 0, 
     min: 0 
    }, 

實施例:http://jsfiddle.net/rLfj69b9/8/

+0

It works !,謝謝。 – Luis