series:{
barWidth: '8px',
}
// yAxis/xAxis attr
axisLabel: {
textStyle: {
color: '#938258'
}
}
// yAxis/xAxis attr
axisLine : {show: false},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true // 外框包含刻度数据
}
// yAxis/xAxis 属性
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,0.1)'
}
},
series : [ {
symbol:'circle'
}]
支持的类型
ECharts 提供的标记类型包括 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
areaStyle: {
color: new this.$echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{ offset: 0, color: 'rgba(7, 128, 182, 0.5)' }, // 柱图渐变色
{ offset: 0.5, color: 'rgba(7, 128, 182, 0.3)' }, // 柱图渐变色
{ offset: 1, color: 'rgba(7, 128, 182, 0)' } // 柱图渐变色
]
)
}
series: [
{
name: '数量',
type: 'bar',
data: barData,
barWidth: 14, // 柱宽度
itemStyle: {
normal: {
barBorderRadius: 7 // 圆角
}
}
]
下方的前四个参数设置为0, 0, 1, 0
可以实现从左到右渐变. 设置为0,0,0,1
可以实现从上到下渐变。
srties: [
itemStyle: {
normal: {
barBorderRadius: 7,
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0,
[
{offset: 0, color: '#3977E6'},
{offset: 1, color: '#37BBF8'}
]
)
}
}
]
legend: {
textStyle: {
color: 'white'
},
}