mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c24dc84e2f | ||
|
|
d3f7058685 | ||
|
|
6bdda62c62 | ||
|
|
491b2514cd | ||
|
|
819b96b06a | ||
|
|
ada0fab17c |
23
README.md
23
README.md
@@ -176,6 +176,29 @@ export default Line.extend({
|
||||
})
|
||||
```
|
||||
|
||||
## Webpack & Bundling tools
|
||||
There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled.
|
||||
If you're using webpack it is recommended to use this one. Because the bundled umd version has vue.js and chart.js bundled into it.
|
||||
|
||||
However if you have problems o you can import the dist file
|
||||
|
||||
```
|
||||
import VueCharts from 'vue-chartjs/dist/vue-chartjs'
|
||||
// or
|
||||
import { Line } from 'vue-chartjs/dist/vue-chartjs'
|
||||
```
|
||||
|
||||
Or you can set an alias.
|
||||
|
||||
### Browserify
|
||||
|
||||
In order for a browserify user to transpile the code, they would need to install `babelify` and `babel-preset-es2015` and add a .babelrc file in the root of their project with the following code:
|
||||
|
||||
```
|
||||
{
|
||||
"presets": ["es2015"]
|
||||
}
|
||||
```
|
||||
## Available Charts
|
||||
|
||||
### Bar Chart
|
||||
|
||||
@@ -278,3 +278,27 @@ Sometimes you need more control over chart.js. Thats why you can access the char
|
||||
### Bubble
|
||||
|
||||

|
||||
|
||||
## Webpack & Bundling tools
|
||||
There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled.
|
||||
If you're using webpack it is recommended to use this one. Because the bundled umd version has vue.js and chart.js bundled into it.
|
||||
|
||||
However if you have problems o you can import the dist file
|
||||
|
||||
```
|
||||
import VueCharts from 'vue-chartjs/dist/vue-chartjs'
|
||||
// or
|
||||
import { Line } from 'vue-chartjs/dist/vue-chartjs'
|
||||
```
|
||||
|
||||
Or you can set an alias.
|
||||
|
||||
### Browserify
|
||||
|
||||
In order for a browserify user to transpile the code, they would need to install `babelify` and `babel-preset-es2015` and add a .babelrc file in the root of their project with the following code:
|
||||
|
||||
```
|
||||
{
|
||||
"presets": ["es2015"]
|
||||
}
|
||||
```
|
||||
|
||||
40
package.json
40
package.json
@@ -1,12 +1,34 @@
|
||||
{
|
||||
"name": "vue-chartjs",
|
||||
"version": "2.3.9",
|
||||
"version": "2.4.0",
|
||||
"description": "vue.js wrapper for chart.js",
|
||||
"author": "Jakub Juszczak <jakub@nextindex.de>",
|
||||
"author": "Jakub Juszczak <jakub@posteo.de>",
|
||||
"homepage": "http://vue-chartjs.org",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Thorsten Lünborg",
|
||||
"web": "https://github.com/LinusBorg"
|
||||
},
|
||||
{
|
||||
"name": "Juan Carlos Alonso",
|
||||
"web": "https://github.com/jcalonso"
|
||||
}
|
||||
],
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Jakub Juszczak",
|
||||
"email": "jakub@posteo.de",
|
||||
"web": "http://www.jakubjuszczak.de"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com:apertureless/vue-chartjs.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/apertureless/vue-chartjs/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"ChartJs",
|
||||
"Vue",
|
||||
@@ -15,6 +37,7 @@
|
||||
"Charts"
|
||||
],
|
||||
"main": "src/index.js",
|
||||
"unpkg": "dist/vue-chartjs.js",
|
||||
"files": [
|
||||
"src",
|
||||
"dist"
|
||||
@@ -91,5 +114,18 @@
|
||||
"webpack-dev-middleware": "^1.4.0",
|
||||
"webpack-hot-middleware": "^2.6.0",
|
||||
"webpack-merge": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"es2015"
|
||||
]
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"babelify"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user