From f9a4949b565f73370d5fe83a474b584fc73cce82 Mon Sep 17 00:00:00 2001 From: woothu <32914662+woothu@users.noreply.github.com> Date: Fri, 2 Aug 2019 11:44:15 +0200 Subject: [PATCH] fix: CChartLineSimple: fix pointHoverBackgroundColor --- src/views/charts/CChartLineSimple.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/charts/CChartLineSimple.vue b/src/views/charts/CChartLineSimple.vue index 735fa825..9ad75aa0 100644 --- a/src/views/charts/CChartLineSimple.vue +++ b/src/views/charts/CChartLineSimple.vue @@ -30,9 +30,18 @@ export default { type: String, default: 'Sales' }, - pointed: Boolean + pointed: Boolean, + pointHoverBackgroundColor: String }, computed: { + pointHoverColor () { + if (this.pointHoverBackgroundColor) { + return this.pointHoverBackgroundColor + } else if (this.backgroundColor !== 'transparent') { + return this.backgroundColor + } + return this.borderColor + }, defaultDatasets () { return [ { @@ -40,7 +49,7 @@ export default { borderColor: getColor(this.borderColor), backgroundColor: getColor(this.backgroundColor), pointBackgroundColor: this.pointBackgroundColor, - pointHoverBackgroundColor: getColor(this.borderColor), + pointHoverBackgroundColor: getColor(this.pointHoverColor), label: this.label } ]