Skip to main content

canvasxpress-streamlit

CanvasXpress interactive charts in Streamlit apps — no JavaScript build step. The library is loaded from the CanvasXpress CDN inside Streamlit's component iframe.

Install

pip install canvasxpress-streamlit

Use

import streamlit as st
from canvasxpress_streamlit import canvasxpress

st.title("CanvasXpress in Streamlit")

canvasxpress(
    data={
        "y": {
            "vars": ["Revenue"],
            "smps": ["Q1", "Q2", "Q3", "Q4"],
            "data": [[10, 14, 9, 17]],
        }
    },
    config={"graphType": "Bar", "title": "Quarterly Revenue"},
    height=420,
)

data and config are exactly the arguments of new CanvasXpress({...}) in JavaScript, so any spec from the gallery or the R / Python packages works unchanged.

Parameters

Argument Type Default Meaning
data dict {} CanvasXpress data object.
config dict {} CanvasXpress configuration (graphType, title, …).
width int 600 Canvas width in pixels.
height int 400 Canvas height in pixels.
key str None Optional Streamlit widget key.

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

canvasxpress_streamlit-0.1.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canvasxpress_streamlit-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file canvasxpress_streamlit-0.1.0.tar.gz.

File metadata

  • Download URL: canvasxpress_streamlit-0.1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for canvasxpress_streamlit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1df560ecd235efcc8e32b8c4a31e32b6e0f11e1016db6067a4250c56fbd43668
MD5 d2ba254977dc9fcecaae3c79057f1d90
BLAKE2b-256 93b0a3238040084ecbeb60dd0301c43d9211aa30385ef2108778f67355a115c7

See more details on using hashes here.

File details

Details for the file canvasxpress_streamlit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for canvasxpress_streamlit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00a467ce4c59062f96b0420f160feb2ed26ce278c3ef1b29ebd036b6531c5014
MD5 ead9164acd1057f800b9157de3242460
BLAKE2b-256 8dd6da067db0a047ef9fab7a6fb53f7136d942d27d8887c984e4f29823d7f6e4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page