This commit is contained in:
chenlin
2026-01-08 11:26:10 +08:00
parent f909230546
commit 56c9a547c9
5 changed files with 81 additions and 95 deletions

View File

@@ -652,34 +652,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: {

View File

@@ -1165,34 +1165,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: {

View File

@@ -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: {