# DonutRing

A progress or share ring drawn as SVG in an Image control. It replaces a chart control for the simple case of one value from 0 to 100.

**License needed:** Standard. No premium connector, no PCF, no environment setting.

## Properties

| Property | Type | Default | Notes |
|---|---|---|---|
| Percent | Number | 72 | 0 to 100, values outside are clamped |
| CenterText | Text | empty | Empty shows the rounded percent |
| Caption | Text | completed | Small line below the center text |
| BarColor | Text | #1F6FEB | Hex text, because SVG cannot read a Color value |
| TrackColor | Text | #E4E8EC | Hex text |
| Thickness | Number | 10 | Percent of the diameter, 2 to 30 |
| TextColor | Color | dark grey | |

Width and Height are normal component properties (default 140 x 140). The ring uses the smaller side and is centered.

## Setup

1. Create a component named `DonutRing` and paste `src/DonutRing.pa.yaml`.
2. Insert the component and bind `Percent` to a number.
3. See `demo/DemoDonutRing.pa.yaml` for a slider-driven ring and two variants.

## Limits

- One value per ring. For several segments use more than one ring or a chart control.
- Colors must be hex text. Convert theme colors once in `App.Formulas` if you need them.
