Skip to content

datachart

Data visualization package, simple to use, highly customizable

More than twenty chart types, each a single function call on plain lists of dicts. Built on matplotlib, styled by one global theme. Combine several charts into one plot, or arrange them side by side in a grid.

Get started Browse the charts
pip install datachart

Documentation

Find your way around

Start with a guide, look things up in the reference, or point your AI assistant at the docs.

Install

Two commands, Python 3.10 or higher

Install from PyPI with pip or uv. Add the interactive extra for zoom, pan, and hover-to-inspect.

pip install -U datachart
uv add datachart
pip install -U "datachart[interactive]"

Every chart returns a plain matplotlib Figure, so anything matplotlib can do with it still works. See Saving Figures and Interactive Figures.

First chart

A line chart in one call

Every chart takes a list of series, each a list of dicts. Set a theme once and every chart follows it.

from datachart.charts import LineChart
from datachart.config import config
from datachart.constants import THEME

config.set_theme(THEME.INK)

months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"]
signups = [420, 465, 430, 510, 560, 545, 610]
churned = [380, 400, 440, 435, 480, 520, 550]

figure = LineChart(
    [
        [{"x": x, "y": y} for x, y in enumerate(signups)],
        [{"x": x, "y": y} for x, y in enumerate(churned)],
    ],
    title="Monthly signups vs. churn",
    subtitle=["Signups", "Churned"],
    xlabel="Month",
    ylabel="Users",
    xticks=list(range(len(months))),
    xticklabels=months,
    show_legend=True,
)

Two lines, signups and churned users, over seven months in the INK theme