2017-01-11 29 views

回答

1

您可以將點指定爲數組或對象,並將正確的顏色與點關聯。

的使用陣列和series.keys屬性:

series: [{ 
     type: 'scatter', 
     keys: ['y', 'color'], 
     data: [[3, 'red'],[4, 'blue'],[6, 'red'], [4, 'green'],[2, 'blue'],[1, 'blue'],[2, 'blue']] 
    }], 

例如:http://jsfiddle.net/8u3q6omm/

對象:

series: [{ 
     type: 'scatter', 
     data: [{y: 3, color: 'red'},{y: 4, color: 'blue'},{y: 6, color: 'red'}, {y: 4, color: 'green'},{y: 2, color: 'blue'},{y: 1, color: 'blue'},{y: 2, color: 'blue'}] 
    }], 

例如:http://jsfiddle.net/8u3q6omm/1/

如果有任何圖案價值和顏色,你可以編寫關聯顏色的功能或使用Highcharts zones

+0

這正是我所期待的。謝謝! – Aquabug222

相關問題