update line stack color

This commit is contained in:
lb 2022-11-09 09:16:03 +08:00
parent 817c62a880
commit 24fb7e473c

View File

@ -33,7 +33,7 @@ export default {
return { return {
chart: null, chart: null,
option: { option: {
color: ['#59CBE8', '#E93CAC', '#E93CAC', '#FF7345', '#9452FF', '#6A6E87', '#52FFF1'], color: ['#59CBE8', '#E93CAC', '#FF7345', '#9452FF', '#6A6E87', '#52FFF1'],
grid: { grid: {
top: '20%', top: '20%',
left: 0, left: 0,
@ -98,6 +98,27 @@ export default {
name: '产线1', name: '产线1',
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
areaStyle: {
// color: 'rgba(50,145,152,0.5)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#59CBE866' // 0%
},
{
offset: 1,
color: 'transparent' // 100%
}
],
global: false // false
}
},
data: Array(12) data: Array(12)
.fill(0) .fill(0)
.map(_ => Math.floor(Math.random() * 100)) .map(_ => Math.floor(Math.random() * 100))
@ -106,6 +127,27 @@ export default {
name: '产线2', name: '产线2',
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
areaStyle: {
// color: 'rgba(50,145,152,0.5)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#E93CAC66' // 0%
},
{
offset: 1,
color: 'transparent' // 100%
}
],
global: false // false
}
},
data: Array(12) data: Array(12)
.fill(0) .fill(0)
.map(_ => Math.floor(Math.random() * 100)) .map(_ => Math.floor(Math.random() * 100))
@ -114,6 +156,27 @@ export default {
name: '产线3', name: '产线3',
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
areaStyle: {
// color: 'rgba(50,145,152,0.5)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#FF734566' // 0%
},
{
offset: 1,
color: 'transparent' // 100%
}
],
global: false // false
}
},
data: Array(12) data: Array(12)
.fill(0) .fill(0)
.map(_ => Math.floor(Math.random() * 100)) .map(_ => Math.floor(Math.random() * 100))
@ -122,6 +185,27 @@ export default {
name: '产线4', name: '产线4',
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
areaStyle: {
// color: 'rgba(50,145,152,0.5)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#9452FF66' // 0%
},
{
offset: 1,
color: 'transparent' // 100%
}
],
global: false // false
}
},
data: Array(12) data: Array(12)
.fill(0) .fill(0)
.map(_ => Math.floor(Math.random() * 100)) .map(_ => Math.floor(Math.random() * 100))
@ -130,6 +214,27 @@ export default {
name: '产线5', name: '产线5',
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
areaStyle: {
// color: 'rgba(50,145,152,0.5)'
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#6A6E8766' // 0%
},
{
offset: 1,
color: 'transparent' // 100%
}
],
global: false // false
}
},
data: Array(12) data: Array(12)
.fill(0) .fill(0)
.map(_ => Math.floor(Math.random() * 100)) .map(_ => Math.floor(Math.random() * 100))