效果图:
let option = {
xAxis: {
type: "category",
data: [数据懒得换],
axisLabel: {
formatter: function (value) {
return value.split("").join("\n");
},
textStyle: {
color: "white", //y轴字体颜色
fontSize: "12",
},
},
},
yAxis: {
type: "value",
axisTick: {
show: false, //不显示坐标轴刻度线
},
axisLine: {
show: false, //不显示坐标轴线
},
},
series: [
{
// 上层块
name: "", // blue bar
type: "pictorialBar",
symbol: "roundRect",
barWidth: "3%",
barMaxWidth: 100,
symbolOffset: [0, 0],
itemStyle: {
normal: {
barMaxWidth: "70%",
barBorderRadius: 200,
color: "#6DE8FA",
},
},
symbolRepeat: true,
symbolSize: [20, 12.36],
// symbolClip: true,
data: [数据懒得换],
},
/*
*/
],
};