echarts画图中注意的一些细节
- splitLine:分隔线
- axisLine:坐标轴轴线
- axisTick:坐标轴刻度
- axisLabel:刻度标签 关于X轴坐标的个性设置
xAxis: [
{
type: "category",
axisLine: {
show: false, //**关键设置,不显示X轴线条**
lineStyle: {
color: "rgba(0,0,0,0.15)",//**X轴线条颜色**
},
},
axisTick: {
show: false, //**关键设置,坐标轴刻度也不显示**
alignWithLabel: true,
},
data: options.dataX,
nameTextStyle: {
color: "rgba(0,0,0,0.45)",
fontSize: 10,
fontWeight: 500,
},
axisLabel: { //**设置X轴字体的样式**
color: "rgba(0,0,0,0.45)",
fontSize: 10,
fontWeight: 500,
fontFamily: fontFly,
},
},
],
关于Y轴坐标的个性设置
yAxis: [
{
type: "value",
name: "新增缺陷数",
min: -150,
max: 150,
position: "left",
offset: 80,
axisLine: {
show: false, //**关键设置,不显示Y轴线条**
lineStyle: {
color: "#fff",
},
},
axisTick: {
show: false //** 设置不显示Y轴刻度**
},
axisLabel: {
formatter: "{value}",
},
}
]