Ultra-lightweight canvas-based charting library - Chart.js alternative under 10kb
- 🎨 6 Chart Types: Bar, Line, Pie, Doughnut, Area, Scatter
- 🚀 Lightweight: Under 10kb bundle size
- ⚡ Performance: Pure Canvas API, zero dependencies
- 🎭 Animations: Smooth animations with easing functions
- 📱 Responsive: Built-in responsive and retina support
- 🔧 TypeScript: Full TypeScript support
npm install chartieimport { Chartie } from 'chartie';
const config = {
type: 'bar',
data: {
labels: ['Jan', 'Feb', 'Mar'],
datasets: [{
label: 'Sales',
data: [12, 19, 3],
backgroundColor: '#3b82f6'
}]
}
};
const chart = new Chartie('myCanvas', config);import { useEffect, useRef } from 'react';
import { Chartie } from 'chartie';
function Chart() {
const canvasRef = useRef(null);
useEffect(() => {
const chart = new Chartie(canvasRef.current, {
type: 'line',
data: {
labels: ['Mon', 'Tue', 'Wed', 'Thu'],
datasets: [{
label: 'Revenue',
data: [65, 59, 80, 81],
borderColor: '#ef4444',
fill: true
}]
}
});
return () => chart.destroy();
}, []);
return <canvas ref={canvasRef}></canvas>;
}bar- Vertical bar chartline- Line chart with optional fillpie- Pie chartdoughnut- Doughnut chartarea- Area chart (filled line)scatter- Scatter plot
Contributions are very welcome! We're still at the very beginning and would love your help to make Chartie even better.
- 🐛 Report bugs
- 💡 Suggest new features
- 🔧 Submit pull requests
- 📚 Improve documentation
MIT License