export default { /* grid: { x: 30, y: 40, x2: 30, y2: 50, containLabel: true, }, */ xAxis: { type: "category", boundaryGap: true, data: ["未鸣笛", "未手比", "未呼唤", "运行中睡觉", "未检查", "未应答"], axisTick: { //y轴刻度线 show: false, }, axisLine: { lineStyle: { color: "rbg(241, 241, 240)", width: 1, //这里是为了突出显示加上的 }, }, }, yAxis: { type: "value", axisTick: { //y轴刻度线 show: false, }, axisLine: { //y轴 show: false, }, axisLabel: { padding: [0, 10, 0, 0], // 四个数字分别为上右下左与原位置距离 }, splitLine: { //网格线 lineStyle: { color: "rgb(230, 230, 230)", type: "dashed", //设置网格线类型 dotted:虚线 solid:实线 }, show: true, //隐藏或显示 }, }, series: [ /* { data: [22, 50, 18, 18, 32, 8], type: "line", smooth: true, lineStyle: { color: "#26d4b4", }, showSymbol: false, }, */ { data: [22, 50, 18, 18, 32, 8], type: "bar", barWidth: 16, itemStyle: { //通常情况下: normal: { barBorderRadius: [8, 8, 0, 0], //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组中的颜色 color: function(params) { var colorList = [ "rgb(45, 82, 215)", "rgb(98, 151, 242)", "rgb(157, 190, 245)", "rgb(98, 151, 242)", "rgb(47, 108, 213)", "rgb(45, 82, 215)", ]; return colorList[params.dataIndex]; }, }, //鼠标悬停时: emphasis: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: "rgba(0, 0, 0, 0.5)", }, }, }, ], tooltip: { show: true, trigger: "axis", }, };