A Reflex custom component port of the rosencharts charting library (D3.js + Tailwind), usable from pure Python.
Project description
reflex-rosencharts
A port of the rosencharts charting library (43 React/TSX components built with D3.js + Tailwind) to a custom component for Reflex, so the charts can be used from pure Python.
Status: scaffold + SDD plan. The charts are implemented in phases according to
specs/plans/implementation-plan.md.
Why?
rosencharts is not an npm package: it's a set of .tsx components to copy and paste, with
hardcoded data and Tailwind styling. This project wraps them as local Reflex components
(rx.asset + library="$/public..."), parametrizes them to receive data from rx.State, and
exposes them as Python functions:
import reflex as rx
import reflex_rosencharts as rxc
class State(rx.State):
sales: list[dict] = [{"date": "2023-05-01", "value": 6}, {"date": "2023-05-02", "value": 8}]
def index() -> rx.Component:
return rxc.line_chart(data=State.sales)
Charts (43 across 8 families)
| Family | # | Examples |
|---|---|---|
| Area | 4 | area_chart, area_chart_gradient |
| Bar | 12 | bar_chart_horizontal, bar_chart_benchmark |
| Line | 8 | line_chart, line_chart_multiple |
| Pie/Donut | 8 | pie_chart, donut_chart_center_text |
| Scatter | 4 | scatter_chart, scatter_chart_interactive |
| Treemap | 3 | treemap_chart, treemap_chart_images |
| Radar | 2 | radar_chart, radar_chart_rounded |
| Other | 2 | bubble_chart, funnel_chart |
Full catalog and props: specs/api/component-api-v1.md.
Development
Managed with uv:
uv sync # install dependencies
uv run reflex run # start the demo app / gallery
Specifications (SDD)
The project follows Spec-Driven Design. The specs are the primary artifact:
- PRD — the what and the who-for
- API Spec — public Python API (functions, props)
- Technical Design — wrapping pattern and architecture
- Data Model — per-chart data schemas
- Implementation Plan — phases by family
The original code (reference, read-only) lives in reference/rosencharts/.
License and attribution
MIT. This project is a port of rosencharts
by Filsommer (MIT). See LICENSE and NOTICE.
Project details
Release history Release notifications | RSS feed
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 reflex_rosencharts-0.1.1.tar.gz.
File metadata
- Download URL: reflex_rosencharts-0.1.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74b63b3a2dc5f1953d8f78ca6abaa3706b0eb423911520d471fca05b0774eef1
|
|
| MD5 |
cc0ecc891f63a4387881d399300fccec
|
|
| BLAKE2b-256 |
8754aef197e78af38989eb95a14a01277f857c437af5c202f6694c3d17d7c0c1
|
File details
Details for the file reflex_rosencharts-0.1.1-py3-none-any.whl.
File metadata
- Download URL: reflex_rosencharts-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d68f0c5b4edf3e1db5571190b5ae6c8e587e97551094b422bbbd1569c40671d0
|
|
| MD5 |
234a3371326bd6507199fb944f176417
|
|
| BLAKE2b-256 |
046c4ade1e43b6c6f231223bc1c4545df15001fca7b6a09964c95aa59cb90203
|