1.横轴信息全部显示
xAxis: {
type: "category",
data: address,
axisLabel: {
interval: 0, //横轴信息全部显示
},
},
2.柱状图宽度以及柱状图的颜色
series: [
{
data: total,
type: "bar",
barWidth: 20,//柱状图宽度
itemStyle: {
normal: {
color: function (params) {
//注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
var colorList = [
"#3D8CE9",
"#FF904B",
"#61a0a8",
"#d48265",
"#91c7ae",
"#749f83",
"#ca8622",
];
return colorList[params.dataIndex];
},
},
},
},
],