Skip to main content

fjkit-charts

Server-rendered Plotly charts for fjkit. A plugin, one line to add, no front-end build.

uv add fjkit-charts
from fjkit import FjkitConfig
from fjkit_charts import ChartsPlugin

config = FjkitConfig(template_dir=APP_DIR / "templates", plugins=(ChartsPlugin(),))
{% from "charts/macros.html" import chart, chart_scripts %}
{% for item in charts %}{{ chart(item) }}{% endfor %}

{% block scripts %}{{ chart_scripts() }}{% endblock %}

Plotly's cartesian bundle ships inside this wheel and is served from the plugin's own static mount. Nothing is fetched at runtime, and a page loads the 1.4 MB only if it calls chart_scripts().

Chart accepts exactly the twelve trace types that bundle registers — bar, box, contour, heatmap, histogram, histogram2d, histogram2dcontour, image, pie, scatter, scatterternary and violin. Any other type fails validation in the route rather than drawing an empty box in the browser.

assert_no_colour_in(charts) is the test to put in your own suite. It refuses an image trace, whose z is a colour per pixel chosen on the server and cannot follow the theme; pass allow_image=True when the pixels are the point.

If the app builds figures with plotly.py, that library targets one plotly.js release. When its major or minor differs from the bundled one, the plugin emits a PluginWarning at startup. plotly.py is not a dependency of this package.

Chart chrome — axis text, grid lines, tick colour, the hover card — is resolved from the live theme tokens on every draw, so a theme toggle is a redraw.

A chart is drawn when it first comes into view, not when the page loads. Drawing one costs around 20 ms, so a page of fifteen draws the four that are on screen; the rest are sized from Chart.height and wait. An overflow-x: auto row counts — a chart scrolled off the side of one is off screen. Pass chart(item, eager=true) for a chart that has to be in the first paint.

License

MIT. See LICENSE.

Metadata

Release files for fjkit-charts 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fjkit-charts 0.3.0
File Size Uploaded Provenance Actions
fjkit_charts-0.3.0.tar.gz 500.4 kB Without provenance Details for fjkit_charts-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fjkit-charts 0.3.0
File Interpreter ABI Platform Actions
fjkit_charts-0.3.0-py3-none-any.whl Python 3 none any Details for fjkit_charts-0.3.0-py3-none-any.whl

Total release size: 995.8 kB

Release files / fjkit_charts-0.3.0.tar.gz

Download URL fjkit_charts-0.3.0.tar.gz
Size 500.4 kB
Tags Source
SHA-256 checksum
How to use checksums
46fa5b7c9281828bd808ea3df09aa857eb40754d63d4380fc38a2a4e09663ef1
BLAKE2b-256 checksum
How to use checksums
1eccf76de882ef07e472b2502e3650d555d62c50b93bd6778787954c18caad82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fjkit_charts-0.3.0-py3-none-any.whl

Download URL fjkit_charts-0.3.0-py3-none-any.whl
Size 495.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5684ea12977019c834bb5b662d0251321e2e2c3a8313d5a797fd5e70c3e344f5
BLAKE2b-256 checksum
How to use checksums
46bcc39a37d562937e6ad79ceb3ab263aeefd96e0c78c3e5177f222f0753dfa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fjkit-charts 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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