You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,11 +73,11 @@ Vue.component('line-chart', {
73
73
74
74
If you're using Gulp, Browserify or Webpack 1 the entry is `vue-chartjs.js` which is __transpiled__ and __bundled__ UMD Module.
75
75
76
-
However Chart.js is a `peerDependencies` so you have to install it separately. In most projects This way, you can have different versions of Chart.js then in this package.
76
+
However, Chart.js is a `peerDependencies` so you have to install it separately. In most projects This way, you can have different versions of Chart.js then in this package.
77
77
78
78
### Webpack 2
79
79
If you're using Webpack 2 it will automatically use the `jsnext:main` / `module` entry point. Which is `es/index.js`
80
-
It is a __transpiled__ es version of the source. And is not __bundled__ to a module. This way you tree shaking will work. Like in the bundled version, `Chart.js` is a `peerDependencies` and need to be installed.
80
+
It is a __transpiled__ es version of the source. And is not __bundled__ to a module. This way your tree shaking will work. Like in the bundled version, `Chart.js` is a `peerDependencies` and need to be installed.
81
81
82
82
83
83
## How to use
@@ -123,7 +123,7 @@ import CommitChart from 'path/to/component/CommitChart'
123
123
124
124
## Another Example with options
125
125
126
-
You can overwrite the default chart options. Just pass the options object as a second paramenter to the render method
126
+
You can overwrite the default chart options. Just pass the options object as a second parameter to the render method
127
127
128
128
```javascript
129
129
// MonthlyIncome.vue
@@ -158,15 +158,15 @@ export default {
158
158
## Reactivity
159
159
160
160
Chart.js does not update or re-render the chart if new data is passed.
161
-
However you can simply implement this on your own or use one of the two mixins which are included.
161
+
However, you can simply implement this on your own or use one of the two mixins which are included.
162
162
163
163
-`reactiveProp`
164
164
-`reactiveData`
165
165
166
166
Both are included in the `mixins` module.
167
167
168
168
The mixins automatically create `chartData` as a prop or data. And add a watcher. If data has changed, the chart will update.
169
-
However keep in mind the limitations of vue and javascript for mutations on arrays and objects.
169
+
However, keep in mind the limitations of vue and javascript for mutations on arrays and objects.
170
170
**It is important that you pass your options in a local variable named `options`!**
171
171
The reason is that if the mixin re-renders the chart it calls `this.renderChart(this.chartData, this.options`)` so don't pass in the options object directly or it will be ignored.
172
172
@@ -188,7 +188,7 @@ export default {
188
188
```
189
189
190
190
### Mixins module
191
-
The `mixins` module is included in the `VueCharts` module and as a seperate module.
191
+
The `mixins` module is included in the `VueCharts` module and as a separate module.
192
192
Some ways to import them:
193
193
194
194
```javascript
@@ -294,7 +294,7 @@ npm run e2e
294
294
npm test
295
295
```
296
296
297
-
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
297
+
For a detailed explanation of how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
0 commit comments