diff --git a/package.json b/package.json index 05bd669a..00b005bf 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "e2e": "node test/e2e/runner.js", "test": "npm run unit", "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs", - "release": "webpack --progress --hide-modules --config ./build/webpack.release.js && NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js && webpack --progress --hide-modules --config ./build/webpack.release.full.js && NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.full.min.js", + "release": "webpack --progress --hide-modules --config ./build/webpack.release.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js && webpack --progress --hide-modules --config ./build/webpack.release.full.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.full.min.js", "prepublish": "yarn run lint && yarn run test && yarn run build" }, "dependencies": { diff --git a/src/mixins/reactiveData.js b/src/mixins/reactiveData.js index b15b49bc..6b3ccf85 100644 --- a/src/mixins/reactiveData.js +++ b/src/mixins/reactiveData.js @@ -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() diff --git a/src/mixins/reactiveProp.js b/src/mixins/reactiveProp.js index c9da8ff3..e90a27cc 100644 --- a/src/mixins/reactiveProp.js +++ b/src/mixins/reactiveProp.js @@ -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()