option = { title: { text: "{a|其他健康指数}", x: "center", textStyle: { rich: { a: { fontSize: 18, color: "#5e5e5e", }, }, }, }, //鼠标滑过提示栏 tooltip: { trigger: "axis", axisPointer: { type: "shadow", }, }, //图表选择栏 legend: { icon: "square", // top: 20, bottom: 0, itemHeight: 10, //修改icon图形大小 textStyle: { fontSize: 13, color: "#000", }, data: ["高度健康", "中度健康", "低度健康", "故障"], }, //图标离容器的距离 // grid: { // left: "3%", // right: "4%", // bottom: "3%", // //是否包含坐标轴 // containLabel: true, // //鼠标滑过是否显示信息栏,目前来看最好在grid中配置tooltip鼠标滑过信息栏 // }, //x坐标轴 xAxis: [ { type: "category", data: [ "合肥", "马鞍山", "芜湖", "安庆", "淮南", "宣城", "阜阳", "铜陵", "蚌埠", "滁州", "六安", "淮北", "宿州", "池州", "黄山", "亳州", ], axisLabel: { show: true, interval: 0, rotate: "-45", }, }, ], //y坐标轴 yAxis: [ { type: "value", }, ], // 数据展示区域 series: [ { name: "高度健康", type: "bar", color: "#0d867f", barWidth: 5, data: [ 7994, 300, 2116, 4060, 5089, 8936, 1309, 5033, 1821, 3720, 5606, 4816, 9732, 476, 9394, 3895, ], }, { name: "中度健康", type: "bar", color: "#34c1f0", barWidth: 5, data: [ 5506, 271, 8906, 8018, 4175, 8692, 1981, 2856, 8997, 3183, 74, 1906, 8963, 1879, 6313, 7705, ], }, { name: "低度健康", type: "bar", color: "#fdaa56", barWidth: 5, data: [ 8407, 5389, 9502, 200, 2274, 2325, 2793, 7050, 5745, 6008, 18, 2923, 3719, 4833, 8170, 2735, ], }, { name: "故障", type: "bar", color: "#db6262", barWidth: 5, data: [ 1603, 6666, 5532, 5030, 2579, 5279, 5821, 662, 135, 6651, 7465, 6090, 1270, 5073, 2955, 6372, ], }, ], };