finds.dev← search

// the find

apertureless/vue-chartjs

★ 5,718 · TypeScript · MIT · updated Jun 2026

📊 Vue.js wrapper for Chart.js

vue-chartjs is a thin Vue 3 wrapper around Chart.js that exposes each chart type as a typed Vue component. It handles canvas lifecycle (mount/unmount, destroy) and reactive data updates so you don't have to wire those up yourself. Aimed at Vue developers who want Chart.js without the boilerplate of managing chart instances manually.

The component API is minimal and stays out of the way — you pass `data` and `options` props directly in Chart.js format, so there's no intermediate abstraction to learn on top of Chart.js itself. TypeScript types are accurate and cover chart-specific props (e.g. `TypedChartComponent`), which catches config mistakes at compile time. The library is genuinely small (~4KB per the size-limit config) because it delegates everything to Chart.js rather than reimplementing it. Per-chart-type sandboxes in the repo make it easy to reproduce issues or test locally without setting up a full app.

You still have to manually call `ChartJS.register(...)` for every scale, element, and plugin you use — the wrapper doesn't help with this at all, and forgetting a registration produces a silent empty chart that's annoying to debug. Reactivity has a known rough edge: deep mutation of the `data` object (e.g. `this.data.datasets[0].data.push(val)`) won't trigger an update; you have to replace the whole object or call the chart instance directly, which is not obvious from the README. There's no built-in slot or event system for Chart.js plugins (tooltips, annotations), so anything beyond basic charts requires reaching into the exposed chart instance via a ref — at which point the abstraction is partially leaking anyway. The SSR story is undocumented and fragile since Chart.js itself needs a real canvas.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →