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-1.0.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

PiChart-1.0.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pichart-1.0.0.tar.gz
Algorithm Hash digest
SHA256 df6a1bd4deab418961b8e9aa17d1c1ebb86962a1b187378c19d5df78b2a9f4ab
MD5 a3cc64a1bb16a71e366f3199d979725f
BLAKE2b-256 e2dfa2b0b52d28ce745b53ce78c3683dbf2c380f0297b55f1bc72524536c8133

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for PiChart-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76103cf76eff9e77fe38c57795d70e617058756b89331981e8365c0760973ade
MD5 cd00e5e274ab6949f1b1614ab8935a17
BLAKE2b-256 fc4c21f2651d769f0dda7c7734cf05e4d2077148196a583bae81b98b2d8a7c46

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