[英]Remove the border around the pie chart in high charts
How to remove the border around the pie chart. 如何删除饼图周围的边框。
I tried the following options but it didn't work : 我尝试了以下选项,但没有成功:
plotOptions.pie.borderWidth: 0 plotOptions.pie.borderWidth:0
plotOptions.pie.borderColor: '#f2f2f2' it also didn't work. plotOptions.pie.borderColor:'#f2f2f2'它也不起作用。
Here is the full code : 这是完整的代码:
$('#PreQualifiedChart').highcharts({
chart: {
plotBackgroundColor: '#f2f2f2',
plotBorderWidth: 0,
plotShadow: false,
height: 300,
widht: 250,
},
credits: {
enabled: false
},
exporting: {
buttons: {
contextButton: {
enabled: false
}
}
},
title: null,
tooltip: {
headerFormat: '',
pointFormat : '{point.name}: <b>{point.y} ({point.percentage:.1f}%)</b>'
},
plotOptions: {
pie: {
dataLabels: {
enabled: true,
distance: -50,
style: {
fontWeight: 'bold',
color: '#f2f2f2',
textShadow: '0px 1px 2px black'
}
},
center: ['50%', '50%'],
borderWidth: 0,
borderColor: '#f2f2f2'
}
},
series: [{
dataLabels: {
enabled: false,
},
type: 'pie',
name: '',
innerSize: '50%',
data: [
{
name: 'Submitted All Docs',
y: SAD,
color: '#4B99D2',
labels: {
enabled: false
},
},
{
name: 'Submitted Missing Docs',
y: SMD,
color: '#e5a34a',
labels: {
enabled: false
},
},
{
name: 'Not Submitted',
y: NS,
color: '#844b03',
labels: {
enabled: false
},
}
]
}]
});
I think that you can use marginTop, marginBottom etc. in your case. 我认为您可以在情况下使用marginTop,marginBottom等。 Here you can find information about this parameters in Highcharts API: 在这里,您可以在Highcharts API中找到有关此参数的信息:
http://api.highcharts.com/highcharts#chart.marginTop http://api.highcharts.com/highcharts#chart.marginBottom http://api.highcharts.com/highcharts#chart.marginLeft http://api.highcharts.com/highcharts#chart.marginRight http://api.highcharts.com/highcharts#chart.margin 顶部 http://api.highcharts.com/highcharts#chart.margin 底部 http://api.highcharts.com/highcharts#chart.margin 左 http:// api .highcharts.com / highcharts#chart.marginRight
Here you can find an example how your chart may work with this approach: 在这里,您可以找到一个示例,说明图表如何使用这种方法:
chart: {
marginTop: 0,
marginBottom: 0,
marginLeft: 0,
marginRight: 0,
plotBackgroundColor: '#f2f2f2',
plotBorderWidth: 0,
plotShadow: false,
height: 200,
widht: 150,
},
http://jsfiddle.net/pe4csrr7/3/ http://jsfiddle.net/pe4csrr7/3/
Another idea is to use backgroundColor instead of plotbackgroundColor, here you can see an example how it may work: 另一个想法是使用backgroundColor代替plotbackgroundColor,在这里您可以看到一个示例其工作方式的示例:
chart: {
backgroundColor:'#f2f2f2',
plotBorderWidth: 0,
plotShadow: false,
height: 200,
widht: 150,
},
http://jsfiddle.net/pe4csrr7/4/ http://jsfiddle.net/pe4csrr7/4/
Regards, 问候,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.