From 6343fe4c609b57002d84b83b502899d63dd53727 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Thu, 14 Mar 2024 13:57:37 +0800
Subject: [PATCH] fix: 监测因子折线图修改
---
src/components/Echarts/LineChartSpe.vue | 28 +++++-----------------------
1 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/src/components/Echarts/LineChartSpe.vue b/src/components/Echarts/LineChartSpe.vue
index fb1af0e..a7f10d6 100644
--- a/src/components/Echarts/LineChartSpe.vue
+++ b/src/components/Echarts/LineChartSpe.vue
@@ -70,13 +70,16 @@
initChart () {
this.chart = echarts.init(this.$el, 'macarons')
this.chart.clear()
- this.setOptions(this.chartData)
+ // this.setOptions(this.chartData)
},
setOptions (val) {
console.log('val,val', val)
// val.series.forEach(element => {
// element.data = element.data.map(item => item === 0 ? 0.1 : item)
// })
+ if (this.chart) {
+ this.chart.clear()
+ }
let that = this
function fontSize (res) {
let clientWidth =
@@ -152,30 +155,9 @@
color: 'rgb(255, 255, 255);',
fontSize: fontSize(0.117), // ������������
lineHeight: 0
- },
- formatter: function (params) {
- console.log('params', params)
- let html = params[0].name
- params.forEach((item, index) => {
- html += (`<br/>${item.marker + item.seriesName}: ${item.value === undefined ? 0 : item.value}`)
- })
- return html
}
},
- yAxis: {
- type: 'log',
- axisTick: {
- show: true, // ������������
- },
- axisLine: {
- show: true, // ���������������������
- },
- // axisLabel: {
- // formatter: function (value) {
- // return value === 0.1 ? 0 : value
- // }
- // },
- },
+ yAxis: val.yAxis,
legend: {
data: val.title,
tooltip: {
--
Gitblit v1.8.0