From 974c9ded44fcee4638122570c6904d4e5e6c217b Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期四, 17 四月 2025 18:23:08 +0800 Subject: [PATCH] 代码初始化 --- admin/src/views/index.vue | 32 ++++++++++++++++++++++++++------ 1 files changed, 26 insertions(+), 6 deletions(-) diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue index 82aeaae..76fe18c 100644 --- a/admin/src/views/index.vue +++ b/admin/src/views/index.vue @@ -220,13 +220,13 @@ var ydata = [] ydata.push({ name: '绗﹀悎椤�', type: 'line', unit: '椤�', color: '#f07e6f', data: this.staticData1.map(i => i.dcaYesTotal) }) ydata.push({ name: '涓嶇鍚堥」', type: 'line', unit: '椤�', color: '#8383ff', data: this.staticData1.map(i => i.dcaNoTotal) }) - ydata.push({ name: '涓婃姤娆℃暟', type: 'line', unit: '娆�', color: '#29aeff', data: this.staticData1.map(i => i.total) }) + ydata.push({ name: '涓婃姤娆℃暟', type: 'bar', unit: '娆�', color: '#29aeff', data: this.staticData1.map(i => i.total) }) this.initEchartDataDo('鏈堝害缁熻','echart1', this.staticData1.map(i => i.dateStr), ydata) }, initEchart11 () { var ydata = [] - ydata.push({ name: '绗﹀悎椤�', type: 'bar', unit: '椤�', color: '#f07e6f', data: this.staticData11.map(i => i.dcaYesTotal) }) - ydata.push({ name: '涓嶇鍚堥」', type: 'bar', unit: '椤�', color: '#8383ff', data: this.staticData11.map(i => i.dcaNoTotal) }) + ydata.push({ name: '绗﹀悎椤�', type: 'line', unit: '椤�', color: '#f07e6f', data: this.staticData11.map(i => i.dcaYesTotal) }) + ydata.push({ name: '涓嶇鍚堥」', type: 'line', unit: '椤�', color: '#8383ff', data: this.staticData11.map(i => i.dcaNoTotal) }) ydata.push({ name: '涓婃姤娆℃暟', type: 'bar', unit: '娆�', color: '#29aeff', data: this.staticData11.map(i => i.total) }) this.initEchartDataDo('瀛e害缁熻','echart11', this.staticData11.map(i => i.dateStr), ydata) }, @@ -270,17 +270,32 @@ const myChart = echarts.init(document.getElementById(id)) myChart.setOption({ title: { - text: title || '' + text: (title || '') , + textStyle:{ + fontSize: 12, + fontStyle: 'normal', + fontWeight: 'bold' + }, }, tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' - } + }, + textStyle:{ + fontSize: 10, + fontStyle: 'normal', + fontWeight: 'normal' + }, }, legend:{ orient: 'vertical', - left: 'right' + left: 'right', + textStyle:{ + fontSize: 10, + fontStyle: 'normal', + fontWeight: 'normal' + }, }, xAxis: { type: 'category', @@ -290,6 +305,11 @@ yAxis: { type: 'value', name: '', + textStyle:{ + fontSize: 10, + fontStyle: 'normal', + fontWeight: 'normal' + }, nameTextStyle: { padding: [0, 0, 4, -30] // 鍥涗釜鏁板瓧鍒嗗埆涓轰笂鍙充笅宸︿笌鍘熶綅缃窛绂� }, -- Gitblit v1.9.3