fix:修改饼图单位没生效的问题 ,以及预览页面跟饼图保持一致

This commit is contained in:
zhangyu
2021-02-08 15:12:47 +08:00
parent 66db742ffd
commit c57922992d
2 changed files with 15 additions and 9 deletions

View File

@@ -595,13 +595,14 @@ export default {
}
},
formatterFunc:function(params, ticket, callback){
let chartInfo=this.chartData;
return `
<div>
<div style="white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis; min-width: 150px; max-width: 600px; line-height: 18px; font-size: 14px;">
<div style="max-width: 500px;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;margin-bottom: 5px">${this.legend[params.dataIndex].alias}</div>
<div style="font-size:12px;display:flex;justify-content: space-between;">
<div>value</div>
<div>${params.value}</div>
<div>${chartDataFormat.getUnit(chartInfo.unit?chartInfo.unit:2).compute(params.value,null,-1,2)}</div>
</div>
<div style="font-size:12px;display:flex;justify-content: space-between;">
<div>percent</div>