This package is a rewrite of vue-chartjs for Chart.js 3, but written in Typescript with vue-demi and Vue Composition API.
npm i vue-chart-3
#or
yarn add vue-chart-3
#or
pnpm i vue-chart-3
This package works with version 2.x and 3.x of Vue.
- Vue 3 works out-of-the-box
- Vue 2 requires
@vue/composition-api
package to also be installed, to provide Vue 3's Composition API features likeref, defineComponent, computed, reactive
. Vue composition-api plugin will install itself so no need to register it!
- Vue 3: CodeSandbox demo Vue 3
- Vue 2: CodeSandbox demo Vue 2