Library
ChartsChart.js
Widely used canvas charting library with many available adapters.
UnverifiedActive
Unverified
Compatibility has not been verified yet in the PreactHub catalog.
Packagechart.js
npm install chart.jsimport { Chart } from "chart.js/auto"; new Chart(canvas, { type: "line", data: { labels: ["Jan", "Feb"], datasets: [{ data: [3, 6] }] },});Introduction
Chart.js is often used in dashboards and analytics views where canvas rendering is acceptable.
Preact configuration
Rendering is browser-oriented, so pair it with a thin Preact wrapper or direct canvas management.
SSR notes
Charts usually need client-only execution because they rely on canvas and layout measurements.
Islands notes
When using this library inside an island, keep browser-specific setup inside the island component or an effect, and pass only serializable props from the server-rendered page.