柱状图

描述:当前是关于Echarts图表中的 示例。
 
            option = {
   backgroundColor: '#000',
   legend: {
      icon: 'circle',
      itemWidth: 10,
      itemHeight: 10,
      itemGap: 20,
      textStyle: {
         fontSize: 10,
         color: '#fff',
      },
      data: ["合格", "不合格"],
      selectedMode: false
   },
   grid: {
      left: "3%",
      right: "3%",
      bottom: "3%",
      containLabel: true,
   },
   xAxis: {
      type: 'category',
      data: [1, 2, 3, 4, 5, 6],
      axisPointer: {
         type: "shadow",
      },
      axisLabel: {
         color: 'white',
         interval: 0,
      },
      axisLine: {
         show: false
      },
      splitLine: {
         show: false
      },
      axisTick: {
         show: false
      },
   },
   yAxis: {
      type: 'value',
      name: "",
      axisLine: {
         show: false
      },
      nameTextStyle: {
         color: 'white'
      },
      min: 0,
      axisLabel: {
         formatter: "{value}"
      },
      axisTick: {
         show: false
      },
      splitLine: {
         show: true,
         lineStyle: {
            width: 0.5,
            color: 'rgba(255, 255, 255, 0.4)',
            type: 'dashed'
         }
      },
   },
   series: [
      {
         data: [1, 2, 3, 4, 5, 6],
         name: "合格",
         type: 'bar',
         barWidth: '15px',
         itemStyle: {
            color: '#0887FF'
         },
         label: {
            show: true,
            position: 'top',
            fontSize: 12,
            color: '#F5F5F5',
            offset: [0, -5],
            formatter: '{c}'
         },
      },
      {
         data: [1, 2, 3, 4, 5, 6],
         name: "不合格",
         type: 'bar',
         barWidth: '15px',
         itemStyle: {
            color: '#30C9C9'
         },
         label: {
            show: true,
            position: 'top',
            fontSize: 12,
            color: '#F5F5F5',
            offset: [0, -5],
            formatter: '{c}'
         },
      }
   ]
};