mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9237fa538f | ||
|
|
82c502cf45 | ||
|
|
676a60a363 | ||
|
|
f60f87c141 | ||
|
|
b7f2bf7db2 | ||
|
|
0e419886b1 | ||
|
|
f95ea49a19 | ||
|
|
1e392091ea | ||
|
|
4bf4f5736c | ||
|
|
703a91dafa | ||
|
|
d68af61dce | ||
|
|
a5b58c3b98 |
@@ -66,7 +66,7 @@ You can use `vue-chartjs` directly in the browser without any build setup. Like
|
||||
|
||||
If you're using Gulp, Browserify or Webpack 1 the entry is `vue-chartjs.js` which is __transpiled__ and __bundled__ UMD Module.
|
||||
|
||||
However Vue.js and Chart.js are `deerDependencies` 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.
|
||||
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.
|
||||
|
||||
### Webpack 2
|
||||
If you're using Webpack 2 it will automatically use the `jsnext:main` / `module` entry point. Which is `es/index.js`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-chartjs",
|
||||
"version": "2.8.1",
|
||||
"version": "2.8.2",
|
||||
"description": "vue.js wrapper for chart.js",
|
||||
"author": "Jakub Juszczak <jakub@posteo.de>",
|
||||
"homepage": "http://vue-chartjs.org",
|
||||
|
||||
@@ -48,7 +48,15 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
|
||||
chart.data.labels = newData.labels
|
||||
if (newData.hasOwnProperty('labels')) {
|
||||
chart.data.labels = newData.labels
|
||||
}
|
||||
if (newData.hasOwnProperty('xLabels')) {
|
||||
chart.data.xLabels = newData.xLabels
|
||||
}
|
||||
if (newData.hasOwnProperty('yLabels')) {
|
||||
chart.data.yLabels = newData.yLabels
|
||||
}
|
||||
chart.update()
|
||||
} else {
|
||||
chart.destroy()
|
||||
|
||||
@@ -48,7 +48,15 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
|
||||
chart.data.labels = newData.labels
|
||||
if (newData.hasOwnProperty('labels')) {
|
||||
chart.data.labels = newData.labels
|
||||
}
|
||||
if (newData.hasOwnProperty('xLabels')) {
|
||||
chart.data.xLabels = newData.xLabels
|
||||
}
|
||||
if (newData.hasOwnProperty('yLabels')) {
|
||||
chart.data.yLabels = newData.yLabels
|
||||
}
|
||||
chart.update()
|
||||
} else {
|
||||
chart.destroy()
|
||||
|
||||
Reference in New Issue
Block a user