Skip to main content
Component-page

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

PropertyTypeNotes
PointsTableOne numeric column named Value, in chronological order
LineColorTextHex color
ShowAreaBooleanLight fill below the line
StrokeWidthNumberPixels
LastValueNumber (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:

Setup

  1. Open your canvas app (or component library) in Power Apps Studio.
  2. Create a component named Sparkline and paste the content of Sparkline.pa.yaml from the download above.
  3. Insert an instance on a screen and set its input properties, using the demo screen as a guide.
  4. 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.

All components

Microsoft and the Power Platform product names (for example Power Apps, Power Automate, Copilot Studio) are trademarks of the Microsoft group of companies. This is an independent website. It is not operated, sponsored or endorsed by Microsoft.