Skip to main content
A stacked bar chart shows part-to-whole relationships across categories, with the series sharing a stack key. The variables are the series, so variant assigns color per series index. Use monochrome for four or fewer series, and categorical for five or more.

Minimal option

The option matches a grouped bar chart, with stack set on every series in the stack. Set stack in the option, since stacking carries meaning. variant supplies the rest of the treatment.

Variant styling

variant applies the following treatment: Segment gaps apply only on the variant path, where the theme fills the stack. Composing with chartPalette and chartStepItemStyle, as a semantic palette does, leaves the segments touching. Separate them another way: borders on outlined steps usually suffice, and otherwise leave space in the data or layout. See Chart component and Palettes.

Tooltips

Pass renderTooltip to add tooltip content. See Chart component.
Last modified on August 20, 2026