From 2171e52259e2b6e64178f77d14eda487f45ed8d6 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 12 十二月 2023 16:50:16 +0800 Subject: [PATCH] 统计分析模块更改 --- Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue b/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue index fcc9ab9..f37802e 100644 --- a/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue +++ b/Source/UBCS-WEB/src/components/StatisticsComponent/lineChart.vue @@ -31,13 +31,15 @@ handler(newval, oldval) { if (newval) { const series = newval.map((data, index) => ({ - name: index === 0 ? "鎬婚噺" : "鏂板", - type: "line", + name: index === 0 ? '鎬婚噺' : '鏂板', + type: 'line', smooth: true, - stack: "Total", + stack: index === 0 ? 'Total' : 'total2', // 鏍规嵁 index 鍖哄垎鎬婚噺鍜屾柊澧炵殑鍫嗗彔鎯呭喌 label: { show: true, - position: "top" + textStyle: { + fontSize: 14 + } }, data: data.map(value => ({value})) })); @@ -46,14 +48,14 @@ } } }, - chartName:{ - handler(newval,oldval){ - if(newval){ + chartName: { + handler(newval, oldval) { + if (newval) { this.chartOptions.title.text = newval + "鏁版嵁缁熻" } }, - immediate:true, - deep:true + immediate: true, + deep: true } }, data() { @@ -67,15 +69,18 @@ trigger: 'axis' }, legend: { - data: ['鎬婚噺', '鏂板'] + data: ['鎬婚噺', '鏂板'], + textStyle: { + fontSize: 14 // 璋冩暣瀛椾綋澶у皬 + } }, xAxis: { boundaryGap: true, type: 'category', - data: ['1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�', '7鏈�', '8鏈�', '9鏈�', '10鏈�', '11鏈�', '12鏈�'] + data: ['1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�', '7鏈�', '8鏈�', '9鏈�', '10鏈�', '11鏈�', '12鏈�'], }, yAxis: { - type: 'value' + type: 'value', }, series: [] } -- Gitblit v1.9.3