vue-chartjs
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -19,4 +19,5 @@ var path = require('path') | ||
alias: { | ||
'vue': 'vue/dist/vue.js', | ||
'vue': 'vue/dist/vue.common.js', | ||
'src': path.resolve(__dirname, '../src'), | ||
'mixins': path.resolve(__dirname, '../src/mixins'), | ||
'BaseCharts': path.resolve(__dirname, '../src/BaseCharts') | ||
@@ -23,0 +24,0 @@ } |
const webpack = require('webpack') | ||
const base = require('./webpack.base.conf') | ||
const config = require('../config') | ||
var env = process.env.NODE_ENV === 'testing' | ||
? require('../config/test.env') | ||
: config.build.env | ||
@@ -22,5 +25,3 @@ base.entry = { | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"production"' | ||
} | ||
'process.env.NODE_ENV': env | ||
}), | ||
@@ -27,0 +28,0 @@ new webpack.optimize.UglifyJsPlugin({ |
# Change Log | ||
## [v2.2.1](https://github.com/apertureless/vue-chartjs/tree/v2.2.1) (2016-12-07) | ||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.2.0...v2.2.1) | ||
**Merged pull requests:** | ||
- Update README.md [\#16](https://github.com/apertureless/vue-chartjs/pull/16) ([Ag47](https://github.com/Ag47)) | ||
## [v2.2.0](https://github.com/apertureless/vue-chartjs/tree/v2.2.0) (2016-10-24) | ||
@@ -69,2 +76,2 @@ [Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.1.1...v2.2.0) | ||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* | ||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* |
{ | ||
"name": "vue-chartjs", | ||
"version": "2.2.1", | ||
"description": "Vue wrapper for chart.js", | ||
"version": "2.3.0", | ||
"description": "vue.js wrapper for chart.js", | ||
"author": "Jakub Juszczak <jakub@nextindex.de>", | ||
@@ -29,4 +29,4 @@ "repository": { | ||
"babel-runtime": "^6.11.6", | ||
"chart.js": "^2.2.1", | ||
"vue": "^2.0.1" | ||
"chart.js": "^2.4.0", | ||
"vue": "^2.1.6" | ||
}, | ||
@@ -42,4 +42,4 @@ "devDependencies": { | ||
"connect-history-api-fallback": "^1.1.0", | ||
"cross-spawn": "^4.0.2", | ||
"css-loader": "^0.25.0", | ||
"cross-spawn": "^5.0.1", | ||
"css-loader": "^0.26.1", | ||
"eslint": "^3.7.1", | ||
@@ -50,3 +50,3 @@ "eslint-config-standard": "^6.2.0", | ||
"eslint-plugin-html": "^1.3.0", | ||
"eslint-plugin-promise": "^2.0.1", | ||
"eslint-plugin-promise": "^3.4.0", | ||
"eslint-plugin-standard": "^2.0.1", | ||
@@ -60,3 +60,3 @@ "eventsource-polyfill": "^0.9.6", | ||
"http-proxy-middleware": "^0.17.2", | ||
"inject-loader": "^2.0.1", | ||
"inject-loader": "^3.0.0-beta2", | ||
"isparta-loader": "^2.0.0", | ||
@@ -80,3 +80,3 @@ "jasmine-core": "^2.5.2", | ||
"phantomjs-prebuilt": "^2.1.13", | ||
"selenium-server": "^2.53.1", | ||
"selenium-server": "^3.0.1", | ||
"shelljs": "^0.7.4", | ||
@@ -88,3 +88,3 @@ "sinon": "^1.17.3", | ||
"vue-html-loader": "^1.2.3", | ||
"vue-loader": "^9.3.0", | ||
"vue-loader": "^10.0.2", | ||
"vue-style-loader": "^1.0.0", | ||
@@ -94,4 +94,4 @@ "webpack": "^1.13.2", | ||
"webpack-hot-middleware": "^2.6.0", | ||
"webpack-merge": "^0.14.1" | ||
"webpack-merge": "^1.1.1" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # Vue-ChartJs | ||
> VueJS wrapper for ChartJs | ||
Is a vue.js wrapper for chart.js. You can easily create your chart components. [See in action](https://apertureless.github.io/vue-chartjs/) | ||
@@ -104,2 +104,4 @@ ### Compatibility | ||
Both are included in the `mixins` module. | ||
The mixins automatically create `chartData` as a prop or data. And add a watcher. If data has changed, the chart will update. | ||
@@ -109,6 +111,6 @@ | ||
// MonthlyIncome.js | ||
import { Line, reactiveProp } from 'vue-chartjs' | ||
import { Line, mixins } from 'vue-chartjs' | ||
export default Line.extend({ | ||
mixins: [reactiveProp], | ||
mixins: [mixins.reactiveProp], | ||
props: ["chartData", "options"], | ||
@@ -122,2 +124,46 @@ mounted () { | ||
### Mixins module | ||
The `mixins` module is included in the `VueCharts` module and as a seperate module. | ||
Some ways to import them: | ||
```javascript | ||
// Load complete module with all charts | ||
import VueCharts from 'vue-chartjs' | ||
export default VueCharts.Line.extend({ | ||
mixins: [VueCharts.mixins.reactiveProp], | ||
props: ["chartData", "options"], | ||
mounted () { | ||
this.renderChart(this.chartData, this.options) | ||
} | ||
}) | ||
``` | ||
```javascript | ||
// Load speperate modules | ||
import { Line, mixins } from 'vue-chartjs' | ||
export default Line.extend({ | ||
mixins: [mixins.reactiveProp], | ||
props: ["chartData", "options"], | ||
mounted () { | ||
this.renderChart(this.chartData, this.options) | ||
} | ||
}) | ||
``` | ||
```javascript | ||
// Load speperate modules with destructure assign | ||
import { Line, mixins } from 'vue-chartjs' | ||
const { reactiveProp } = mixins | ||
export default Line.extend({ | ||
mixins: [reactiveProp], | ||
props: ["chartData", "options"], | ||
mounted () { | ||
this.renderChart(this.chartData, this.options) | ||
} | ||
}) | ||
``` | ||
## Available Charts | ||
@@ -124,0 +170,0 @@ |
@@ -8,4 +8,3 @@ import Bar from './BaseCharts/Bar' | ||
import Bubble from './BaseCharts/Bubble' | ||
import reactiveProp from './mixins/reactiveProp' | ||
import reactiveData from './mixins/reactiveData' | ||
import mixins from './mixins/index.js' | ||
@@ -20,6 +19,17 @@ const VueCharts = { | ||
Bubble, | ||
reactiveProp, | ||
reactiveData | ||
mixins | ||
} | ||
module.exports = VueCharts | ||
export default VueCharts | ||
export { | ||
VueCharts, | ||
Bar, | ||
Doughnut, | ||
Line, | ||
Pie, | ||
PolarArea, | ||
Radar, | ||
Bubble, | ||
mixins | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8854488
79
5469
230
4
Updatedchart.js@^2.4.0
Updatedvue@^2.1.6