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