我是highcharts的新手,并成功创建了饼图。但我想在宽度为33%的div中显示它,因此饼图的大小很小,标签的宽度比饼图宽。
我想减少标签的宽度或长度,增加饼图的面积
这是代码
var css = ClaimSubmissionStatus;// its array getting form backend
css.splice(0, 1);
var mycss = css;
var chart = {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
};
var tooltip = {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
};
var plotOptions = {
pie: {
allowPointSelect: true,
cursor: 'pointer',
point: {
events: {
click: function () {
alert('Category: ' + this.x + ', value: ' + this.y);
}
}
},
dataLabels: {
enabled: true,
format: '<b>{point.name}%</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) ||
'black'
}
}
}
};
var series = [{
type: 'pie',
animation: false,
name: '',
data: mycss,
}];
var json = {};
json.chart = chart;
json.series = series;
json.plotOptions = plotOptions;
$('#divClaimSubmission').highcharts(json);
这是图片