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.2.0.tar.gz (8.8 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.2.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pichart-2.2.0.tar.gz
Algorithm Hash digest
SHA256 c3781f6c2c3a08c7f322d84617aa1e1188e3bc9d797adaad5eaed8a3650226e0
MD5 af09bf1cc83d95508632aee97e3ab68c
BLAKE2b-256 1cf8843f98ee544ed5263d9e0d0a4e6690a9913e53798cb2c5f15e824ece39af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PiChart-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 260c5f12cd90496e3a0f310ba8fda9c39e03b0404bb7829db26f311a7ac3e690
MD5 f3a9f75b68320a2ddc112acff2f2ad44
BLAKE2b-256 55c5ab46399dd1baeeb0206b6850075a3fdb419da9da5e8d10520d6ca52182b9

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