Skip to content

Instantly share code, notes, and snippets.

@malgamves
Created May 4, 2019 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malgamves/f390b53cf4449e159e6df414fbe37a84 to your computer and use it in GitHub Desktop.
Save malgamves/f390b53cf4449e159e6df414fbe37a84 to your computer and use it in GitHub Desktop.
Chart.js BarChart Template
// CommitChart.js
import { HorizontalBar, mixins } from 'vue-chartjs'
const { reactiveProp } = mixins
export default {
extends: HorizontalBar,
mixins: [reactiveProp],
props: {
chartData: {
type: Object,
default: null
},
options: {
type: Object,
default: null
}
},
mounted () {
this.renderChart(this.chartData, this.options)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment