From ddb47ff63a923340b1c82465da37decf8ea97e50 Mon Sep 17 00:00:00 2001 From: wxwdesign Date: Sat, 22 Oct 2016 21:17:21 +0800 Subject: [PATCH] add horizontal bar parameter --- src/BaseCharts/Bar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BaseCharts/Bar.js b/src/BaseCharts/Bar.js index 9f3fcb5b..af14b76a 100644 --- a/src/BaseCharts/Bar.js +++ b/src/BaseCharts/Bar.js @@ -49,12 +49,12 @@ export default Vue.extend({ }, methods: { - renderChart (data, options) { + renderChart (data, options, type) { let chartOptions = mergeOptions(this.defaultOptions, options) this._chart = new Chart( this.$refs.canvas.getContext('2d'), { - type: 'bar', + type: type || 'bar', data: data, options: chartOptions }