Metadata-Version: 2.5
Name: fjkit-charts
Version: 0.1.0.dev0
Summary: Server-rendered Plotly charts for fjkit — a plugin, no front-end build
Project-URL: Homepage, https://liweicheng00.github.io/fjkit/
Project-URL: Documentation, https://liweicheng00.github.io/fjkit/
Project-URL: Repository, https://github.com/liweicheng00/fjkit
Project-URL: Issues, https://github.com/liweicheng00/fjkit/issues
Author: liweicheng00
License-Expression: MIT
License-File: LICENSE
Keywords: charts,dashboard,fastapi,fjkit,jinja2,no-build,plotly,server-rendered
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: fjkit
Requires-Dist: pydantic>=2.9
Description-Content-Type: text/markdown

# fjkit-charts

Server-rendered Plotly charts for [fjkit](https://liweicheng00.github.io/fjkit/).
A plugin, one line to add, no front-end build.

```bash
uv add fjkit-charts
```

```python
from fjkit import FjkitConfig
from fjkit_charts import ChartsPlugin

config = FjkitConfig(template_dir=APP_DIR / "templates", plugins=(ChartsPlugin(),))
```

```jinja
{% from "charts/macros.html" import chart, chart_scripts %}
{% for item in charts %}{{ chart(item) }}{% endfor %}

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

Plotly's basic 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.1 MB
only if it calls `chart_scripts()`.

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.

## License

MIT. See [LICENSE](LICENSE).
