MkDocs plugin to add charts from data
Project description
mkdocs-charts-plugin
MkDocs plugin to create plots from data using the declarative vegalite syntax. This makes it easier to build reproducible reports with MkDocs.
👉 See it in action on the demo page
Includes supports for mkdocs-material theme features like instant loading and dark color themes.
Installation
Install the plugin using pip3:
pip3 install mkdocs-charts-plugin
Next, add the following lines to your mkdocs.yml:
plugins:
- search
- charts
extra_javascript:
- https://cdn.jsdelivr.net/npm/vega@5
- https://cdn.jsdelivr.net/npm/vega-lite@5
- https://cdn.jsdelivr.net/npm/vega-embed@6
markdown_extensions:
- pymdownx.superfences:
custom_fences:
- name: vegalite
class: vegalite
format: !!python/name:mkdocs_charts_plugin.fences.fence_vegalite
If you have no
pluginsentry in your config file yet, you'll likely also want to add thesearchplugin. MkDocs enables it by default if there is nopluginsentry set.
Usage
You can insert any valid vegalite JSON into a markdown file. But the real magic is that you can visualize .json or .csv files:
```vegalite
{
"description": "A simple bar chart with embedded data.",
"data": {"url" : "assets/charts/data/basic_bar_chart.json"},
"mark": {"type": "bar", "tooltip": true},
"encoding": {
"x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
"y": {"field": "b", "type": "quantitative"}
}
}
```
See the vegalite editor for a range of examples.
Documentation
See the documentation timvink.github.io/mkdocs-charts-plugin for examples, use cases and options.
Do checkout the other charting plugins for mkdocs that might suit your specific use-case better.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_charts_plugin-0.0.13.tar.gz.
File metadata
- Download URL: mkdocs_charts_plugin-0.0.13.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7de0a74a2ecc8a5a17ce49ebf84c3175ec03a17725e85b970c0b2c3d59faa311
|
|
| MD5 |
b670e5fff7f177112ad9eeccfb02db96
|
|
| BLAKE2b-256 |
1584d3c731390478a6f9dea0a4517e24287a317a015d85bde7342ba60ddac3e2
|
Provenance
The following attestation bundles were made for mkdocs_charts_plugin-0.0.13.tar.gz:
Publisher:
pythonpublish.yml on timvink/mkdocs-charts-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_charts_plugin-0.0.13.tar.gz -
Subject digest:
7de0a74a2ecc8a5a17ce49ebf84c3175ec03a17725e85b970c0b2c3d59faa311 - Sigstore transparency entry: 458616170
- Sigstore integration time:
-
Permalink:
timvink/mkdocs-charts-plugin@a11d1cef8d5e3f87b6e9058ed147d858bf5730a2 -
Branch / Tag:
refs/tags/v0.0.13 - Owner: https://github.com/timvink
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@a11d1cef8d5e3f87b6e9058ed147d858bf5730a2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mkdocs_charts_plugin-0.0.13-py3-none-any.whl.
File metadata
- Download URL: mkdocs_charts_plugin-0.0.13-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cef515bb3b4acb3dfea45787d7db3a6f39bf649dbb369a73416c6a1386cac258
|
|
| MD5 |
80c327cc5938e3066336f4e3cf71db28
|
|
| BLAKE2b-256 |
316f4015dbb4c26bf1fc4b5b637188fc47ec2f1781baccc2e13b0c48887ae9b0
|
Provenance
The following attestation bundles were made for mkdocs_charts_plugin-0.0.13-py3-none-any.whl:
Publisher:
pythonpublish.yml on timvink/mkdocs-charts-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_charts_plugin-0.0.13-py3-none-any.whl -
Subject digest:
cef515bb3b4acb3dfea45787d7db3a6f39bf649dbb369a73416c6a1386cac258 - Sigstore transparency entry: 458616191
- Sigstore integration time:
-
Permalink:
timvink/mkdocs-charts-plugin@a11d1cef8d5e3f87b6e9058ed147d858bf5730a2 -
Branch / Tag:
refs/tags/v0.0.13 - Owner: https://github.com/timvink
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@a11d1cef8d5e3f87b6e9058ed147d858bf5730a2 -
Trigger Event:
release
-
Statement type: