From c553d7ba68f95864537acdf986f09bfea31fb17c Mon Sep 17 00:00:00 2001 From: lnn19986213 <1667908750@qq.com> Date: Mon, 27 May 2024 15:48:31 +0800 Subject: [PATCH] gx --- src/view/echarts_yl/ylXZZC.vue | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/view/echarts_yl/ylXZZC.vue b/src/view/echarts_yl/ylXZZC.vue index fc491c1..2bbf8d7 100644 --- a/src/view/echarts_yl/ylXZZC.vue +++ b/src/view/echarts_yl/ylXZZC.vue @@ -215,14 +215,14 @@ const getOption = () => { ]), }, }, - label:{ - show:true, - position:'right', - color:'#ffffff', - formatter:function(data){ - return data.value - } - }, + label: { + show: true, + position: 'right', + color: '#ffffff', + formatter: function (data) { + return data.value + } + }, }, ], }; @@ -261,6 +261,10 @@ const setChart = () => { var myChart = echarts.init(chart.value); // 使用刚指定的配置项和数据显示图表。 myChart.setOption(data.option); + myChart.on('click', function (params) { + console.log('params',params) + }) + }; // 使用生命钩子 onBeforeMount(() => {