new echarts.graphic.LinearGradient(a,b,c,d,arr)
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#ff0000' },
{ offset: 1, color: '#3333ff' }
])
}
}
]
};
// offset取值0-1,color代表颜色
{ offset: x, color: xxx }
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#ff0000' },
{ offset: 0.25, color: '#000033' },
{ offset: 0.5, color: '#00cc66' },
{ offset: 0.75, color: '#ffffff' },
{ offset: 1, color: '#3333ff' }
])
}
}
]
};
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
itemStyle: {
normal: {
color: '#32A8FF',
lineStyle: {
color: '#32A8FF'
},
areaStyle: {
type: 'default',
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(80,141,255,0.39)' },
{ offset: 0.5, color: 'rgba(56,155,255,0.25)' },
{ offset: 1, color: 'rgba(38,197,254,0)' }
])
}
}
}
}
]
};
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
itemStyle: {
color: '#32A8FF'
},
lineStyle: {
color: '#32A8FF'
},
areaStyle: {
type: 'default',
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(80,141,255,0.39)' },
{ offset: 0.34, color: 'rgba(80,141,255,0.25)' },
{ offset: 1, color: 'rgba(80,141,255,0.05)' }
])
}
}
]
};
new echarts.graphic.LinearGradient(0,0,1,0,arr)
option = {
xAxis: {
type: 'value'
},
yAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed']
},
series: [
{
type: 'bar',
stack: 'total',
barWidth: 50,
data: [320, 302, 301],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{ offset: 0, color: '#3A6FFA' },
{ offset: 1, color: '#5c83e6' }
])
}
},
{
type: 'bar',
stack: 'total',
data: [120, 132, 101],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{ offset: 0, color: '#5c83e6' },
{ offset: 1, color: '#08B0C6' }
])
}
}
]
};
此页面不支持夜间模式!
已进入夜间模式!
已进入普通模式!
搜索框不允许为空
签到成功!经验+5!芋圆币+2!
签到失败!今日已签到!
需要登录社区账号才可以进入!