Series are grouped by default; add stacked to stack them.

050100Q1Q2Q3Q42024, Q1: 402025, Q1: 522024, Q2: 552025, Q2: 612024, Q3: 482025, Q3: 662024, Q4: 702025, Q4: 90
  • 2024
  • 2025

Charts animate in when they appear, and when the data changes the bars glide to their new height. Press the button to try it; animate={false} turns it off.

020406080JanFebMarAprMayJunBananas, Jan: 56Bananas, Feb: 77Bananas, Mar: 25Bananas, Apr: 42Bananas, May: 77Bananas, Jun: 56

Props

  • labelsstring[]

    Names of the x positions / categories.

  • series{ name, values: number[], color? }[]

    One entry per series; values has one number per label.

  • heightnumber
    Default: 300

    Chart height in px (width follows the container).

  • labelstring

    Accessible name for the chart.

  • legendboolean
    Default: true

    Show the legend when there are several series.

  • stackedboolean
    Default: false

    Stack series instead of grouping them.

  • animateboolean
    Default: true

    Animate the chart in when it appears and glide it to new values when the data changes (skipped for users who prefer reduced motion).

  • classNamestring
    Default: ''

    Extra classes for the root element.