echarts不同版本的相同属性效果可能是不一样的,这个要注意,可以在官网切换新旧版本示例
xAxis: [
axisLabel: {
textStyle: {
color: "#fff",//x轴文字颜色
},
},
axisPointer: {
type: "shadow",//鼠标悬浮样式
},
axisTick: {
alignWithLabel: true,//刻度线
},
axisLine: {
lineStyle: {
width: 0,//坐标轴的样式
},
},
],
yAxis: [
nameTextStyle: {//纵坐标单位文字
//字体样式
color: "#FFF",
padding: [5, 40, 0, 0], //距离坐标位置的距离
},
splitLine: {//y轴切割线的样式
show: true,
lineStyle: {
type: "dashed",
color: "rgba(68, 64, 101, 1)",
width: 1,
},
},
],
series: [
itemStyle: {//内容样式
normal: {
color: "rgba(236, 71, 172, 1)",
lineStyle: {
color: "rgba(236, 71, 172, 1)",
type: "dotted",
},
},
},
areaStyle: {//line下的area样式
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(236, 71, 172, 1)'
}, {
offset: 1,
color: 'rgba(236, 71, 172, 1)'
}])
},
]
echarts的样式属性
于 2021-07-30 14:57:09 首次发布