echarts的堆叠柱状图,实现这种,应该怎么处理数据格式呀?

echarts的堆叠柱状图,实现这种,应该怎么处理数据格式呀?弄了好久了,都对应不上。。

img


option = {
  xAxis: {
  },
  yAxis: {  
      data: ['A', 'B', 'C', 'D']
    },
  series: [
    {
        type: 'bar',
        data: [3, 5] ,//[A1,B1]
        stack: true
    },
    {
        type: 'bar',
        data: [4, 6] ,//[A2,B2]
        stack: true
    }   
  ]
};

看看 官网的例子 。把数据处理成一样的就行