堆叠图问题

描述:当前是关于Echarts图表中的 柱状图 示例。
 
              option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {            // 坐标轴指示器,坐标轴触发有效
                    type: 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
                }
            },
            legend: {
                icon:'circle',
                data: ['加工', '待机', '关机', '报警']
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '84%',
                containLabel: true
            },
            xAxis: {
                show: true,
                type: 'value',
                splitLine: {
                    show: false
                },
                axisLine: {
                    show: false
                },
                axisTick: {
                    show: false
                }
            },
            yAxis: {
                // max:20,
                show: true,
                type: 'category',
                data: ['机床状态'],
                axisTick: {
                    show: false
                },
                axisLine: {
                    show: false
                }
            },
            series: [
                {
                    name: '加工',
                    type: 'bar',
                    stack: '总量',
                    label: {
                        normal: {
                            show: true,
                            position: 'insideRight'
                        }
                    },
                    data: [22]
                },
                {
                    name: '待机',
                    type: 'bar',
                    stack: '总量',
                    label: {
                        normal: {
                            show: true,
                            position: 'insideRight'
                        }
                    },
                    data: [33]
                },
                {
                    name: '关机',
                    type: 'bar',
                    stack: '总量',
                    label: {
                        normal: {
                            show: true,
                            position: 'insideRight'
                        }
                    },
                    data: [22]
                },
                {
                    name: '报警',
                    type: 'bar',
                    stack: '总量',
                    label: {
                        normal: {
                            show: true,
                            position: 'insideRight'
                        }
                    },
                    data: [15]
                }
            ]
        };;
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }