This commit is contained in:
lnn19986213 2024-05-27 15:48:31 +08:00
parent 1f601682f3
commit c553d7ba68
1 changed files with 12 additions and 8 deletions

View File

@ -215,14 +215,14 @@ const getOption = () => {
]), ]),
}, },
}, },
label:{ label: {
show:true, show: true,
position:'right', position: 'right',
color:'#ffffff', color: '#ffffff',
formatter:function(data){ formatter: function (data) {
return data.value return data.value
} }
}, },
}, },
], ],
}; };
@ -261,6 +261,10 @@ const setChart = () => {
var myChart = echarts.init(chart.value); var myChart = echarts.init(chart.value);
// 使 // 使
myChart.setOption(data.option); myChart.setOption(data.option);
myChart.on('click', function (params) {
console.log('params',params)
})
}; };
// 使 // 使
onBeforeMount(() => { onBeforeMount(() => {