mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
10
README.md
10
README.md
@@ -4,6 +4,8 @@
|
||||
|
||||
> VueJS wrapper for ChartJs
|
||||
|
||||
# 🚧 VUE 2.0 WIP ⚠
|
||||
|
||||
## Install
|
||||
|
||||
Simply run `npm install vue-chartjs`
|
||||
@@ -26,9 +28,9 @@ Just create your own component.
|
||||
import { Bar } from 'vue-chartjs'
|
||||
|
||||
export default BarChart.extend({
|
||||
ready () {
|
||||
mounted () {
|
||||
// Overwriting base render method with actual data.
|
||||
this.render({
|
||||
this.renderChart({
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
datasets: [
|
||||
{
|
||||
@@ -58,8 +60,8 @@ import { Line } from 'vue-chartjs'
|
||||
|
||||
export default LineChart.extend({
|
||||
props: [data, options],
|
||||
ready () {
|
||||
this.render(this.data, this.options)
|
||||
mounted () {
|
||||
this.renderChart(this.data, this.options)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user