我想創建一個圖表與一個酒吧裏面的一個堆積酒吧在圖像見下圖。 Chart http://i61.tinypic.com/317axx4.jpgHighcharts:酒吧內的一個堆積酒吧
我設法把列放在列的內部,但是,我不能讓它工作的酒吧。我怎樣才能把酒吧裏面的堆積酒吧?
var chart = new Highcharts.Chart({
chart: {
renderTo:'container',
},
title: {
text: 'Test %'
},
xAxis: {
categories: ['2014', '2013', '2012', '2011']
},
yAxis: {
opposite: true,
labels: {
format: '{value}%',
},
},
plotOptions: {
series: {
stacking: 'normal'
},
column: {
stacking: 'percent'
}
},
legend: {
enabled: false
},
series: [{
name: 'red',
type: 'bar',
data: [70, 70, 70, 70],
color: 'rgba(253, 155, 155, 1)',
pointPadding: 0.1,
pointPlacement: -0.2,
stack: 'bar'
}, {
name: 'yellow',
type: 'bar',
data: [5, 5, 5, 5],
color: 'rgba(255, 255, 153, 1)',
pointPadding: 0.1,
pointPlacement: -0.2,
stack: 'bar'
}, {
name: 'green',
type: 'bar',
data: [25, 25, 25, 25],
color: 'rgba(204, 255, 153, 1)',
pointPadding: 0.1,
pointPlacement: -0.2,
stack: 'bar'
}, {
name: 'Value',
type: 'bar',
data: [35, 30, 25, 20],
color: 'rgba(126,86,134,.9)',
pointPadding: 0.35,
pointPlacement: -0.2,
dataLabels: {
enabled: true,
format: '{y}%'
},
}]
});
讚賞任何幫助。
由於@Kacper。這工作完美。 – danijelf