diff --git a/README.md b/README.md index ff411ce..ae9d360 100644 --- a/README.md +++ b/README.md @@ -79,5 +79,5 @@ Vue.use(require('vue-chartist'), { ``` ## Example -Go to https://vue-chartist-example-ptcwuipkbo.now.sh/ +Go to https://vue-chartist-example-afttqeynkj.now.sh/ Powered by 𝚫 now https://zeit.co/now diff --git a/example/package.json b/example/package.json index 8db7db5..f3587b2 100644 --- a/example/package.json +++ b/example/package.json @@ -1,6 +1,6 @@ { "name": "vue-chartist-example", - "version": "1.0.0", + "version": "1.1.0", "description": "Example for plugin vue-chartist", "main": "server.js", "scripts": { @@ -33,6 +33,6 @@ "browserify": "^13.0.0", "express": "^4.13.3", "vue": "^1.0.21", - "vue-chartist": "^1.0.0" + "vue-chartist": "^1.1.0" } } diff --git a/example/public/build.js b/example/public/build.js index 5b8f873..1d5f1e3 100644 --- a/example/public/build.js +++ b/example/public/build.js @@ -101,13 +101,12 @@ exports.install = function (Vue) { options = Object.assign({}, defaultOptions, options); Vue.component('chartist', { - template: '
{{message}}
', + template: '
{{message}}
', ready: function ready() { this.draw(); }, props: { - idChart: { type: String, required: true }, ratio: { type: String }, data: { type: Object }, options: { type: Object }, @@ -131,14 +130,14 @@ exports.install = function (Vue) { if (this.data) { //data is empty if (this.data.series.length < 1 || this.type !== 'Pie' && this.data.labels.length < 1) { - new Chartist[this.type]('#' + this.idChart, this.data, this.options, this.responsiveOptions); //clear the potential old chart + new Chartist[this.type](this.$els.chart, this.data, this.options, this.responsiveOptions); //clear the potential old chart this.setNoData(); //data is defined } else { this.noData = ''; //remove class ct-nodata this.message = ''; //remove message no data if (this.error.onError) this.error = { onError: false, message: '' }; //clear error - var chart = new Chartist[this.type]('#' + this.idChart, this.data, this.options, this.responsiveOptions); + var chart = new Chartist[this.type](this.$els.chart, this.data, this.options, this.responsiveOptions); if (this.eventHandlers) { var _iteratorNormalCompletion = true; var _didIteratorError = false; diff --git a/package.json b/package.json index 4405bca..acd6556 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-chartist", - "version": "1.0.0", + "version": "1.1.0", "description": "Plugin chartist for vuejs", "main": "index.js", "scripts": {