Kendo ui 我正在尝试为剑道UI中的特定字段分解饼图的特定部分
如何在Kendo DataViz中分解饼图 我的数据来自数据库,我的代码如下:Kendo ui 我正在尝试为剑道UI中的特定字段分解饼图的特定部分,kendo-ui,kendo-dataviz,Kendo Ui,Kendo Dataviz,如何在Kendo DataViz中分解饼图 我的数据来自数据库,我的代码如下: dataSource: { data: StageData }, title: { align: "center", text: "Clients by Stage", font: "14px Open Sans",
dataSource: {
data: StageData
},
title: {
align: "center",
text: "Clients by Stage",
font: "14px Open Sans",
color: "#3cb2e1"
},
legend: {
visible: false
},
series: [{
type: "pie",
field: "CountClients",
aggregate: "sum",
categoryField: "StageId",
explodeField: function(){
if(categoryField=="Advocate"){
$(this).explode = true;
}
},
overlay: {
gradient: "none"
}
在这里,当类别字段是“倡导者”时,我试图炸掉馅饼,但这不起作用。
谁能告诉我如何才能做到这一点。
谢谢我可能会遍历StageData,并为每个对象设置一个分解值
$.each(StageData, function(i, s) {
if(s.StageId === 'Advocate') {
s.explode = true;
}
else {
s.explode = false;
}
});
样本