fix:面积图不使用渐变 opacity为0.1

This commit is contained in:
zyh
2023-09-25 11:25:21 +08:00
parent 842b71d752
commit 3bc736a69c
2 changed files with 7 additions and 11 deletions

View File

@@ -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)