canvasxpress-magic
A %%cxplot IPython / Jupyter magic for
CanvasXpress — render an interactive chart straight from a notebook
cell, no HTML or JavaScript. Works in Jupyter, JupyterLab and VS Code notebooks; the chart is a
self-contained iframe that loads CanvasXpress from the CDN, so there is nothing to build.
Install
pip install canvasxpress-magic
Use
%load_ext canvasxpress_magic
Cell magic — the cell body is a JSON {"data", "config"} spec:
%%cxplot
{"data": {"y": {"vars": ["Revenue"],
"smps": ["Q1", "Q2", "Q3", "Q4"],
"data": [[10, 14, 9, 17]]}},
"config": {"graphType": "Bar", "title": "Quarterly Revenue"}}
Line magic — render a spec held in a Python variable:
spec = {"data": {...}, "config": {"graphType": "Line"}}
%cxplot spec
Both accept sizing flags:
%%cxplot --width 800 --height 500
{ ... }
data and config are exactly the arguments of new CanvasXpress({...}), so any spec from the
gallery or the R / Python packages works unchanged.
License
Dual-licensed. The core library is LGPL-3.0-or-later; commercial terms are available — see
https://canvasxpress.org/license.html.
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 canvasxpress_magic-0.1.0.tar.gz.
File metadata
- Download URL: canvasxpress_magic-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1c66f029f704dbebba10328d5ad0c0b44649230bd3ccff8bcd9f081cfbb0960
|
|
| MD5 |
bf68acd897dd4d71a72199b730903c7f
|
|
| BLAKE2b-256 |
fdbb0f592fb42b7df6d45ab6833d3f5e870c2bc2b0ed7c9412266c2e09f860ce
|
File details
Details for the file canvasxpress_magic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: canvasxpress_magic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6089f2dbcabc85a0d708c6980fe7fca7da3b75559507bf46805400d9742be23
|
|
| MD5 |
78c190430a9dbb92052bac2775efd0c6
|
|
| BLAKE2b-256 |
66ad6b98ffdc862e9acc5ee710d5ab73ddbda8ec31d163f3376b8399b2145442
|