简体   繁体   English

饼图标签

[英]Pie Chart Label

my pie chart displays perfectly but my labels are placed where they are but not good positioned because they lap on the chart halfway this is my code我的饼图显示完美,但我的标签放置在它们所在的位置但位置不佳,因为它们在图表中途重叠 这是我的代码

 function getStatPie(){ $.ajax({ type: "GET", url: "/Dashboard/GetDashboardStatPie", contentType: "application/json", success: function (data) { //console.log(data.result); var statResult = data.result; if (statResult != null) { if (statResult.totalPaymentChartStat != null) { getPieChart(statResult.totalPaymentChartStat); } $('.loader-wrapper').addClass('hidden'); } }, error: function () { $('.loader-wrapper').addClass('hidden'); abp.notify.error("An error occurred while retrieving Dashboard Pie Chart stats. Contact support", "Error"); abp.ui.clearBusy(); } }); } function getPieChart(rawData) { $.plot($("#Pie_Chart"), rawData, { series: { pie: { show: true, resize: true, radius: 1, series: [{ argumentField: "Branch", valueField: "Number", label: { visible: true, customizeText: function (arg) { return arg.argumentText + " (" + arg.percentText + ")"; } } }] } }, legend: { show: false } }); }
 <!-- Pie Chart --> <div class="col-lg-7 col-md-7 col-sm-12 col-xs-12 "> <div id="Pie_Chart" style="width:400px;height:260px; "></div> </div>

this is the image of my pie chart and how it looks with data populated into it, I want the label to not be on the pie and be clear someone help这是我的饼图的图像以及填充数据后的外观,我希望标签不在饼图上并且清楚有人帮助

在此处输入图片说明

我改变radius: 1, radius: 4/5,如果大小仍然不是你不断改变半径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM