问题
I've not found an API or previous question that addresses changing the width of the solid gauge data plot.
I can easily change the chart width, plot width, plot padding, arc background's inner and outer widths... but not the chart.
How do I prevent the chart (green) from overlapping the background (white)? (Just created account, so can't insert images yet)
https://www.dropbox.com/s/dtvekgi9uyxvpww/arc.png
pane: {
center: ['50%', '70%'],
size: '130%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor: '#fff',
innerRadius: '75%',
outerRadius: '100%',
shape: 'arc',
borderColor: 'transparent'
}
},
Adjusting the '130%' doesn't solve the issue.
UPDATE::: http://jsfiddle.net/jm8E4/3/
Thanks
回答1:
You can use innerRadius on yAxis.
plotOptions: {
solidgauge: {
innerRadius: '75%',
dataLabels: {
y: -45,
borderWidth: 0,
useHTML: true
}
}
},
http://jsfiddle.net/jm8E4/6/
回答2:
Try below code
EDITED
i have changed innerradius
and outerradius
background: {
backgroundColor: '#fff',
innerRadius: '60%',
outerRadius: '100%',
shape: 'arc',
borderColor: 'transparent'
}
create chart with innerRadius
same as outerRadius
outerRadius
is the background radius on which chart will shown and innerRadius
is chart radius.
Demo Edited Fiddle
来源:https://stackoverflow.com/questions/23319122/highcharts-solid-gauge-width