0.0.2 • Published 6 months ago

vue3-chartjs-master v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Simple Vue3 wrapper for Chart.js

Install

npm i vue3-chartjs-master

Example

<!-- html -->
<vue-chart ref="allUserChart" :data="data" :type="bar" :options="options"/> 
//import 
import { VueChart }                 from 'vue3-chartjs-master' 

// all properties from Chart.js possible
const data = {
    labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
    datasets: [{
        label: '# of Votes',
        data: [12, 19, 3, 5, 2, 3],
        borderWidth: 1
    }]
}

// all properties from Chart.js possible
const options = {
    scales: {
        y: {
            beginAtZero: true
        }
    }
}

//get canvas Element
const elm = VueChart.value.Element

// get Chart.js instance with all methodes from Chart.js
const inst = VueChart.value.instance
0.0.2

6 months ago

0.0.1

6 months ago