0
我有一個圖表一起系列數據的一堆類,每類只有一個入口,每個類別只值系列之一:如何渲染不同系列的條形圖與HighCharts
的問題是,該酒吧沒有在類的中心開始,但在開始或結束,這取決於其是否在第一或第二個系列。
有沒有辦法在中心開始吧?
實施例:http://jsfiddle.net/ms1kfrox/
圖表設置:
{
chart: {
type: 'bar'
},
xAxis: {
categories: ['A', 'B', 'C', 'D', 'E'],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: 'Population (millions)',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' millions'
},
plotOptions: {
bar: {
dataLabels: {
padding: 0,
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 100,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
credits: {
enabled: false
},
series: [{
name: 'Type1',
data: [null, {
y: 870
},
null, {
y: 408
},
null
]
}, {
name: 'Type2',
data: [{
y: 973
},
null, {
y: 680
},
null, {
y: 34
}
]
}]
}