mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84dab8c08c | ||
|
|
c9af2f9629 | ||
|
|
874b674803 | ||
|
|
9a4c18dabe | ||
|
|
e048ca5257 | ||
|
|
c6b358ba65 | ||
|
|
fc7818d56d | ||
|
|
6a82e42c6e | ||
|
|
e441ed286f | ||
|
|
aa76f518cb | ||
|
|
53fb0d80d4 | ||
|
|
f373d47b4c | ||
|
|
97acbcadd5 | ||
|
|
07f4466114 | ||
|
|
14a2c9a4b8 | ||
|
|
00589e7f64 | ||
|
|
7d9d514589 | ||
|
|
e35d21641e | ||
|
|
3e77f40043 | ||
|
|
158f29d5c9 | ||
|
|
b1ca492b33 |
78
CHANGELOG.md
78
CHANGELOG.md
@@ -1,15 +1,65 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## [Unreleased](https://github.com/apertureless/vue-chartjs/tree/HEAD)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.5...HEAD)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- barchart 如何横向显示条形图 [\#37](https://github.com/apertureless/vue-chartjs/issues/37)
|
||||||
|
|
||||||
|
## [v2.3.5](https://github.com/apertureless/vue-chartjs/tree/v2.3.5) (2017-02-14)
|
||||||
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.4...v2.3.5)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Destory chart instance in reactiveMixins on render [\#35](https://github.com/apertureless/vue-chartjs/issues/35)
|
||||||
|
- Rerendering doughtnut chart not working [\#33](https://github.com/apertureless/vue-chartjs/issues/33)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- 🔨 Change reactiveMixins to fix \#35 [\#36](https://github.com/apertureless/vue-chartjs/pull/36) ([apertureless](https://github.com/apertureless))
|
||||||
|
|
||||||
|
## [v2.3.4](https://github.com/apertureless/vue-chartjs/tree/v2.3.4) (2017-02-11)
|
||||||
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.3...v2.3.4)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Update Chart.js docs to include link to vue-chartjs [\#32](https://github.com/apertureless/vue-chartjs/issues/32)
|
||||||
|
- Compatibility with Vue 2.1.10 [\#30](https://github.com/apertureless/vue-chartjs/issues/30)
|
||||||
|
|
||||||
|
## [v2.3.3](https://github.com/apertureless/vue-chartjs/tree/v2.3.3) (2017-01-19)
|
||||||
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.2...v2.3.3)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- How to create mixed chart types [\#29](https://github.com/apertureless/vue-chartjs/issues/29)
|
||||||
|
- hello a q about reactivity [\#28](https://github.com/apertureless/vue-chartjs/issues/28)
|
||||||
|
- chart do not render after build [\#26](https://github.com/apertureless/vue-chartjs/issues/26)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- 🐛 Fix \#30 type error [\#31](https://github.com/apertureless/vue-chartjs/pull/31) ([apertureless](https://github.com/apertureless))
|
||||||
|
|
||||||
|
## [v2.3.2](https://github.com/apertureless/vue-chartjs/tree/v2.3.2) (2016-12-23)
|
||||||
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.1...v2.3.2)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Content Security Policy [\#22](https://github.com/apertureless/vue-chartjs/issues/22)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- ✨ Add minimal release webpack config [\#27](https://github.com/apertureless/vue-chartjs/pull/27) ([apertureless](https://github.com/apertureless))
|
||||||
|
- 📝 Update README [\#25](https://github.com/apertureless/vue-chartjs/pull/25) ([apertureless](https://github.com/apertureless))
|
||||||
|
|
||||||
## [v2.3.1](https://github.com/apertureless/vue-chartjs/tree/v2.3.1) (2016-12-20)
|
## [v2.3.1](https://github.com/apertureless/vue-chartjs/tree/v2.3.1) (2016-12-20)
|
||||||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.0...v2.3.1)
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.0...v2.3.1)
|
||||||
|
|
||||||
**Fixed bugs:**
|
|
||||||
|
|
||||||
- Issues after using gulp-- production [\#19](https://github.com/apertureless/vue-chartjs/issues/19)
|
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
- Error in rendering [\#21](https://github.com/apertureless/vue-chartjs/issues/21)
|
- Error in rendering [\#21](https://github.com/apertureless/vue-chartjs/issues/21)
|
||||||
|
- Issues after using gulp-- production [\#19](https://github.com/apertureless/vue-chartjs/issues/19)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -26,8 +76,9 @@
|
|||||||
## [v2.2.1](https://github.com/apertureless/vue-chartjs/tree/v2.2.1) (2016-12-07)
|
## [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)
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.2.0...v2.2.1)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Chart height definition inside the component [\#18](https://github.com/apertureless/vue-chartjs/issues/18)
|
||||||
- Uncaught TypeError: Cannot read property 'draw' of null [\#15](https://github.com/apertureless/vue-chartjs/issues/15)
|
- Uncaught TypeError: Cannot read property 'draw' of null [\#15](https://github.com/apertureless/vue-chartjs/issues/15)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
@@ -39,6 +90,7 @@
|
|||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
|
- The page is blank? [\#13](https://github.com/apertureless/vue-chartjs/issues/13)
|
||||||
- question:syntax with vue-loader [\#12](https://github.com/apertureless/vue-chartjs/issues/12)
|
- question:syntax with vue-loader [\#12](https://github.com/apertureless/vue-chartjs/issues/12)
|
||||||
- Rerender when data has changed [\#10](https://github.com/apertureless/vue-chartjs/issues/10)
|
- Rerender when data has changed [\#10](https://github.com/apertureless/vue-chartjs/issues/10)
|
||||||
|
|
||||||
@@ -56,13 +108,10 @@
|
|||||||
## [v1.1.3](https://github.com/apertureless/vue-chartjs/tree/v1.1.3) (2016-09-08)
|
## [v1.1.3](https://github.com/apertureless/vue-chartjs/tree/v1.1.3) (2016-09-08)
|
||||||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.1.2...v1.1.3)
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.1.2...v1.1.3)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Closed issues:**
|
||||||
|
|
||||||
- Add test [\#1](https://github.com/apertureless/vue-chartjs/issues/1)
|
|
||||||
|
|
||||||
**Fixed bugs:**
|
|
||||||
|
|
||||||
- Passing chart size \(width / height\) as prop doesnt resize the chart [\#8](https://github.com/apertureless/vue-chartjs/issues/8)
|
- Passing chart size \(width / height\) as prop doesnt resize the chart [\#8](https://github.com/apertureless/vue-chartjs/issues/8)
|
||||||
|
- Add test [\#1](https://github.com/apertureless/vue-chartjs/issues/1)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -71,7 +120,7 @@
|
|||||||
## [1.1.2](https://github.com/apertureless/vue-chartjs/tree/1.1.2) (2016-09-07)
|
## [1.1.2](https://github.com/apertureless/vue-chartjs/tree/1.1.2) (2016-09-07)
|
||||||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.1.1...1.1.2)
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.1.1...1.1.2)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Closed issues:**
|
||||||
|
|
||||||
- Change name of the render method to ensure compatiblity with Vue 2.0 [\#4](https://github.com/apertureless/vue-chartjs/issues/4)
|
- Change name of the render method to ensure compatiblity with Vue 2.0 [\#4](https://github.com/apertureless/vue-chartjs/issues/4)
|
||||||
|
|
||||||
@@ -81,7 +130,7 @@
|
|||||||
## [1.1.0](https://github.com/apertureless/vue-chartjs/tree/1.1.0) (2016-08-21)
|
## [1.1.0](https://github.com/apertureless/vue-chartjs/tree/1.1.0) (2016-08-21)
|
||||||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.0.3...1.1.0)
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.0.3...1.1.0)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Closed issues:**
|
||||||
|
|
||||||
- Use Vue.util.mergeOptions to merge default options with user's options [\#5](https://github.com/apertureless/vue-chartjs/issues/5)
|
- Use Vue.util.mergeOptions to merge default options with user's options [\#5](https://github.com/apertureless/vue-chartjs/issues/5)
|
||||||
|
|
||||||
@@ -92,9 +141,12 @@
|
|||||||
## [1.0.3](https://github.com/apertureless/vue-chartjs/tree/1.0.3) (2016-08-20)
|
## [1.0.3](https://github.com/apertureless/vue-chartjs/tree/1.0.3) (2016-08-20)
|
||||||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.0.2...1.0.3)
|
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/1.0.2...1.0.3)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Closed issues:**
|
||||||
|
|
||||||
- Publish on NPM [\#2](https://github.com/apertureless/vue-chartjs/issues/2)
|
- Publish on NPM [\#2](https://github.com/apertureless/vue-chartjs/issues/2)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Properly destroy chartjs objects [\#3](https://github.com/apertureless/vue-chartjs/pull/3) ([LinusBorg](https://github.com/LinusBorg))
|
- Properly destroy chartjs objects [\#3](https://github.com/apertureless/vue-chartjs/pull/3) ([LinusBorg](https://github.com/LinusBorg))
|
||||||
|
|
||||||
## [1.0.2](https://github.com/apertureless/vue-chartjs/tree/1.0.2) (2016-07-27)
|
## [1.0.2](https://github.com/apertureless/vue-chartjs/tree/1.0.2) (2016-07-27)
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -1,8 +1,17 @@
|
|||||||
# Vue-ChartJs
|
<div align="center">
|
||||||
|
<img width="256" heigth="256" src="/assets/vue-chartjs.png" alt="vue-chartjs logo">
|
||||||
|
</div>
|
||||||
|
|
||||||
[](https://badge.fury.io/js/vue-chartjs)  [](https://codecov.io/gh/apertureless/vue-chartjs) [](https://travis-ci.org/apertureless/vue-chartjs) [](http://packagequality.com/#?package=vue-chartjs) [](https://github.com/apertureless/vue-chartjs/blob/master/LICENSE.txt)
|
[](https://badge.fury.io/js/vue-chartjs)
|
||||||
|
[](https://codecov.io/gh/apertureless/vue-chartjs)
|
||||||
|
[](https://travis-ci.org/apertureless/vue-chartjs)
|
||||||
|
[](http://packagequality.com/#?package=vue-chartjs)
|
||||||
|
[](https://www.npmjs.com/package/vue-chartjs)
|
||||||
|
[](https://github.com/apertureless/vue-chartjs/blob/master/LICENSE.txt)
|
||||||
|
|
||||||
Is a vue.js wrapper for chart.js. You can easily create your chart components.
|
# vue-chartjs
|
||||||
|
|
||||||
|
**vue-chartjs** is a wrapper for [Chart.js](https://github.com/chartjs/Chart.js) in vue. You can easily create reuseable chart components.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
@@ -10,13 +19,13 @@ Is a vue.js wrapper for chart.js. You can easily create your chart components.
|
|||||||
|
|
||||||
### Compatibility
|
### Compatibility
|
||||||
|
|
||||||
- v1 later
|
- v1 later `@legacy`
|
||||||
- Vue.js 1.x
|
- Vue.js 1.x
|
||||||
- v2 later
|
- v2 later
|
||||||
- Vue.js 2.x
|
- Vue.js 2.x
|
||||||
|
|
||||||
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 per 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.
|
No need for the @next tag anymore. If you want the v1 you need to define the version or use the legacy tag.
|
||||||
If you're looking for v1 check this [branch](https://github.com/apertureless/vue-chartjs/tree/release/1.1.3)
|
If you're looking for v1 check this [branch](https://github.com/apertureless/vue-chartjs/tree/release/1.1.3)
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|||||||
BIN
assets/vue-chartjs.png
Normal file
BIN
assets/vue-chartjs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
1
assets/vue-chartjs.svg
Normal file
1
assets/vue-chartjs.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256"><defs><linearGradient id="a" x1="100%" x2="0%" y1="4.18%" y2="65.116%"><stop stop-color="#FAFAFA" offset="0%"/><stop stop-color="#D9D9D9" offset="100%"/></linearGradient><linearGradient id="b" x1="108.208%" x2="5.433%" y1="12.265%" y2="86.92%"><stop stop-color="#FAFAFA" offset="0%"/><stop stop-color="#D9D9D9" offset="100%"/></linearGradient></defs><g fill="none"><path fill="#fff" stroke="#EBEBEB" stroke-width="8.456" d="M128.744 13l99.745 57.46v114.921l-99.745 57.46-99.744-57.46v-114.921z"/><path fill="url(#a)" d="M129 17.941l90.395 51.432-4.057 117.675-86.903 4.653z"/><path fill="url(#b)" d="M129 17.814l-90.961 51.559-3.191 113.538 93.587 8.79z"/><path fill="#41B883" d="M32.955 72.755l95.789 54.681v110.49l-95.789-54.681z"/><path fill="#35495E" d="M224.48 71.627l-95.789 55.809v110.49l95.789-54.681z"/><path fill="#596F85" d="M224.48 71.627l-95.789 55.809v-7.892l88.445-51.299z"/><path fill="#61D09F" d="M32.955 72.755l95.789 54.681v-7.892l-89.575-50.171z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
7586
dist/vue-chartjs.js
vendored
7586
dist/vue-chartjs.js
vendored
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-chartjs",
|
"name": "vue-chartjs",
|
||||||
"version": "2.3.2",
|
"version": "2.3.6",
|
||||||
"description": "vue.js wrapper for chart.js",
|
"description": "vue.js wrapper for chart.js",
|
||||||
"author": "Jakub Juszczak <jakub@nextindex.de>",
|
"author": "Jakub Juszczak <jakub@nextindex.de>",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-runtime": "^6.11.6",
|
"babel-runtime": "^6.11.6",
|
||||||
"chart.js": "^2.4.0",
|
"chart.js": "^2.5.0",
|
||||||
"vue": "^2.1.6"
|
"vue": "^2.1.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.10.4",
|
"babel-core": "^6.10.4",
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-spec-reporter": "0.0.26",
|
"karma-spec-reporter": "0.0.26",
|
||||||
"karma-webpack": "^1.7.0",
|
"karma-webpack": "^1.7.0",
|
||||||
"lodash": "^4.16.3",
|
"lodash": "^4.17.4",
|
||||||
"lolex": "^1.4.0",
|
"lolex": "^1.4.0",
|
||||||
"mocha": "^3.1.0",
|
"mocha": "^3.1.0",
|
||||||
"nightwatch": "^0.9.8",
|
"nightwatch": "^0.9.8",
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
"vue-html-loader": "^1.2.3",
|
"vue-html-loader": "^1.2.3",
|
||||||
"vue-loader": "^10.0.2",
|
"vue-loader": "^10.0.2",
|
||||||
"vue-style-loader": "^1.0.0",
|
"vue-style-loader": "^1.0.0",
|
||||||
"vue-template-compiler": "^2.1.6",
|
"vue-template-compiler": "^2.1.10",
|
||||||
"webpack": "^1.13.2",
|
"webpack": "^1.13.2",
|
||||||
"webpack-dev-middleware": "^1.4.0",
|
"webpack-dev-middleware": "^1.4.0",
|
||||||
"webpack-hot-middleware": "^2.6.0",
|
"webpack-hot-middleware": "^2.6.0",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import BarChart from '../BaseCharts/Bar'
|
import BarChart from '../BaseCharts/Bar'
|
||||||
import reactiveData from '../mixins/reactiveProp'
|
import reactiveProp from '../mixins/reactiveProp'
|
||||||
|
|
||||||
export default BarChart.extend({
|
export default BarChart.extend({
|
||||||
mixins: [reactiveData],
|
mixins: [reactiveProp],
|
||||||
|
|
||||||
mounted () {
|
mounted () {
|
||||||
this.renderChart(this.chartData)
|
this.renderChart(this.chartData)
|
||||||
|
|||||||
@@ -10,35 +10,33 @@ module.exports = {
|
|||||||
if (oldData) {
|
if (oldData) {
|
||||||
let chart = this._chart
|
let chart = this._chart
|
||||||
|
|
||||||
let newDataLabels = newData.datasets.map((dataset) => {
|
// Get new and old DataSet Labels
|
||||||
|
let newDatasetLabels = newData.datasets.map((dataset) => {
|
||||||
return dataset.label
|
return dataset.label
|
||||||
})
|
})
|
||||||
|
|
||||||
let oldDataLabels = oldData.datasets.map((dataset) => {
|
let oldDatasetLabels = oldData.datasets.map((dataset) => {
|
||||||
return dataset.label
|
return dataset.label
|
||||||
})
|
})
|
||||||
|
|
||||||
if (JSON.stringify(newDataLabels) === JSON.stringify(oldDataLabels)) {
|
// Stringify 'em for easier compare
|
||||||
this.forceUpdate(newData, chart)
|
const oldLabels = JSON.stringify(oldDatasetLabels)
|
||||||
|
const newLabels = JSON.stringify(newDatasetLabels)
|
||||||
|
|
||||||
|
// Check if Labels are equal and if dataset length is equal
|
||||||
|
if (newLabels === oldLabels && oldData.datasets.length === newData.datasets.length) {
|
||||||
|
newData.datasets.forEach((dataset, i) => {
|
||||||
|
chart.data.datasets[i] = dataset
|
||||||
|
})
|
||||||
|
|
||||||
|
chart.data.labels = newData.labels
|
||||||
|
chart.update()
|
||||||
} else {
|
} else {
|
||||||
this.forceRender()
|
chart.destroy()
|
||||||
|
this.renderChart(this.chartData, this.options)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
forceUpdate (newData, chart) {
|
|
||||||
newData.datasets.forEach((dataset, i) => {
|
|
||||||
chart.data.datasets[i].data = dataset.data
|
|
||||||
})
|
|
||||||
|
|
||||||
chart.data.labels = newData.labels
|
|
||||||
chart.update()
|
|
||||||
},
|
|
||||||
|
|
||||||
forceRender () {
|
|
||||||
this.renderChart(this.chartData, this.options)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,21 +11,29 @@ module.exports = {
|
|||||||
if (oldData) {
|
if (oldData) {
|
||||||
let chart = this._chart
|
let chart = this._chart
|
||||||
|
|
||||||
let newDataLabels = newData.datasets.map((dataset) => {
|
// Get new and old DataSet Labels
|
||||||
|
let newDatasetLabels = newData.datasets.map((dataset) => {
|
||||||
return dataset.label
|
return dataset.label
|
||||||
})
|
})
|
||||||
|
|
||||||
let oldDataLabels = oldData.datasets.map((dataset) => {
|
let oldDatasetLabels = oldData.datasets.map((dataset) => {
|
||||||
return dataset.label
|
return dataset.label
|
||||||
})
|
})
|
||||||
|
|
||||||
if (JSON.stringify(newDataLabels) === JSON.stringify(oldDataLabels)) {
|
// Stringify 'em for easier compare
|
||||||
|
const oldLabels = JSON.stringify(oldDatasetLabels)
|
||||||
|
const newLabels = JSON.stringify(newDatasetLabels)
|
||||||
|
|
||||||
|
// Check if Labels are equal and if dataset length is equal
|
||||||
|
if (newLabels === oldLabels && oldData.datasets.length === newData.datasets.length) {
|
||||||
newData.datasets.forEach((dataset, i) => {
|
newData.datasets.forEach((dataset, i) => {
|
||||||
chart.data.datasets[i].data = dataset.data
|
chart.data.datasets[i] = dataset
|
||||||
})
|
})
|
||||||
|
|
||||||
chart.data.labels = newData.labels
|
chart.data.labels = newData.labels
|
||||||
chart.update()
|
chart.update()
|
||||||
} else {
|
} else {
|
||||||
|
chart.destroy()
|
||||||
this.renderChart(this.chartData, this.options)
|
this.renderChart(this.chartData, this.options)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
24
yarn.lock
24
yarn.lock
@@ -1066,9 +1066,9 @@ change-case@3.0.x:
|
|||||||
upper-case "^1.1.1"
|
upper-case "^1.1.1"
|
||||||
upper-case-first "^1.1.0"
|
upper-case-first "^1.1.0"
|
||||||
|
|
||||||
chart.js@^2.4.0:
|
chart.js@^2.5.0:
|
||||||
version "2.4.0"
|
version "2.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.4.0.tgz#44198073f0f43e5e16662e108420d92652a3c9a3"
|
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.5.0.tgz#fe6e751a893769f56e72bee5ad91207e1c592957"
|
||||||
dependencies:
|
dependencies:
|
||||||
chartjs-color "^2.0.0"
|
chartjs-color "^2.0.0"
|
||||||
moment "^2.10.6"
|
moment "^2.10.6"
|
||||||
@@ -3382,9 +3382,9 @@ lodash@^3.8.0:
|
|||||||
version "3.10.1"
|
version "3.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
|
||||||
|
|
||||||
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.16.3, lodash@^4.16.4, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0:
|
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.16.4, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0:
|
||||||
version "4.17.2"
|
version "4.17.4"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
||||||
|
|
||||||
log-symbols@^1.0.2:
|
log-symbols@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
@@ -5505,9 +5505,9 @@ vue-style-loader@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
loader-utils "^0.2.7"
|
loader-utils "^0.2.7"
|
||||||
|
|
||||||
vue-template-compiler@^2.1.6:
|
vue-template-compiler@^2.1.10:
|
||||||
version "2.1.6"
|
version "2.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.1.6.tgz#f96f968652fc1e861bb0052f61993ba1fdc18ad3"
|
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.1.10.tgz#cb89643adc395e97435585522e43d0a9b1913257"
|
||||||
dependencies:
|
dependencies:
|
||||||
de-indent "^1.0.2"
|
de-indent "^1.0.2"
|
||||||
he "^1.1.0"
|
he "^1.1.0"
|
||||||
@@ -5516,9 +5516,9 @@ vue-template-es2015-compiler@^1.2.2:
|
|||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.4.0.tgz#7b88853ca4bf8d84ae54ab9e56771de271e60198"
|
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.4.0.tgz#7b88853ca4bf8d84ae54ab9e56771de271e60198"
|
||||||
|
|
||||||
vue@^2.1.6:
|
vue@^2.1.10:
|
||||||
version "2.1.6"
|
version "2.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/vue/-/vue-2.1.6.tgz#2fc0024c07479ac6bc7d34a2cd5ef9ca5e90b143"
|
resolved "https://registry.yarnpkg.com/vue/-/vue-2.1.10.tgz#c9235ca48c7925137be5807832ac4e3ac180427b"
|
||||||
|
|
||||||
watchpack@^0.2.1:
|
watchpack@^0.2.1:
|
||||||
version "0.2.9"
|
version "0.2.9"
|
||||||
|
|||||||
Reference in New Issue
Block a user