This commit is contained in:
姚宇浩 2024-06-14 17:02:59 +08:00
parent 5099a627e3
commit c0f66dc0a9
1 changed files with 12 additions and 10 deletions

View File

@ -55,6 +55,15 @@ const data = reactive({
bg: [],
name: [],
ser: [],
len: {
data: [],
top: "5%",
right: "10%",
textStyle: {
fontSize: 16,
color: "#ffffff",
},
},
});
const getOption = () => {
@ -64,15 +73,7 @@ const getOption = () => {
padding: [20, 10, 20, 10],
formatter: "{b0}<br />{a1}:{c1} <br />{a2}:{c2}",
},
legend: {
data: ['医保支出万元以上','大病住院','高血压','糖尿病'],
top: "5%",
right: "10%",
textStyle: {
fontSize: 16,
color: "#ffffff",
},
},
legend: data.len,
grid: {
top: "25%",
left: "6%",
@ -210,6 +211,7 @@ watch(
(newVal, oldVal) => {
data.list = newVal;
data.name = props.list.map((item) => item.name);
data.len.data=data.name;
// console.log(55555, data.name);
setChart1();
setChart();
@ -220,7 +222,7 @@ onBeforeMount(() => {
setTimeout(() => {
data.list = props.list;
data.year = props.year;
ser.value[0].data=data.year.map((item) => 0);
ser.value[0].data = data.year.map((item) => 0);
setChart1();
getOption();
setChart();