Metadata-Version: 2.5
Name: chartlet
Version: 0.28.0
Summary: Compile structured data into deterministic, accessible static charts
Project-URL: Homepage, https://casoon.github.io/chartlet/
Project-URL: Documentation, https://casoon.github.io/chartlet/docs/guides/python/
Project-URL: Repository, https://github.com/casoon/chartlet
Project-URL: Changelog, https://github.com/casoon/chartlet/blob/main/CHANGELOG.md
License-Expression: MIT
License-File: LICENSE
Keywords: accessibility,charts,mkdocs,sphinx,static,svg,visualization
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Jupyter
Classifier: Framework :: MkDocs
Classifier: Framework :: Sphinx :: Extension
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Documentation
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Requires-Dist: wasmtime>=30
Description-Content-Type: text/markdown

# chartlet

Compile structured data into deterministic, accessible static charts and diagrams, from Python.

```sh
pip install chartlet
```

```python
import chartlet

svg = chartlet.render({
    "schemaVersion": 1,
    "type": "bar",
    "title": "Monthly revenue",
    "data": [
        {"label": "January", "value": 120},
        {"label": "February", "value": 180},
    ],
})
```

`render` returns the same bytes as `chartlet render` with the same options. The package carries
the renderer compiled to WebAssembly and runs it with wasmtime; it needs no Rust toolchain, no
browser and no network.

- **Jupyter:** `chartlet.Chart(spec)` shows the chart's HTML figure in a notebook.
- **Sphinx:** `extensions = ["chartlet.sphinx"]` adds the `chartlet` directive, for
  reStructuredText and MyST Markdown.
- **MkDocs:** `markdown_extensions: [chartlet]` renders fenced `chartlet` blocks.

Documentation: [Python](https://casoon.github.io/chartlet/docs/guides/python/) and
[Markdown and documentation sites](https://casoon.github.io/chartlet/docs/guides/markdown/).

## License

MIT.
