5
我正在使用条形图(使用百分比堆叠)构建一个进度条,并且想要删除容器中的空格/填充并仅保留没有任何填充/页边空白的栏在图表容器中。HighCharts - 删除条形图的填充
有没有办法完成这个?
代码:
$(function() {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'bar'
},
legend: {
enabled: false,
},
title: {
text: ''
},
xAxis: {
lineWidth: 0,
labels: {
enabled: false
},
minorTickLength: 0,
tickLength: 0
},
yAxis: {
min: 0,
title: {
text: ''
},
lineWidth: 0,
gridLineWidth:0,
lineColor: 'transparent',
labels: {
enabled: false
},
minorTickLength: 0,
tickLength: 0
},
tooltip: {
enabled: false
},
plotOptions: {
bar: {
stacking: 'percent'
},
series: {
pointPadding: 0,
groupPadding: 0,
}
},
series: [{
name: 'max',
data: [40],
color: 'white'
}, {
name: 'current',
data: [60],
color: 'green'
}]
});
});
});