Merge pull request #14 from wahaha2012/feature-horizontal-bar

add horizontal bar parameter
This commit is contained in:
Jakub
2016-10-23 19:20:17 +02:00
committed by GitHub

View File

@@ -49,12 +49,12 @@ export default Vue.extend({
}, },
methods: { methods: {
renderChart (data, options) { renderChart (data, options, type) {
let chartOptions = mergeOptions(this.defaultOptions, options) let chartOptions = mergeOptions(this.defaultOptions, options)
this._chart = new Chart( this._chart = new Chart(
this.$refs.canvas.getContext('2d'), { this.$refs.canvas.getContext('2d'), {
type: 'bar', type: type || 'bar',
data: data, data: data,
options: chartOptions options: chartOptions
} }