1echarts 柱状配置项内容和展示

配置项如下
      app.title = '正负条形图';

option = {
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器,坐标轴触发有效
            type : 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
        }
    },
    legend: {
        data:['中立', '负面', '正面']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'value'
        }
    ],
    yAxis : [
        {
            type : 'category',
            axisTick : {show: false},
            data : ['教育局','教师','教材','国家','学生','学校']
        }
    ],
    series : [
        {
            name:'中立',
            type:'bar',
            label: {
                normal: {
                    show: true,
                    position: 'inside'
                }
            },
            data:[30, 25, 7, 6, 6, ]
        },
        {
            name:'正面',
            type:'bar',
            stack: '总量',
            label: {
                normal: {
                    show: true
                }
            },
            data:[7, 6, 22, 6, 14, 6,]
        },
        {
            name:'负面',
            type:'bar',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'left'
                }
            },
            data:[-87, -5, -22, -24, -14, -6, ]
        }
    ]
};

    
截图如下