Javascript 删除highcharts饼图中的边距
我正在尝试删除饼图的默认高度。这是我使用的代码 我想将黄色背景容器的大小减小到图表的高度。 这是我正在使用的代码Javascript 删除highcharts饼图中的边距,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,我正在尝试删除饼图的默认高度。这是我使用的代码 我想将黄色背景容器的大小减小到图表的高度。 这是我正在使用的代码 $(function () { $('#container').highcharts({ chart: { backgroundColor: 'yellow', margin: [0, 0, 0, 0] }, title: { text: 'In<br&
$(function () {
$('#container').highcharts({
chart: {
backgroundColor: 'yellow',
margin: [0, 0, 0, 0]
},
title: {
text: 'In<br>Progress',
align: 'center',
verticalAlign: 'middle',
y: 50
},
tooltip: {
pointFormat: ''
},
plotOptions: {
pie: {
dataLabels: {
enabled: true,
distance: -50,
style: {
fontWeight: 'bold',
color: 'white',
textShadow: '0px 1px 2px black'
}
},
borderWidth: 0,
startAngle: -90,
endAngle: 90,
center: ['50%', '75%']
}
},
colors: ['#88ad34', '#333'],
series: [{
type: 'pie',
name: 'Browser share',
innerSize: '80%',
data: [
['', 75],
['', 25]
]
}]
});
});
为什么不使用solidgauge?或者:设置饼图和中心的大小:[50%,100%],请参见:-大小=200%,因为您只显示饼图的一半。如果这就是完整的馅饼,那么100%就足够了。