summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzyh <[email protected]>2023-09-25 11:25:21 +0800
committerzyh <[email protected]>2023-09-25 11:25:21 +0800
commit3bc736a69c412ffdc60588d007d5537a459c06e5 (patch)
treec613e2d70faf29616aa0cd33329d2004f688a4fd
parent842b71d75268d4f8730cbafbd163a1ba897c987d (diff)
fix:面积图不使用渐变 opacity为0.1rel-23.07.10
-rw-r--r--nezha-fronted/package-lock.json5
-rw-r--r--nezha-fronted/src/components/chart/chartMixin.js13
2 files changed, 7 insertions, 11 deletions
diff --git a/nezha-fronted/package-lock.json b/nezha-fronted/package-lock.json
index 8f4454e48..47f00c56c 100644
--- a/nezha-fronted/package-lock.json
+++ b/nezha-fronted/package-lock.json
@@ -6910,6 +6910,11 @@
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
"integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="
},
+ "csv-string": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/csv-string/-/csv-string-4.1.1.tgz",
+ "integrity": "sha512-KGvaJEZEdh2O/EVvczwbPLqJZtSQaWQ4cEJbiOJEG4ALq+dBBqNmBkRXTF4NV79V25+XYtiqbco1IWrmHLm5FQ=="
+ },
"cuint": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz",
diff --git a/nezha-fronted/src/components/chart/chartMixin.js b/nezha-fronted/src/components/chart/chartMixin.js
index 6f810eb1c..64899d503 100644
--- a/nezha-fronted/src/components/chart/chartMixin.js
+++ b/nezha-fronted/src/components/chart/chartMixin.js
@@ -9,7 +9,7 @@ import {
chartTimeSeriesAreaOption,
chartTimeSeriesScatterOption
} from './chart/options/chartTimeSeries'
-import * as CSV from 'csv-string';
+import * as CSV from 'csv-string'
export default {
data () {
return {
@@ -169,16 +169,7 @@ export default {
// 判断如果是面积图 颜色设为渐变色
if (s.areaStyle && this.colorList.length) {
s.areaStyle = {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: this.hexToRgb(this.colorList[colorIndex], 0.1)
- },
- {
- offset: 1,
- color: this.hexToRgb(this.colorList[colorIndex], 1)
- }
- ])
+ opacity: 0.1
}
}
series.push(s)