在以下JSfiddle上,我创建了一个重叠列的图表。但现在图表中的所有列都是重叠的。我现在提出两个小组。这些团体我不想超过一圈。
对于重叠,我使用过:
plotOptions: {
column: {
grouping: false,
shadow: false
}
}
答案 0 :(得分:0)
您应该通过pointPlacement param声明“堆栈”之间的距离。
series: [{
name: 'Stockholm - Sweden',
data: [149.9, 171.5, 106.4 ],
pointPlacement: 0.5
}, {
name: 'Linköping - Sweden',
data: [83.6, 78.8, 98.5],
pointPlacement: 0.5
},
{
name: 'Hamburg - Germany',
data: [183.6, 718.8, 918.5]
},
{
name: 'Berlin - Germany',
data: [831.6, 718.8, 981.5]
}]
示例:
答案 1 :(得分:0)
不完全确定您是希望第二列在刻度线上还是在一个类别中。如果在勾选上,那么上面的答案应该是here。 点放置和点填充可以解决问题。
series: [{
name: 'Employees',
color: 'rgba(165,170,217,0.5)',
data: [150, 200],
pointPadding: 0.4,
pointPlacement: -0.1
}, {
name: 'Employees Optimized',
color: 'rgba(126,86,134,.5)',
data: [140, 130],
pointPadding: 0.4,
pointPlacement: -0.1
}, {
name: 'Profit',
color: 'rgba(248,161,63,0.5)',
data: [183.6, 189],
pointPadding: 0.4,
pointPlacement: 0.1,
}, {
name: 'Profit Optimized',
color: 'rgba(186,60,61,.5)',
data: [203.6, 190],
pointPadding: 0.4,
pointPlacement: 0.1,
}]