Skip to content

Commit

Permalink
publish v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Yopadd committed May 5, 2016
1 parent f4270eb commit 5377c8b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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"
}
}
7 changes: 3 additions & 4 deletions example/public/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,12 @@ exports.install = function (Vue) {
options = Object.assign({}, defaultOptions, options);

Vue.component('chartist', {
template: '<div :id="idChart" :class="[ratio, noData]">{{message}}</div>',
template: '<div v-el:chart :class="[ratio, noData]">{{message}}</div>',
ready: function ready() {
this.draw();
},

props: {
idChart: { type: String, required: true },
ratio: { type: String },
data: { type: Object },
options: { type: Object },
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-chartist",
"version": "1.0.0",
"version": "1.1.0",
"description": "Plugin chartist for vuejs",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 5377c8b

Please sign in to comment.