//饼状图总结
1.label,没有线和字
//2.下面的代码只显示字不显示线
label: {
color: '#999999'
},
labelLine: {
lineStyle: {
// color: 'rgba(255, 255, 255, 0.3)'
color:'transparent'
},
smooth: 0.2,
length: 10,
length2: 20
},
条形图
//y轴线上去掉线和锯齿状的东西
yAxis: {
axisLine: {//去掉线
show: false
lineStyle: {//线的颜色
color: '#999',
}
},
axisTick: {//去掉锯齿状
show: false
},
axisLabel: {//字体颜色
textStyle: {
color: '#999',
//color: 'transparent'可以去掉字
}
},
splitLine:{//去掉轴上中间的线,具体看线的方向
show:false,//
lineStyle: {
//标线样式
type: 'dashed', //线的类型
color: '#DCDEE3' //线的颜色
}
}
type: 'category',
data: ['装备1', '装备2', '装备3', '装备4', '装备5', '装备6','装备7', '装备8', '装备9', '装备10']
},
//在每个柱子上显示数据
series: [
{
type: 'bar',
data: [18203, 23489, 29034, 104970, 131744, 630230,18203, 23489, 29034, 104970, 131744],
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
color: 'black',
fontSize: 16,
fontWeight: 600
}
}
},
]
//改变柱子颜色,在option下面直接写
color: ['#1C9399','red'],
//改变柱子的宽度和形状,都在series数组写
barWidth : 13,//柱图宽度,
itemStyle: {
normal: {
//柱形图圆角,初始化效果
barBorderRadius:[10, 10, 0, 0],
}
},