2017-02-16 107 views
0

我正在尋找更改Highcharts蜘蛛網絡圖的蜘蛛線。我使用的是JSFiddlesomeone else,因爲我的某些原因沒有工作。Highcharts - 無法更改線條顏色

我希望能夠改變蜘蛛線的線條顏色。我需要更改哪些屬性才能獲得該屬性?

$('#emotion-ranking-graph-bar').highcharts({ 
    chart: { 
     polar: true, 
     type: 'line', 
     backgroundColor: 'rgba(255,255,255,0.0)' 
    }, 
    exporting: { 
     enabled: false 
    }, 
    title: { 
     text: '', 
     x: 0 
    }, 
    pane: { 
     size: '80%' 
    }, 
    xAxis: { 
     categories: ['Joy', 'Sorrow', 'Anger', 'Seriousness', 
       'Information Technology', 'Administration'], 
     tickmarkPlacement: 'on', 
     lineWidth: 0, 
     labels: { 
      enabled: true 
     } 
    }, 
    yAxis: { 
     gridLineInterpolation: 'polygon', 
     lineWidth: 0, 
     min: 0, 
     color: 'rgba(255,255,255,1)', 
     labels: { 
      enabled: false 
     } 
    }, 
    tooltip: { 
     shared: true, 
     pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>' 
    }, 
    legend: { 
     enabled: false 
    }, 
    series: [{ 
     name: 'Emotional Analysis Spectrum', 
     data: [43000, 19000, 60000, 35000, 17000, 10000], 
     pointPlacement: 'on', 
     color: 'rgba(0,0,0,0.7)' 
    }] 
}) 

回答

2

從中心到外部去的線是yAxis,並且使五邊形的線是xAxis。你必須改變上都gridLineColor選項:

http://jsfiddle.net/przJs/41/

在這裏,你有很多選擇去撥弄:http://api.highcharts.com/highcharts/xAxis.gridLineColor

+0

謝謝你,你怎麼改變的系列線的厚度在蛛網圖? – qarthandso

+1

這就是'lineWidth'參數,可以通過兩種方式應用。通過將其添加到要更改厚度的系列或通過'plotOptions'添加到您想要應用它的系列類型(在本例中爲'line'),並將應用於該類型的所有系列。打開我發佈的鏈接,並在左側的'lineWidth'搜索框中輸入內容,您將看到所有可以應用它的位置。在每個解釋下面還有(通常)「試用」選項,可以打開小提琴,您可以在其中看到它。 –

+0

謝謝,我只是習慣了文檔,但會繼續搜索。對於圖上點的厚度和顏色,我將使用什麼屬性? – qarthandso