Skip to content

About

Grammar-of-graphics-flavored chart building for Mojo

Topics

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

567 Commits

Folders and files

Repository files navigation

dataviz_mojo

Grammar-of-graphics-style chart building for Mojo: a fluent Plot builder, scales, themes, raster and SVG output, facets, and multi-series layers.

See the documentation and examples for rendered examples and the generated API reference.

See the release notes for what each version added, changed and broke, and the issue tracker for what's still open. The wiki keeps the early design history, up to v0.11.0.

Install

[workspace]
preview = ["pixi-build"]  # git-source pixi dependencies are still a preview feature
# Mojo 1.2 is only on the nightly channel so far, and dataviz_mojo pins
# 1.2.0.dev2026092105. The cutoff keeps its source dependencies building
# with that same compiler rather than a newer nightly.
channels = [
    { channel = "https://conda.modular.com/max-nightly", exclude-newer = "2026-09-21T12:00:00Z" },
    "https://conda.modular.com/max",
    "conda-forge",
]

[dependencies]
dataviz_mojo = { git = "https://github.com/randyzwitch/dataviz_mojo.git", tag = "v0.15.0" }

Pixi builds dataviz_mojo and its canvas_mojo dependency from the selected Git ref. The package installs as dataviz_mojo and imports as dataviz:

from dataviz import Plot, save

Swap the tag for branch = "main" to follow development instead. This package is pre-1.0 and renames or removes API outright rather than running deprecation cycles, so main can break your program on any pixi update; a tag cannot.

For a complete first chart and the command that runs it, follow the five-minute quickstart.

Development

pixi run test      # tests/*.mojo
pixi run example   # every dataviz/*.mojo `Example:` docstring section, writes docs/src/examples/out_*.svg
pixi run docs      # regenerates docs/ (served via GitHub Pages) -- run `example` first
pixi run bench     # render-time table per mark family at increasing sizes; add --check to fail on suspect scaling
pixi run format         # reformat source with mojo format
pixi run format-check   # fail if source isn't formatter-clean (what CI runs)

GitHub Actions builds documentation for pull requests and deploys it from main. Use pixi run docs for a local preview.

See CONTRIBUTING.md for the public-docstring template and the checks run before a chart example is generated.

Releasing

pixi.toml carries the version in two places, [workspace].version and [package].version, which must agree (CI's check-version job checks this on every push/PR). pixi run release <version> bumps both together, commits, and tags:

pixi run release 0.8.0        # bumps, commits, tags v0.8.0 locally
git push origin main --tags   # review with `git show`/`git log` first

pixi run check-version on its own just checks the two fields agree; pass a ref/tag as an extra argument (pixi run check-version v0.8.0) to also check it against them. See scripts/release.sh/ scripts/check_version.sh for the full behavior.

Write the release notes when you tag: they are the human-readable record of what each version added, changed and broke, and the only place a breaking change is announced.

License

MIT — see LICENSE.

About

Grammar-of-graphics-flavored chart building for Mojo

Topics

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages