# XWUIAnalyticDistribution

Editor that splits a single accounting line across multiple analytic accounts / cost centers / projects by percentage, validating that the rows sum to 100% with a live residual indicator (green at 100%, amber when low, red when over). Each row is an account picker (composing XWUIInputAutocomplete) plus a `%` input and a colour swatch, with `+ Add line` and `Balance to 100%` helpers in the footer and an optional stacked bar above. Maps directly to Odoo's `analytic_distribution` widget; use it wherever a cost split must be entered and kept balanced.

## Basic Usage

Two analytic accounts split 60 / 40 so the sum hits 100% and the residual reads green.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Two accounts split 60/40 to a valid 100% total.
```

## Under Allocated

The lines sum to only 80%, so the residual indicator turns amber to signal more allocation is needed.

```example
file: examples/UnderAllocated.ts
html: examples/UnderAllocated.html
title: Under Allocated
description: Sum is 80% so the residual indicator goes amber.
```

## With Bar

`showBar: true` adds the horizontal stacked bar that visualizes each account's share of the split.

```example
file: examples/WithBar.ts
html: examples/WithBar.html
title: With Bar
description: Four accounts with the stacked-bar visualization enabled.
```

```api
```
