# 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: 10/28/2024, 1:36:05 PM