2013-07-10 136 views
0

我在尋找類似這樣的半餅圖:Highcharts餅圖

i.stack.imgur.com/I26zG.png

我找計圖表,但在這種情況下,一系列不打印,only print the dial values,也不要打印樂隊

我正在考慮用實時打印plotband。但在這種情況下,圖表api不可能改變,或者我沒有找到它。

使用餅圖是其他可能性,但在這種情況下,我需要從-90º開始到+90º,並且我沒有找到任何如何使用,並且type = pie沒有窗格(// api.highcharts.com/highcharts#pane)選項。

任何人都可以幫助我嗎?

回答

1

您可以撥打Axis.update()並將它傳遞給Axis配置設置的對象。其中一個設置可以是新的plotBands值。因此,每次更新測量值時,都會重置測量值兩側的測量桿。你需要調整其他的東西來讓我的例子看起來像你的形象。

看看這個的jsfiddle:http://jsfiddle.net/ZrGut/

yAxis.update({ 
    plotBands: [{ 
     from: 0, 
     to: leftVal, 
     color: 'pink', 
     innerRadius: '100%', 
     outerRadius: '0%' 
    },{ 
     from: leftVal, 
     to: 90, 
     color: 'tan', 
     innerRadius: '100%', 
     outerRadius: '0%' 
    }] 
}, false); 
1

直到昨天晚上I found other solution,附上去撥弄。謝謝你的幫助。

plotOptions: { 
      pie: { 
       startAngle: 0, 
       allowPointSelect: true, 
       innerSize: '110%', 
       size:'150%', 
       center: [100,200], 
       allowPointSelect: true, 
       cursor: 'pointer', 
       dataLabels: { 
        enabled: null, 
        color: '#000000', 
        connectorColor: '#000000', 
        format: '<b>{point.name}</b>: {point.percentage:.1f} %' 
       } 
      } 
     }