mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
Merge pull request #166 from dsbert/patch-1
Add support for xLabels and yLabels
This commit is contained in:
@@ -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": {
|
||||
|
||||
@@ -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