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 logo

vue-chartjs is a wrapper for Chart.js in Vue. You can easily create reuseable chart components.

Supports Chart.js v4.

npm version codecov Build Status Package Quality npm Gitter chat license CDNJS version Known Vulnerabilities Donate ko-fi


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.


supported by Cube

Docs

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

  1. Fork it ( https://github.com/apertureless/vue-chartjs/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

This software is distributed under MIT license.

Buy Me A Coffee

Related Packages

vue-chartjs-typescript

Fork from vue-chartjs with typescript definitions

12,510 5,716
vue-chartjs-reactive

Vue.js wrapper for chart.js for creating beautiful charts.

1,538
@enso-ui/charts

Chart.js wrappers and chart card presenters for Enso UI.

13,850 2
vue3-chart-v2

vue3-chart-v2 is a wrapper for Chart.js in Vue 3. You can easily create reuseabl...

77,787 35
uplot-vue

Vue.js wrapper for uPlot that allows you to work with charts declaratively insid...

29,347 135

Version History

Version Released Vue License
5.3.4 ^3.0.0-0 || ^2.7.0 MIT
5.3.3 ^3.0.0-0 || ^2.7.0 MIT
5.3.2 ^3.0.0-0 || ^2.7.0 MIT
5.3.1 ^3.0.0-0 || ^2.7.0 MIT
5.3.0 ^3.0.0-0 || ^2.7.0 MIT
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