# XWUIDisplayDemographicBar

Segmented multi-category percentage bar: one horizontal track split into
coloured shares (45% / 55%, or any number of categories), plus a small-multiples
`rows` layout that stacks several breakdowns under one shared legend.

## What it does and does not do

It is purely presentational. Weights are normalized, so counts (`120`, `80`) and
percentages (`60`, `40`) both work and neither needs pre-computing. It does no
aggregation, no sorting and no colour-by-value logic - the segments are painted
in the order given, in the colours given.

Reach for `XWUIChartBar` when the reader needs to compare magnitudes across
categories; reach for this when the whole is 100% and the point is the split.

## Basic Usage

```html
<xwui-display-demographic-bar
    show-legend="true"
    show-values="true"
    size="md">
</xwui-display-demographic-bar>
```

## Single bar vs rows

`layout: 'rows'` renders several breakdowns under ONE legend - the small-
multiples form. Use it when the categories are the same across rows (age bands
per region, say); if each row has its own categories the shared legend lies, and
separate bars are the honest rendering.

## API

```api
```
