Skip to main content

MkDocs plugin to add charts from data

Project description

Actions Status PyPI - Python Version PyPI GitHub contributors PyPI - License


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.


Install the plugin using pip3:

pip3 install mkdocs-charts-plugin

Next, add the following lines to your mkdocs.yml:

  - search
  - charts


  - pymdownx.superfences:
        - name: vegalite
          class: vegalite
          format: !!python/name:mkdocs_charts_plugin.fences.fence_vegalite

If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set.


You can insert any valid vegalite JSON into a markdown file using:

  "$schema": "",
  "description": "A simple bar chart with embedded data.",
  "data": {
    "values": [
      {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
      {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
      {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
  "mark": "bar",
  "encoding": {
    "x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
    "y": {"field": "b", "type": "quantitative"}

See the vegalite editor for a range of examples you could copy-paste into your mkdocs site


See the documentation for examples, use cases and options.

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

mkdocs-charts-plugin-0.0.8.tar.gz (8.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page