Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl
This commit is contained in:
commit
a8c823030b
|
@ -74,7 +74,7 @@ function initChart() {
|
|||
position: 'top',
|
||||
formatter: params => {
|
||||
const value = dataList.value[params.dataIndex].value;
|
||||
const percentage = ((value / total) * 100).toFixed(); // 计算百分比并保留两位小数
|
||||
const percentage = value ? ((value / total) * 100).toFixed() : 0; // 计算百分比并保留两位小数
|
||||
return `${value}人 ${percentage}%`; // 显示为百分比形式
|
||||
},
|
||||
color: '#333',
|
||||
|
|
Loading…
Reference in New Issue