UI优化
This commit is contained in:
@@ -1124,34 +1124,10 @@ const riskChartOption = computed<EChartsOption>(() => {
|
||||
}
|
||||
const percent = ((value / total) * 100).toFixed(2) + '%'
|
||||
return percent
|
||||
},
|
||||
minMargin: 5,
|
||||
edgeDistance: 10,
|
||||
lineHeight: 15,
|
||||
fontSize: 12,
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: true,
|
||||
length: 15,
|
||||
length2: 10,
|
||||
maxSurfaceAngle: 80
|
||||
},
|
||||
labelLayout: function (params: any) {
|
||||
const isLeft = params.labelRect.x < params.labelRect.width
|
||||
const points = params.labelLinePoints
|
||||
if (points && points.length >= 3) {
|
||||
// 调整线条的终点位置
|
||||
if (isLeft) {
|
||||
points[2][0] = params.labelRect.x
|
||||
} else {
|
||||
points[2][0] = params.labelRect.x + params.labelRect.width
|
||||
}
|
||||
return {
|
||||
labelLinePoints: points
|
||||
}
|
||||
}
|
||||
return {}
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
|
||||
Reference in New Issue
Block a user