# Stacked Bar Chart with Groups

Using the stack property to divide datasets into multiple stacks.

const config = {
  type: 'bar',
  data: data,
  options: {
    plugins: {
      title: {
        display: true,
        text: 'Chart.js Bar Chart - Stacked'
      },
    },
    responsive: true,
    interaction: {
      intersect: false,
    },
    scales: {
      x: {
        stacked: true,
      },
      y: {
        stacked: true
      }
    }
  }
};

# Docs

Last Updated: 2/28/2024, 4:43:58 PM