|
|
@@ -20,6 +20,18 @@ export default { |
|
|
|
} |
|
|
|
]; |
|
|
|
} |
|
|
|
}, |
|
|
|
color: { |
|
|
|
type: Array, |
|
|
|
default: function () { |
|
|
|
return ['rgba(134, 91, 252, 1)', 'rgba(26, 106, 226, 0.5)', 'rgba(26, 106, 226, 0)'] |
|
|
|
} |
|
|
|
}, |
|
|
|
areaStyle: { |
|
|
|
type: Array, |
|
|
|
default: function () { |
|
|
|
return ['rgba(134, 91, 252, 1)', 'rgba(26, 106, 226, 0.5)', 'rgba(26, 106, 226, 0)'] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
data () { |
|
|
@@ -47,6 +59,7 @@ export default { |
|
|
|
this.chartSetOption(); |
|
|
|
}, |
|
|
|
chartSetOption () { |
|
|
|
|
|
|
|
let xAxisData = []; |
|
|
|
let data = []; |
|
|
|
this.data.forEach(item => { |
|
|
@@ -72,15 +85,15 @@ export default { |
|
|
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ |
|
|
|
{ |
|
|
|
offset: 1, |
|
|
|
color: "rgba(134, 91, 252, 1)", |
|
|
|
color: this.color[0], |
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 0.5, |
|
|
|
color: "rgba(26, 106, 226, 0.5)", |
|
|
|
color: this.color[1], |
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 0, |
|
|
|
color: "rgba(26, 106, 226, 0)", |
|
|
|
color: this.color[2], |
|
|
|
}, |
|
|
|
]), |
|
|
|
}, |
|
|
@@ -134,32 +147,30 @@ export default { |
|
|
|
], |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
|
|
|
|
name: "", |
|
|
|
type: "line", |
|
|
|
smooth: true, |
|
|
|
// symbol: "circle", |
|
|
|
symbolSize: 12, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
color: "#0092f6", |
|
|
|
color: this.color[0], |
|
|
|
lineStyle: { |
|
|
|
color: "#0092f6", |
|
|
|
color: this.color[0], |
|
|
|
width: 1, |
|
|
|
}, |
|
|
|
areaStyle: { |
|
|
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ |
|
|
|
{ |
|
|
|
offset: 1, |
|
|
|
color: "rgba(134, 91, 252, 1)", |
|
|
|
color: this.areaStyle[0], |
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 0.5, |
|
|
|
color: "rgba(26, 106, 226, 0.5)", |
|
|
|
color: this.areaStyle[1], |
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 0, |
|
|
|
color: "rgba(26, 106, 226, 0)", |
|
|
|
color: this.areaStyle[2], |
|
|
|
}, |
|
|
|
]), |
|
|
|
}, |
|
|
|