From b1681711e93972e1aaf0b53ae0dd35ec5db5d29e Mon Sep 17 00:00:00 2001 From: wuxu <1159559925@qq.com> Date: Mon, 10 Mar 2025 13:53:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=95=B0=E6=8E=92=E5=BA=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/home/components/statisticsLeft.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/jwtech-pc-page/src/views/home/components/statisticsLeft.vue b/jwtech-pc-page/src/views/home/components/statisticsLeft.vue index ed216e1c..fa4b5eef 100644 --- a/jwtech-pc-page/src/views/home/components/statisticsLeft.vue +++ b/jwtech-pc-page/src/views/home/components/statisticsLeft.vue @@ -98,6 +98,19 @@ export default { initBarChart(data) { const entries = Object.entries(data); + + let xLable2 =["60-69分","70-79分","80-89分","90-99分","100+"]; + + let yValues2=[]; + + xLable2.forEach((item) => { + yValues2.push(data[item]); + }); + + console.log(xLable2,'yyyyyyy') + console.log(yValues2,'yyyyy2222yy') + + let xValue=entries.map(([key, value])=>{ return key } @@ -128,7 +141,7 @@ export default { xAxis: [ { type: 'category', - data: xValue, + data: xLable2, axisTick: { interval: 0, alignWithLabel: true @@ -150,7 +163,7 @@ export default { name: '企业数量', type: 'bar', barWidth: '60%', - data: yValue, + data: yValues2, itemStyle: { color: '#7c9cd6' }