我试图使用pointWidth为瀑布图表中的条形设置固定宽度,但使用它我无法增加整组条的宽度。
我尝试使用groupPadding和pointPadding。它没有多大帮助。
下面是我习惯在highcharts中设置的图表。
{
chart: {
type: "waterfall"
},
title: {
text: "Grouped Waterfall"
},
xAxis: {
categories:['Commission', 'Client Fee', 'Fee', 'Discount', 'Payaway', 'Revenue'],
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'GWP'
}
},
plotOptions: {
waterfall: {
pointWidth: 20,
}
},
series: [
{
name: "Tokyo",
data: [
{ y: 116440000, w: 20 },
{ y: 9390000, w: 20 },
{ y: 5410000, w: 20 },
{ y: -66880000, w: 20 },
{ y: -2270000, w: 20 },
{ y: 62090000, isSum: true }
]
},
{
name: "New York",
data: [
{ y: 9390000 },
{ y: 116440000 },
{ y: -66880000 },
{ y: 5410000 },
{ y: -2270000 },
{ isSum: true, y: 62090000 }
]
},
{
name: "London",
data: [
{ y: 116440000 },
{ y: 9390000 },
{ y: 5410000 },
{ y: -66880000 },
{ y: -2270000 },
{ isSum: true, y: 62090000 }
]
},
]
}
您可以将pointWidth
选项用于单个数据点:
series: [{
...,
data: [{
y: 116440000,
pointWidth: 20
}, ... ]
}]
现场演示:http://jsfiddle.net/BlackLabel/c0yxh432/
API参考:https://api.highcharts.com/highcharts/series.column.data.pointWidth