mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
提交
This commit is contained in:
@@ -458,20 +458,6 @@
|
||||
show: true,
|
||||
position: 'center',
|
||||
formatter:`{total|${this.percentageNum}%}\n{active|来源top3}`,
|
||||
// formatter: function(name) {
|
||||
// console.log(name,'name');
|
||||
// let data = option.series[0].data;
|
||||
// let total = 0;
|
||||
// let tarValue = 0; //每一项值
|
||||
// for (let i = 0; i < data.length; i++) {
|
||||
// total += data[i].value;
|
||||
// if (data[i].name == name) {
|
||||
// tarValue = data[i].value;
|
||||
// }
|
||||
// }
|
||||
// let p = total != 0 ? Math.round((tarValue / total) * 100) + '%' : 0 + '%';
|
||||
// return ` ${p} ${name}`
|
||||
// },
|
||||
rich:{
|
||||
total:{
|
||||
fontSize:20,
|
||||
@@ -516,6 +502,7 @@
|
||||
name: this.getUType(key)
|
||||
})
|
||||
}
|
||||
// 计算前三百分比
|
||||
totalList.sort();
|
||||
totalList = totalList.splice(1,3);
|
||||
let top3 = null;
|
||||
@@ -523,8 +510,6 @@
|
||||
top3+=item;
|
||||
})
|
||||
this.percentageNum = (top3/total)*100;
|
||||
console.log(top3,total,this.percentageNum,'3333');
|
||||
console.log(totalList,'totalList');
|
||||
this.chatData = chatData;
|
||||
this.initChat(chatData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user