在我的水平条形图的高级图表配置中,当我添加自定义的pointWidth时,我不能更改两个条形图之间的距离。
请注意maxPointWidth: 8
{
chart: {
type: 'bar'
},
title: {
text: ''
},
xAxis: {
categories: ['Document', 'Image', 'Audio', 'CAD', 'Zip'],
title: {
text: 'File Type',
align: 'high',
offset: 0,
rotation: 0,
y: -10,
x: -15
},
lineColor: 'transparent',
minorTickLength: 0,
tickLength: 0,
labels: {
style: {
}
}
},
yAxis: {
opposite: true,
title: {
text: '# Files',
align: 'middle',
style: {
/* TODO: Modify styles to accommodate the bars header */
color: '#000000'
}
},
tickInterval: 2,
gridLineColor: 'transparent',
labels: {
enabled: false
}
},
tooltip: {
valueSuffix: ' millions'
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 80,
floating: true,
borderWidth: 1,
backgroundColor: ('#FFFFFF'),
shadow: true,
enabled: false
},
credits: {
enabled: false
},
series: [{
name: '',
data: [56, 30, 15, 11, 5],
maxPointWidth: 8
}],
colors: this.colors || defaultColors
}下面是工作的JS小提琴:https://stackblitz.com/edit/highcharts-angular-drilldown?file=app%2Fapp.component.ts
我想减少酒吧和标签之间的间隔,并保持maxPointWidth的完整。在这里输入图像描述
发布于 2018-10-12 07:22:06
若要减少条形图之间的间距,请减少图表height
chart: {
type: 'bar',
height: 200
}现场演示:http://jsfiddle.net/BlackLabel/msph2uca/
https://stackoverflow.com/questions/52770474
复制相似问题