我希望能爲造型線Highchart提供一些幫助。Highcharts造型問題
我想在這裏得到圖表看起來像圖像:
但我掙扎着爬塊彩色標貼?
任何幫助將不勝感激!
感謝
$('#container').highcharts({
chart: {
type: 'line',
plotBackgroundImage: 'images/fibre.jpg',
plotBorderWidth: 0,
/*,
marginRight: 130,
marginBottom: 25*/
},
title:
{
text : strTitle
},
tooltip:
{
enabled: false
},
xAxis:
{
categories: arrXAxis,
title:
{
text: strXTitle
},
},
yAxis:
{
title:
{
text: ''
},
labels: {
formatter: function() {
// return this.value +'?'
return('');
}
},
min: 0,
max: 10,
minorGridLineWidth: 0,
alternateGridColor: null,
gridLineWidth: 0,
plotBands:
[{
from: intRedStart,
to: intRedEnd,
color: 'rgba(229, 28, 36, 0.6)',
label:
{
text: 'High Risk',
style:
{
color: '#606060'
}
}
},
{
from: intAmberStart,
to: intAmberEnd,
color: 'rgba(239, 140, 30, 0.6)',
label:
{
text: 'Improvement',
style:
{
color: '#606060'
}
}
},
{
from: intGreenStart,
to: intGreenEnd,
color: 'rgba(43, 174, 115, 0.6)',
label:
{
text: 'Healthy',
style:
{
color: '#606060'
}
}
}
]
},
legend: {
/*
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0*/
},
series:
[{
allowPointSelect: false,
showInLegend: false,
data: arrData
} /*, {
name: '1',
data: [10]
}, {
name: '2',
data: [0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
}, {
name: '3',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
}*/]
});
嘿感謝您的答覆,但它的塊健康,改善,高風險的單色我試圖重新創建 - 而不是圖像上的不透明陰謀帶! – ojsglobal 2013-04-25 09:46:11
有yuu試圖設置plotbands標籤? http://api.highcharts.com/highcharts#xAxis.plotBands.label? – 2013-04-25 09:48:00
標籤有效,但設置背景色樣式似乎不起作用。圖表標籤也是如此。我無法找到一種方法來完成TheBounder想要的。我已更新他的帖子,在他的鏈接中添加圖表來源。 – SteveP 2013-04-25 12:40:51