横向柱状图

描述:当前是关于Echarts图表中的 柱状图 示例。
 
            let data = [786, 489, 452, 562, 999, 601];
let data1 = [386, 589, 252, 462, 799, 901];
let className = ["大门", "南楼", "中楼", "北楼", "辅助用房", "其他"];
option = {
   backgroundColor: '#041125',
   grid: {
      left: "5%",
      right: "8%",
      bottom: "5%",
      top: "10%",
      containLabel: true
   },
   legend: {
          show: true,
          bottom: '0',
          icon: 'circle',
          textStyle: {
            color: '#fff',
            fontSize: 14,
            padding: [0, 8, 0, 8]
          }
        },
   xAxis: {
      show: false,
      type: "value"
   },
   yAxis: [
      {
         type: "category",
         inverse: true,
         axisLabel: {
            show: true,
            textStyle: {
            color: "#D1E6EB",
            fontSize: 14
            }
         },
         splitLine: {
            show: false
         },
         axisTick: {
            show: false
         },
         axisLine: {
            show: false
         },
         data: className
      }
   ],
   series: [
      {
         name: "招聘人数",
         type: "bar",
         zlevel: 1,
         label: {
            //数据显示的位置
            show: true, //数值是否显示
            position: "right", //数值相对于柱状图显示的位置
            textStyle: {
            color: "#FFFFFF", // 标签字体颜色
            fontSize: 14, // 标签字体大小
            fontStyle: "italic", // 标签字体斜体
            }
         },
         itemStyle: {
            normal: {
            barBorderRadius: [0, 10, 10, 0],
            color: {
               type: "linear",
               colorStops: [
                  {
                  offset: 0,
                  color: "rgba(94, 238, 255, 0)"
                  },
                  {
                  offset: 1,
                  color: "rgba(255, 255, 255, 1)"
                  }
               ]
            }
            }
         },
         barWidth: 20,
         emphasis: {
            disabled: true,
            focus: "none"
         },
         data: data
      },
      {
         name: "参与企业",
         type: "bar",
         zlevel: 1,
         label: {
            //数据显示的位置
            show: true, //数值是否显示
            // rotate: 60, //数值显示的角度
            position: "right", //数值相对于柱状图显示的位置
            textStyle: {
            color: "#FFFFFF", // 标签字体颜色
            fontSize: 14, // 标签字体大小
            fontStyle: "italic", // 标签字体斜体
            }
         },
         itemStyle: {
            normal: {
            barBorderRadius: [0, 10, 10, 0],
            color: {
               type: "linear",
               colorStops: [
                  {
                  offset: 0,
                  color: "rgba(94, 238, 255, 0)"
                  },
                  {
                  offset: 1,
                  color: "rgba(255, 255, 255, 1)"
                  }
               ]
            }
            }
         },
         barWidth: 20,
         emphasis: {
            disabled: true,
            focus: "none"
         },
         data: data1
      }
   ]
};