vue-chartjs
Vue.js wrapper for chart.js for creating beautiful charts.
40,850,058
5,718
| Install | |
|---|---|
npm install vue-chartjs |
|
| Latest Version: | 5.3.4 |
| Vue: | 2 · 3 |
| Older releases: | 1 |
| License: | MIT |
| Last Updated: | Oct 27, 2026 |
| Links: | GitHub · npm |
Maintainer: apertureless
vue-chartjs
vue-chartjs is a wrapper for Chart.js in Vue. You can easily create reuseable chart components.
Supports Chart.js v4.
QuickStart • Docs • Stack Overflow
Quickstart
Install this library with peer dependencies:
pnpm add vue-chartjs chart.js
# or
yarn add vue-chartjs chart.js
# or
npm i vue-chartjs chart.js
Then, import and use individual components:
<template>
<Bar :data="data" :options="options" />
</template>
<script lang="ts">
import {
Chart as ChartJS,
Title,
Tooltip,
Legend,
BarElement,
CategoryScale,
LinearScale
} from 'chart.js'
import { Bar } from 'vue-chartjs'
ChartJS.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend)
export default {
name: 'App',
components: {
Bar
},
data() {
return {
data: {
labels: ['January', 'February', 'March'],
datasets: [{ data: [40, 20, 12] }]
},
options: {
responsive: true
}
}
}
}
</script>
Need an API to fetch data? Consider Cube, an open-source API for data apps.
Docs
- Reactivity
- Access to Chart instance
- Accessibility
- Migration from v4 to v5
- Migration from vue-chart-3
- API
- Examples
Build Setup
# install dependencies
pnpm install
# build for production with minification
pnpm build
# run unit tests
pnpm test:unit
# run all tests
pnpm test
Contributing
- Fork it ( https://github.com/apertureless/vue-chartjs/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
License
This software is distributed under MIT license.
Related Packages
vue3-chart-v2
vue3-chart-v2 is a wrapper for Chart.js in Vue 3. You can easily create reuseabl...
77,787
35
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 5.3.4 | ^3.0.0-0 || | MIT | |
| 5.3.3 | ^3.0.0-0 || | MIT | |
| 5.3.2 | ^3.0.0-0 || | MIT | |
| 5.3.1 | ^3.0.0-0 || | MIT | |
| 5.3.0 | ^3.0.0-0 || | MIT | |
| 5.2.0 | ^3.0.0-0 || | MIT | |
| 5.1.0 | ^3.0.0-0 || | MIT | |
| 5.0.1 | ^3.0.0-0 || | MIT | |
| 5.0.0 | ^3.0.0-0 || | MIT | |
| 4.1.2 | ^3.0.0-0 || | MIT | |
| 4.1.1 | ^3.0.0-0 || | MIT | |
| 4.1.0 | ^3.0.0-0 || | MIT | |
| 4.0.7 | ^3.0.0-0 || | MIT | |
| 4.0.6 | ^3.0.0-0 || | MIT | |
| 4.0.5 | ^3.0.0-0 || | MIT | |
| 4.0.4 | ^3.0.0-0 || | MIT | |
| 4.0.3 | ^3.0.0-0 || | MIT | |
| 4.0.2 | ^3.0.0-0 || | MIT | |
| 4.0.1 | ^3.0.0-0 || | MIT | |
| 4.0.0 | ^3.0.0-0 || | MIT | |
| 3.5.1 | 2.5.17 | MIT | |
| 3.5.0 | 2.5.17 | MIT | |
| 3.4.2 | 2.5.17 | MIT | |
| 3.4.1 | 2.5.17 | MIT | |
| 3.4.0 | 2.5.16 | MIT | |
| 3.3.2 | 2.5.16 | MIT | |
| 3.3.1 | 2.5.16 | MIT | |
| 3.3.0 | 2.5.16 | MIT | |
| 3.2.1 | 2.5.2 | MIT | |
| 3.2.0 | 2.5.2 | MIT |
Showing the latest 30 of 85. See every release on npm
Pre-releases (12)
| Version | Released | Vue | License |
|---|---|---|---|
| 3.0.1-rc2 | 2.5.2 | MIT | |
| 3.0.1-rc1 | 2.5.2 | MIT | |
| 3.0.1-rc0 | 2.5.x | MIT | |
| 3.0.0-rc1 | 2.5.2 | MIT | |
| 3.0.0-rc0 | ^2.4.2 | MIT | |
| 2.8.3-rc-01 | ^2.4.2 | MIT | |
| 2.6.0-rc1 | ^2.2.6 | MIT | |
| 2.5.7-rc3 | ^2.2.6 | MIT | |
| 2.5.7-rc2 | ^2.2.6 | MIT | |
| 2.5.7-rc1 | ^2.2.6 | MIT | |
| 2.3.9-rc1 | ^2.2.1 | ||
| 2.0.0-alpha | ^2.0.0-rc.1 |
