This commit is contained in:
duanxiaohai 2024-06-24 09:06:29 +08:00
parent 060202c4d1
commit a07a187752
2 changed files with 22 additions and 7 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -1,8 +1,5 @@
<template> <template>
<div <div ref="chart" style="width: 50%; height: 230px"></div>
ref="chart"
style="width: 50%; height: 230px"
></div>
</template> </template>
<script setup> <script setup>
@ -261,6 +258,7 @@ function getPie3D(pieData, internalDiameterRatio) {
} }
}, },
}, },
// //
tooltip: { tooltip: {
backgroundColor: "rgba(18, 55, 85, 0.8);", backgroundColor: "rgba(18, 55, 85, 0.8);",
@ -287,6 +285,23 @@ function getPie3D(pieData, internalDiameterRatio) {
} }
}, },
}, },
label: {
show: true,
// position: "outside",
// padding: [30, -180],
formatter: function (pieData) {
console.log("optionsData", pieData);
return (
"{name|" +
pieData.name +
"}" +
"{vlaueA|" +
pieData.value +
"亿元" +
"}"
);
},
},
xAxis3D: {}, xAxis3D: {},
yAxis3D: {}, yAxis3D: {},
zAxis3D: {}, zAxis3D: {},
@ -552,9 +567,9 @@ onBeforeMount(() => {
setTimeout(() => { setTimeout(() => {
// data.list = props.list; // data.list = props.list;
data.list = { data.list = {
gxy:"1500", gxy: "1500",
notGxy:"1610", notGxy: "1610",
} };
pieData[0].value = data.list.gxy; pieData[0].value = data.list.gxy;
pieData[1].value = data.list.notGxy; pieData[1].value = data.list.notGxy;