From dbcf4569984bc9a9e4d171b340bd43554e19686a Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Thu, 13 Jul 2023 20:17:03 +0800
Subject: [PATCH] chore
---
src/components/Echarts/LineChartSpe.vue | 77 +++++++++++++++++++++++++++++---------
1 files changed, 58 insertions(+), 19 deletions(-)
diff --git a/src/components/Echarts/LineChartSpe.vue b/src/components/Echarts/LineChartSpe.vue
index df84764..0adc342 100644
--- a/src/components/Echarts/LineChartSpe.vue
+++ b/src/components/Echarts/LineChartSpe.vue
@@ -45,12 +45,10 @@
},
watch: {
chartData: {
-
handler(val) {
this.setOptions(val)
},
deep: true,
-
},
},
mounted() {
@@ -88,24 +86,26 @@
axisTick: {
show: true,
},
+
},
grid: {
- left: 10,
+ left: 100,
right: 10,
bottom: 20,
top: 30,
- height: fontSize(3.5),
+ height: fontSize(4),
+ width: fontSize(15),
containLabel: true,
},
- toolbox: {
- feature: {
- dataZoom: {
- yAxisIndex: 'none',
- },
- restore: {},
- saveAsImage: {},
- },
- },
+ // toolbox: {
+ // feature: {
+ // dataZoom: {
+ // yAxisIndex: 'none',
+ // },
+ // restore: {},
+ // saveAsImage: {},
+ // },
+ // },
// tooltip: {
// trigger: 'axis',
// position: function(pt) {
@@ -127,11 +127,51 @@
// },
},
- yAxis: {
- axisLabel: {
- show: false,
+ yAxis: [
+ {
+ type: 'value',
+ position: 'left',
+ axisLabel: {
+ show: true,
+ },
},
- },
+ {
+ type: 'value',
+ position: 'right',
+ axisLabel: {
+ show: true,
+ },
+ },
+ {
+ type: 'value',
+ position: 'right',
+ offset: 50,
+ axisLabel: {
+ show: true,
+ },
+ min: 'dataMin', //���������������������������
+ max: 'dataMax', //���������������������������
+ min: function (value) {
+ //���������������������������������������
+ return Math.floor(value.min)
+ },
+ max: function (value) {
+ //���������������������������������������
+ return Math.ceil(value.max)
+ },
+
+ scale: true, //���������
+ minInterval: 0.1, //������������
+ },
+ {
+ type: 'value',
+ position: 'left',
+ axisLabel: {
+ show: true,
+ },
+ offset: 50,
+ },
+ ],
legend: {
icon: 'circle',
itemHeight: 15,
@@ -149,10 +189,9 @@
{
start: 0,
end: 10,
- top:fontSize(4),
+ top: fontSize(4.5),
height: fontSize(0.4),
},
-
],
series: val.series,
// [{
--
Gitblit v1.8.0