# Sparkline

A line chart or sparkline drawn as SVG from a table with a `Value` column. It replaces a chart control for trends in tiles and dashboards.

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

## Properties

| Property | Type | Default | Notes |
|---|---|---|---|
| Points | Table | 8 sample values | One numeric column named `Value`, in chronological order |
| LineColor | Text | #1F6FEB | Hex text, because SVG cannot read a Color value |
| ShowArea | Boolean | true | Light fill below the line |
| StrokeWidth | Number | 2 | Pixels, stays constant when the component is resized |
| LastValue (output) | Number | | Last value of the table |

Width and Height are normal component properties (default 200 x 60). The line is scaled to fill the component.

## Setup

1. Create a component named `Sparkline` and paste `src/Sparkline.pa.yaml`.
2. Insert the component and set `Points`, for example `ForAll(colSales, {Value: Amount})`.
3. See `demo/DemoSparkline.pa.yaml` for a wide chart and a small inline variant.

## Limits

- No axes, labels or tooltips. It shows the shape of a trend, not exact values.
- Fewer than two points draws nothing.
- The scale always runs from the minimum to the maximum of the table.
