Skip to content

Commit 0fa8261

Browse files
authored
Merge pull request #215 from cugu/spelling
✏️ Spelling in docs
2 parents 8b52bae + 653b4d7 commit 0fa8261

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

docs/README.md

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ search: en
33
---
44

55
# vue-chartjs
6-
**vue-chartjs** is a wrapper for [Chart.js](https://github.com/chartjs/Chart.js) in vue. You can easily create reuseable chart components.
6+
**vue-chartjs** is a wrapper for [Chart.js](https://github.com/chartjs/Chart.js) in Vue. You can easily create reusable chart components.
77

88
## Introduction
9-
`vue-chartjs` let you use chart.js without much hassle inside vue. It's perfect for people who need simple charts up and running as fast as possible.
9+
`vue-chartjs` lets you use Chart.js without much hassle inside Vue. It's perfect for people who need simple charts up and running as fast as possible.
1010

11-
It abstracts the basic logic but exposes the chart.js object to give you the most possible flexibility.
11+
It abstracts the basic logic but exposes the Chart.js object to give you maximal flexibility.
1212

1313
## Installation
1414
If you are working with Vue.js 2+ simple run:
1515

1616
`yarn add vue-chartjs chart.js`
1717

18-
If you are using vue 1.x please use the `legacy` tag. However the vue 1 version is not maintained anymore.
18+
If you are using vue 1.x please use the `legacy` tag. However the Vue 1 version is not maintained anymore.
1919

2020
`yarn add vue-chartjs@legacy`
2121

2222
## Quick Start
2323

24-
You need to import the base chart and extend it. This gives much more flexibility when working with different data.
25-
You can encapsulate your components and use props to pass data or you can directly imput them inside the component. However this way, your component is not reuseable.
24+
You need to import the base chart and extend it. This gives more flexibility when working with different data.
25+
You can encapsulate your components and use props to pass data or you can input them directly inside the component. However your component is not reusable this way.
2626

2727
You can import the whole package or each module individual.
2828

@@ -38,7 +38,7 @@ export default Bar.extend({
3838
})
3939
```
4040

41-
You can pass the `renderChart()` method, two arguments:
41+
You can pass two arguments to the `renderChart()` method:
4242

4343
- Data object
4444
- Options object
@@ -80,7 +80,7 @@ Here are some exmaples
8080

8181
### Chart with props
8282

83-
You can create the data and options props to pass data to the chart.
83+
You can create data and options props to pass data to the chart.
8484

8585
```javascript
8686
// LineChart.js
@@ -100,7 +100,7 @@ After you add your component you can use it:
100100
<line-chart :data="{your data object}" :options="{your options}"></line-chart>
101101
```
102102

103-
If you want to overwrite the width and height:
103+
If you want to overwrite width and height:
104104

105105
```html
106106
<line-chart
@@ -113,7 +113,7 @@ If you want to overwrite the width and height:
113113
```
114114

115115
<p class="warning">
116-
Please keep in mind, that you have to set `responsive: false` to be able to set a fix `width` and `height`.
116+
Please keep in mind, that you have to set `responsive: false` to be able to set a fixed `width` and `height`.
117117
</p>
118118

119119
### Chart with local data
@@ -142,21 +142,20 @@ export default Bar.extend({
142142
})
143143
```
144144

145-
### Reusebale Components
145+
### Reusable Components
146146

147-
If you want to keep your chart components reuseable, it's the best to add a wrapper to them. This way the chart component is only responsable for the pure data representation and the wrapper component for the logic behind it. There are many different usecases and it is different if you're running a Single Page Application or integrate it in for example laravel.
147+
If you want to keep your chart components reusable, it's the best to add a wrapper to them. This way the chart component is only responsible for the pure data representation and the wrapper component for the logic behind it. There are many different use cases and it is different if you're running a single page application or integrate it in for example laravel.
148148

149149
## Reactive Data
150150

151-
Chart.js does not provide a live update if you change the datasets. However `vue-chartjs` provides two mixins to achive this.
151+
Chart.js does not provide a live update if you change the datasets. However `vue-chartjs` provides two mixins to achieve this.
152152

153153
- `reactiveProp`
154154
- `reactiveData`
155155

156-
Both mixins to actually the same. Most of the time you will use `reactiveProp`. It extends the logic of your chart component and automatically creates a prop names `chartData` and add a `vue watch` on this prop. On data change, it will either call `update()` if only the data inside the datasets has changed or `renderChart()` if new datasets were added.
156+
Both mixins do actually achieve the same. Most of the time you will use `reactiveProp`. It extends the logic of your chart component and automatically creates a prop named `chartData` and adds a `vue watch` on this prop. On data change, it will either call `update()` if only the data inside the datasets has changed or `renderChart()` if new datasets were added.
157157

158-
`reactiveData` simply creates a local chartData variable which is not a prop! And add a watcher.
159-
This is only usefull, if you need single purpose charts and make an API call inside your chart component.
158+
`reactiveData` simply creates a local chartData variable which is not a prop! and adds a watcher. This is only useful, if you need single purpose charts and make an API call inside your chart component.
160159

161160
```javascript
162161
data () {
@@ -242,7 +241,7 @@ export default Line.extend({
242241
```
243242

244243
<p class="warning">
245-
⚠ Attention: If you mutate your data in a parent component and pass it to your child chart component keep in mind the javascript limitiations.
244+
⚠ Attention: If you mutate your data in a parent component and pass it to your child chart component keep the javascript limitations in mind.
246245
More info in this [issue#44](https://github.com/apertureless/vue-chartjs/issues/44)
247246
</p>
248247

@@ -255,11 +254,11 @@ export default Line.extend({
255254

256255
## Chart.js object
257256

258-
Sometimes you need more control over chart.js. Thats why you can access the chart.js instance over `this._chart`
257+
Sometimes you need more control over Chart.js. That's why you can access the Chart.js instance over `this._chart`.
259258

260259
## Inline plugins
261260

262-
In Chart.js you can define global and inline plugins. Global plugins are working without problems with `vue-chartjs` like in the [chart.js docs](http://www.chartjs.org/docs/latest/developers/plugins.html) described.
261+
In Chart.js you can define global and inline plugins. Global plugins are working without problems with `vue-chartjs` like in the [Chart.js docs](http://www.chartjs.org/docs/latest/developers/plugins.html) described.
263262

264263
If you want to add inline plugins, `vue-chartjs` exposes a helper method called `addPlugin()`
265264
You should call `addPlugin()` before the `renderChart()` method.
@@ -281,7 +280,7 @@ mounted () {
281280

282281
### Bar Chart
283282
<p class="tip">
284-
There are two versions of the Bar chart. `{Bar}` and `{HorizontalBar}`
283+
There are two versions of the Bar chart: `{Bar}` and `{HorizontalBar}`
285284
</p>
286285

287286
![Bar](assets/bar.png)
@@ -311,13 +310,13 @@ mounted () {
311310

312311
### Scatter
313312

314-
This chart has a different data structure then the others. Right now the reactive Mixins are not working for this chart type.
313+
This chart has a different data structure then the others. Right now the reactive mixins are not working for this chart type.
315314

316315
![Scatter](assets/scatter.png)
317316

318317

319318
## Explanation of Different Builds
320-
There are three different entry points. It depends on which build setup do you have. The dependencies are bundled or required as a peerDependency.
319+
There are three different entry points. It depends on your build setup. The dependencies are bundled or required as a peerDependency.
321320

322321
- Browser
323322
- Browserify / Webpack 1
@@ -333,22 +332,21 @@ There are three different entry points. It depends on which build setup do you h
333332
| es/index* | peerDependency | peerDependency |
334333

335334
### Browser
336-
You can use `vue-chartjs` directly in the browser without any build setup. Like in this [codepen](https://codepen.io/apertureless/pen/vxWbqB?editors=1010). For this case, please use the `vue-chartjs.full.min.js` which is the minified version. It has Vue.js and Chart.js bundled into it. And bundled to a UMD Module. So you only need that one file.
335+
You can use `vue-chartjs` directly in the browser without any build setup, like in this [codepen](https://codepen.io/apertureless/pen/vxWbqB?editors=1010). In this case, please use the `vue-chartjs.full.min.js` which is the minified version. It has Vue.js and Chart.js bundled into it and is bundled to a UMD module, so you only need that one file.
337336

338337

339338
### Browserify / Webpack 1
340339

341340
If you're using Gulp, Browserify or Webpack 1 the entry is `vue-chartjs.js` which is __transpiled__ and __bundled__ UMD Module.
342341

343-
However Vue.js and Chart.js are `peerDependencies` so you have to install them seperately. In most projects you will have `Vue.js` already installed anyways. This way, you can have different versions of Vue.js and Chart.js then in this package.
342+
However Vue.js and Chart.js are `peerDependencies` so you have to install them separately. In most projects you will have Vue.js already installed anyways. This way, you can have different versions of Vue.js and Chart.js then in this package.
344343

345344
### Webpack 2
346-
If you're using Webpack 2 it will automatically use the `jsnext:main` / `module` entry point. Which is `es/index.js`
347-
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, `Vue.js` and `Chart.js` are `peerDependencies` and need to be installed.
345+
If you're using Webpack 2 it will automatically use the `jsnext:main` / `module` entry point, which is `es/index.js`. 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, Vue.js and Chart.js are `peerDependencies` and need to be installed.
348346

349347
## Resources
350348

351-
You can find here some Resources like tutorials on how to use `vue-chartjs`
349+
You can find here some resources like tutorials on how to use `vue-chartjs`
352350

353351
- [Using vue-chartjs with WordPress](https://medium.com/@apertureless/wordpress-vue-and-chart-js-6b61493e289f)
354352
- [Create stunning Charts with Vue and Chart.js](https://hackernoon.com/creating-stunning-charts-with-vue-js-and-chart-js-28af584adc0a)

0 commit comments

Comments
 (0)