Skip to content

Commit

Permalink
'更新v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-xin committed Apr 25, 2018
1 parent d9b3aad commit a866be0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# vue-schart

> :bar_chart: Vue.js wrapper for sChart.js
> :bar_chart: Vue.js wrapper for sChart.js
<p>
<a href="https://www.npmjs.com/package/vue-schart"><img src="https://img.shields.io/npm/dm/vue-schart.svg" alt="Downloads"></a>
Expand All @@ -15,6 +14,7 @@ Support for use at the mobile. Support vue.js 1.x & 2.x
[interactive demo](http://blog.gdfengshuo.com/example/#/vue-schart)

## Usage

Install:

```
Expand Down
4 changes: 3 additions & 1 deletion example/src/vue-schart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export default {
data() {
return {
schart: null,
opt: {}
}
},
Expand All @@ -35,6 +36,7 @@
},
methods: {
renderChart(){
this.schart = null;
this.opt = this.options;
if(!this.width || !this.height){
if(!this.opt){
Expand All @@ -43,7 +45,7 @@
this.opt['autoWidth'] = true;
}
}
new sChart(this.canvasId, this.type, this.data, this.opt);
this.schart = new sChart(this.canvasId, this.type, this.data, this.opt);
}
},
watch: {
Expand Down
4 changes: 3 additions & 1 deletion src/vue-schart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export default {
data() {
return {
schart: null,
opt: {}
}
},
Expand All @@ -35,6 +36,7 @@
},
methods: {
renderChart(){
this.schart = null;
this.opt = this.options;
if(!this.width || !this.height){
if(!this.opt){
Expand All @@ -43,7 +45,7 @@
this.opt['autoWidth'] = true;
}
}
new sChart(this.canvasId, this.type, this.data, this.opt);
this.schart = new sChart(this.canvasId, this.type, this.data, this.opt);
}
},
watch: {
Expand Down

0 comments on commit a866be0

Please sign in to comment.