Skip to main content

Tiny Charts Dashboard UI for MicroPython

Project description

PiChart - Tiny Dashboard Charts for MicroPython

PiChart is a lightweight library for creating charts, cards, and image tiles on MicroPython displays, optimized for devices like the Raspberry Pi Pico with Pimoroni displays. Plot data as bars, lines, or points, display text cards, or show JPEG images in a customizable grid layout.

Features

  • Bar, line, and point chart types
  • Text cards for simple info displays
  • JPEG image tiles with borders
  • Grid-based container for layout management
  • Customizable colors, sizes, and display options

Requirements

  • MicroPython firmware (e.g., Pimoroni’s build with jpegdec)
  • A compatible display (e.g., Pico Display Pack)
  • Hardware: Raspberry Pi Pico or similar MicroPython device

Installation

  1. Copy pichart.py to your MicroPython device using a tool like Thonny or rshell.
  2. Ensure your MicroPython firmware includes jpegdec (included in Pimoroni’s builds).

Quick Start

from pichart import Chart, Container
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY

# Set up display
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY)

# Create a chart
chart = Chart(display, title="Temp", values=[20, 25, 22, 28])
chart.x = 10
chart.y = 10
chart.width = 220
chart.height = 120
chart.data_colour = {'red': 255, 'green': 0, 'blue': 0}  # Red bars

# Add to container and draw
container = Container(display)
container.add_chart(chart)
container.update()

Documentation

See docs/ for detailed guides:

License

MIT License - See LICENSE for details.

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pichart-2.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PiChart-2.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file pichart-2.1.0.tar.gz.

File metadata

  • Download URL: pichart-2.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pichart-2.1.0.tar.gz
Algorithm Hash digest
SHA256 e4cc8c90bce982a4fafd344611f967cc405d54f5f16f0845fd91d0c0edee9a97
MD5 34217c6673a45157ae62bd117023639e
BLAKE2b-256 aac236857bab9cc7015f2ed45cded732bb81774f7e3183000ff6c842d9ba9c24

See more details on using hashes here.

File details

Details for the file PiChart-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: PiChart-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for PiChart-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65ab7a3abf926ab95be2809a3ea395bd5e683358944d28191dbce80e2b03c4c8
MD5 90eaede1ebe55a6e1c741eae4fa6dd9b
BLAKE2b-256 9f1314afcd12dd45b1a1e4ce498d2a211942f8f3b8b1dc27e18dca44f47a05ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page