Sparkline and line chart (SVG) for Power Apps
A line drawn from a table with a Value column, with an optional light area below. It shows the shape of a trend in tiles and dashboards without a premium chart.
Requirements
- License: Standard. No premium connector, no PCF, no environment setting.
- Power Apps Studio with modern controls enabled in the app settings
- A canvas app or a component library
Properties
| Property | Type | Notes |
|---|---|---|
Points | Table | One numeric column named Value, in chronological order |
LineColor | Text | Hex color |
ShowArea | Boolean | Light fill below the line |
StrokeWidth | Number | Pixels |
LastValue | Number (output) | Last value of the table |
Download
sparkline.zip holds the component, a demo screen, the property list and the MIT license. The same files one by one:
Sparkline.pa.yaml, the component definitionDemoSparkline.pa.yaml, a demo screen with sample dataREADME.md, properties, setup and limitsLICENSE.txt, the MIT license
Setup
- Open your canvas app (or component library) in Power Apps Studio.
- Create a component named Sparkline and paste the content of Sparkline.pa.yaml from the download above.
- Insert an instance on a screen and set its input properties, using the demo screen as a guide.
- Resize the instance with its Width and Height.
Known 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.
License
MIT, copyright Marcel Lehmann. Use it in private and commercial apps and change it. Keep the license text with the files you pass on, an attribution inside the app is not needed. See LICENSE.txt.