vue-chartjs
Advanced tools
Comparing version 2.6.5 to 2.7.0
@@ -66,3 +66,4 @@ 'use strict'; | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
}; | ||
@@ -73,2 +74,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options) { | ||
@@ -79,3 +83,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -86,4 +91,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -66,3 +66,4 @@ 'use strict'; | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
}; | ||
@@ -73,2 +74,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options) { | ||
@@ -80,3 +84,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -87,4 +92,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -48,3 +48,4 @@ 'use strict'; | ||
return { | ||
defaultOptions: {} | ||
defaultOptions: {}, | ||
plugins: [] | ||
}; | ||
@@ -55,2 +56,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options) { | ||
@@ -62,3 +66,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -69,4 +74,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -66,3 +66,4 @@ 'use strict'; | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
}; | ||
@@ -73,2 +74,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options, type) { | ||
@@ -79,3 +83,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -86,4 +91,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -64,3 +64,4 @@ 'use strict'; | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
}; | ||
@@ -71,2 +72,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options) { | ||
@@ -78,3 +82,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -85,4 +90,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -48,3 +48,4 @@ 'use strict'; | ||
return { | ||
defaultOptions: {} | ||
defaultOptions: {}, | ||
plugins: [] | ||
}; | ||
@@ -55,2 +56,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options) { | ||
@@ -62,3 +66,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -69,4 +74,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -48,3 +48,4 @@ 'use strict'; | ||
return { | ||
defaultOptions: {} | ||
defaultOptions: {}, | ||
plugins: [] | ||
}; | ||
@@ -55,2 +56,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options) { | ||
@@ -62,3 +66,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -69,4 +74,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -48,3 +48,4 @@ 'use strict'; | ||
return { | ||
defaultOptions: {} | ||
defaultOptions: {}, | ||
plugins: [] | ||
}; | ||
@@ -55,2 +56,5 @@ }, | ||
methods: { | ||
addPlugin: function addPlugin(plugin) { | ||
this.plugins.push(plugin); | ||
}, | ||
renderChart: function renderChart(data, options) { | ||
@@ -62,3 +66,4 @@ var chartOptions = (0, _options.mergeOptions)(this.defaultOptions, options); | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
}); | ||
@@ -69,4 +74,6 @@ this._chart.generateLegend(); | ||
beforeDestroy: function beforeDestroy() { | ||
this._chart.destroy(); | ||
if (this._chart) { | ||
this._chart.destroy(); | ||
} | ||
} | ||
}); |
@@ -21,4 +21,4 @@ 'use strict'; | ||
mounted: function mounted() { | ||
this.renderChart(this.chartData); | ||
this.renderChart(this.chartData, { responsive: true, maintainAspectRatio: false }); | ||
} | ||
}); |
@@ -63,2 +63,4 @@ 'use strict'; | ||
} | ||
} else { | ||
this.renderChart(this.chartData, this.options); | ||
} | ||
@@ -65,0 +67,0 @@ } |
@@ -62,2 +62,4 @@ 'use strict'; | ||
} | ||
} else { | ||
this.renderChart(this.chartData, this.options); | ||
} | ||
@@ -64,0 +66,0 @@ } |
{ | ||
"name": "vue-chartjs", | ||
"version": "2.6.5", | ||
"version": "2.7.0", | ||
"description": "vue.js wrapper for chart.js", | ||
@@ -5,0 +5,0 @@ "author": "Jakub Juszczak <jakub@posteo.de>", |
@@ -30,3 +30,3 @@ <div align="center"> | ||
After the final release of vue.js 2, you also get the v2 per default if you install vue-chartjs over npm. | ||
After the final release of vue.js 2, you also get the v2 by default if you install vue-chartjs over npm. | ||
No need for the @next tag anymore. If you want the v1 you need to define the version or use the legacy tag. | ||
@@ -153,3 +153,3 @@ If you're looking for v1 check this [branch](https://github.com/apertureless/vue-chartjs/tree/release/1.1.3) | ||
Chart.js does not update or re-render the chart if new data is passed. | ||
However you can simply implement this by your own or use one of the two mixins which are included. | ||
However you can simply implement this on your own or use one of the two mixins which are included. | ||
@@ -252,2 +252,6 @@ - `reactiveProp` | ||
### Scatter | ||
![Scatter](assets/scatter.png) | ||
## Build Setup | ||
@@ -275,3 +279,3 @@ | ||
For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). | ||
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). | ||
@@ -278,0 +282,0 @@ ## Contributing |
@@ -59,3 +59,4 @@ import Vue from 'vue' | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -65,2 +66,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options) { | ||
@@ -72,3 +76,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -80,4 +85,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -59,3 +59,4 @@ import Vue from 'vue' | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -65,2 +66,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options) { | ||
@@ -73,3 +77,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -81,4 +86,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -42,3 +42,4 @@ import Vue from 'vue' | ||
defaultOptions: { | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -48,2 +49,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options) { | ||
@@ -56,3 +60,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -64,4 +69,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -59,3 +59,4 @@ import Vue from 'vue' | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -65,2 +66,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options, type) { | ||
@@ -72,3 +76,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -80,4 +85,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -57,3 +57,4 @@ import Vue from 'vue' | ||
} | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -63,2 +64,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options) { | ||
@@ -71,3 +75,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -79,4 +84,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -42,3 +42,4 @@ import Vue from 'vue' | ||
defaultOptions: { | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -48,2 +49,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options) { | ||
@@ -56,3 +60,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -64,4 +69,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -42,3 +42,4 @@ import Vue from 'vue' | ||
defaultOptions: { | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -48,2 +49,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options) { | ||
@@ -56,3 +60,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -64,4 +69,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -42,3 +42,4 @@ import Vue from 'vue' | ||
defaultOptions: { | ||
} | ||
}, | ||
plugins: [] | ||
} | ||
@@ -48,2 +49,5 @@ }, | ||
methods: { | ||
addPlugin (plugin) { | ||
this.plugins.push(plugin) | ||
}, | ||
renderChart (data, options) { | ||
@@ -56,3 +60,4 @@ let chartOptions = mergeOptions(this.defaultOptions, options) | ||
data: data, | ||
options: chartOptions | ||
options: chartOptions, | ||
plugins: this.plugins | ||
} | ||
@@ -64,4 +69,6 @@ ) | ||
beforeDestroy () { | ||
this._chart.destroy() | ||
if (this._chart) { | ||
this._chart.destroy() | ||
} | ||
} | ||
}) |
@@ -8,4 +8,4 @@ import BarChart from '../BaseCharts/Bar' | ||
mounted () { | ||
this.renderChart(this.chartData) | ||
this.renderChart(this.chartData, {responsive: true, maintainAspectRatio: false}) | ||
} | ||
}) |
@@ -57,2 +57,4 @@ module.exports = { | ||
} | ||
} else { | ||
this.renderChart(this.chartData, this.options) | ||
} | ||
@@ -59,0 +61,0 @@ } |
@@ -57,2 +57,4 @@ module.exports = { | ||
} | ||
} else { | ||
this.renderChart(this.chartData, this.options) | ||
} | ||
@@ -59,0 +61,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5526084
62
52266
289