分隔柱状图

描述:当前是关于Echarts图表中的 柱状图 示例。
 
            let myDate = ['南街社区', '北街社区', '新城社区', '东关社区', '大沟口社区', '中学路社区', '象山港社区', '略钢社区', '略电社区', '临江社区'];
      let numA = [806, 910, 990, 1062, 805, 1051, 970, 910, 990, 800];
      let numB = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
option = {
   //你的代码
   backgroundColor:'#000',
   tooltip: {
          trigger: "axis",
          backgroundColor: 'rgba(17,95,182,0.5)',
          textStyle: {
            color: "#fff"
          },
          axisPointer: {
            type: "shadow",
            textStyle: {
              color: "#fff"
            }

          },
        },
        grid: {
          borderWidth: 0,
          top: '18%',
          right: '5%',
          bottom: '25%',
          textStyle: {
            color: "#fff"
          }
        },
        calculable: true,
        xAxis: [{
          type: "category",
          splitLine: {
            show: false
          },
          axisTick: {
            show: false
          },
          splitArea: {
            show: false
          },
          axisLabel: {
            interval: 0,
            // rotate: 50,
            textStyle: {
              color: '#fff',
              fontSize: '14px'
            }
          },
          axisLine: {
            show: false,
            lineStyle: {
              color: '#ffffff'
            }
          },
          data: myDate,
        }],
        yAxis: {
          type: 'value',
          name: '活动次数',
          nameTextStyle: {
            color: '#fff',
            fontSize: 14
          },
          axisLine: {
            lineStyle: {
              color: 'rgba(255, 255, 255, 0.4)',
              width: 1,
              type: 'solid'
            },
            show: true
          },
          splitLine: {
            show: true,
            lineStyle: {
              color: 'rgba(255, 255, 255, 0.4)',
              type: 'dashed'
            }
          },
          axisLabel: {
            textStyle: {
              color: '#fff',
              fontSize: '13px'
            }
          },
          axisTick: {
            show: false
          }
        },

        series: [{
          name: "",
          type: "bar",
          stack: "总量",
          barMaxWidth: 24,
          barGap: "10%",
          itemStyle: {
            normal: {
              show: true,
              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                offset: 0,
                color: 'rgba(6, 124, 226, 0.83)'
              }, {
                offset: 1,
                color: 'rgba(6, 124, 226, 0.31)'
              }], false),
              barBorderRadius: 0,
              label: {
                show: true,
                position: "top",
                color: 'rgba(39, 252, 254, 1)',
                formatter: function (p) {
                  return p.value > 0 ? (p.value) : '';
                }
              }
            },
          },
          data: numA,
        }, {
          name: "",
          type: "bar",
          stack: "总量",
          barMaxWidth: 24,
          barGap: "10%",
          itemStyle: {
            normal: {
              show: true,
              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                offset: 0,
                color: 'rgba(39, 252, 254, 1)'
              }, {
                offset: 1,
                color: 'rgba(39, 252, 254, 1)'
              }], false),
              barBorderRadius: 0,

            },
          },
          data: numB,
        }, {
          // 分隔
          type: "pictorialBar",
          tooltip: {
            show: false,
          },
          symbolRotate: "-45",
          itemStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                offset: 0,
                color: "rgba(6, 124, 226, 0.31)",
              },
              {
                offset: 1,
                color: "rgba(255, 255, 255, 0.31)",
              },
              ]),
            },
          },
          symbolRepeat: "fixed",
          symbolMargin: -8,
          symbol: "rect",
          symbolClip: true,
          symbolSize: [2, 28],
          symbolPosition: "start",
          symbolOffset: [-1, 10],
          data: numA,
          z: 66,
          animationEasing: "elasticOut",
        },]
};