I wanted a chart in a GitHub README. Not a screenshot, but a real chart that looked as good as the rest of the page. That small wish turned into Bezel Charts: sixteen chart tiles as web components, a Python package that draws the same charts from pandas, and a Studio where you can build a chart without writing any code.
It's free, MIT licensed, and on npm and PyPI. This is how I built it, the decisions behind it, and a couple of things that went wrong along the way.
Why I built it
I'm a data scientist, so most of my work ends in a chart. And my charts kept landing in places where chart libraries struggle. A README can't run JavaScript. A small dashboard tile doesn't need a heavy library just to draw a sparkline. And a chart from a notebook rarely looks like the chart on the website it ends up on.
I'd already built Bezel, a set of clock, calendar and weather tiles as web components. I liked how they felt: add one tag and you get something that looks finished. So I asked a simple question. What if charts worked the same way?
That became the rule for the whole project: a chart should look finished the moment you add it. No config objects, no theme setup, no CSS to fight.
What makes it different
- One tag per chart.
```
Charts fill whatever they sit in and redraw when it resizes, so they work in a sidebar, a card grid or a full-width section without extra CSS.
With npm, you can load everything or just the charts you use:
js import 'bezel-charts/line'; import 'bezel-charts/bars'; And in Python:
python import bezel_charts as bc bc.line(df, x="month", y=["sales", "costs"], heading="Sales", prefix="£") bc.spark(df["signups"], heading="Signups").save("docs/signups.svg") How it works under the hood
Every chart is a pure function
Each chart takes its options and a theme and returns an SVG string. It never touches the page. The custom element is a thin layer on top that handles sizing, themes, tooltips and the keyboard.
That one decision paid off again and again. Tests run in Node in seconds. The same code that draws a chart in the browser also exports it as a static SVG. And toSVG() works on a server, so you can generate chart images in a build script.
A size budget that CI enforces
Every chart file has its own gzip budget, and the build fails if one goes over. It keeps me honest. When I added real dates and log scales to line charts, that file grew from 9.9 kB to 12 kB, and I had to decide whether the feature earned it. Moving shared code around in the same release made the bars-and-line chart smaller.
Python that matches byte for byte
The Python package is a line-by-line port of the JavaScript renderers. CI generates test fixtures from the JavaScript and checks that Python draws the identical SVG, byte for byte. So a chart in your Jupyter notebook is exactly the chart on your website.
I also cared about the numbers matching what data people already trust. Box plot quartiles use the same method as pandas, NumPy and Excel's QUARTILE.INC, so they line up with df.describe().
Accessibility as a feature, not a checkbox
Every chart works without a mouse and without seeing it. Arrow keys move between values, and a screen reader hears something like "Tue: 9. 2 of 7". Lines can have their own dash, points their own shape and bars their own pattern, so series stay distinct without relying on colour, even in black and white. Animation respects reduced-motion settings. And because an exported SVG is just an image, the Python package writes alt text for you with chart.alt.
Two things that went wrong
Versions drifting apart. I keep npm and PyPI on the same version number. For the 1.8.0 release, one package didn't get bumped and I needed a second tag to fix it. Now a test fails if npm, Python, the library and the built files disagree on the version, so it can't happen again.
A broken image on npm. After 1.10.0, I renamed the README image. npm resolves relative image paths against the repository, so the published page pointed at a file that no longer existed. The fix was a full URL for the image. The lesson: anything outside your repo keeps what you published, not what you have now.
Try the Studio
The easiest way to see what it can do is the live Studio. Pick a chart, then import a CSV, Excel or JSON file, or paste cells straight from a spreadsheet. It works out labels, series and units for you, and your files never leave the browser.
When you're happy, Copy HTML gives you the code to paste into a page, Save SVG gives you an image for a README, and Copy link shares your exact chart. No data to hand? There are three sample files to try.
Where it's got to
I started on 26 October 2026 with eight chart types. Just over two weeks and 35 pull requests later, it's at v1.10.1 with sixteen, on npm and PyPI.
A nice surprise: someone found my earlier post here on dev.to and listed Bezel Charts on XERJ Corpus Hub. I've also submitted it to the awesome-web-components list.
What's next
The size budgets and the Python parity stay as hard rules, so every new chart has to earn its kilobytes. Next, I'm planning to submit it to more curated lists, including awesome-dataviz, and to keep shaping it around what people actually use.
So I'd love your input. Which chart would you reach for that isn't there yet? Open an issue, or leave a comment below.
- Repo: github.com/ShazMoghaddam/bezel-charts
- Studio: shazmoghaddam.github.io/bezel-charts
- npm:
npm install bezel-charts - PyPI:
pip install bezel-charts
If it's useful to you, a star on GitHub really helps.
I'm open to roles and collaborations, in the UK and internationally. If you're working on something with data and think I could help, say hello on LinkedIn or through my website.
` Use the copy button on the block. The title and cover image still go in their own fields at the top. 