echarts 堆疊面積階梯圖

暖暖De幸福發表於2024-06-13
option = {
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [9, 9, 13, 13, 13, 13, 13],
      type: 'line',
      stack: 'Total',
      step: 'start',
      areaStyle: {}
    },
    {
      data: [18, 18, 18, 18, 18, 18, 12],
      type: 'line',
      stack: 'Total',
      step: 'start',
      areaStyle: {}
    },
    {
      data: [5, 5, 5, 5, 5, 5, 5],
      type: 'line',
      stack: 'Total',
      step: 'start',
      areaStyle: {}
    }
  ]
};

image

相關文章