fix: CChartLineSimple: fix pointHoverBackgroundColor

This commit is contained in:
woothu
2019-08-02 11:44:15 +02:00
parent 67dbabb4d2
commit f9a4949b56
+11 -2
View File
@@ -30,9 +30,18 @@ export default {
type: String, type: String,
default: 'Sales' default: 'Sales'
}, },
pointed: Boolean pointed: Boolean,
pointHoverBackgroundColor: String
}, },
computed: { computed: {
pointHoverColor () {
if (this.pointHoverBackgroundColor) {
return this.pointHoverBackgroundColor
} else if (this.backgroundColor !== 'transparent') {
return this.backgroundColor
}
return this.borderColor
},
defaultDatasets () { defaultDatasets () {
return [ return [
{ {
@@ -40,7 +49,7 @@ export default {
borderColor: getColor(this.borderColor), borderColor: getColor(this.borderColor),
backgroundColor: getColor(this.backgroundColor), backgroundColor: getColor(this.backgroundColor),
pointBackgroundColor: this.pointBackgroundColor, pointBackgroundColor: this.pointBackgroundColor,
pointHoverBackgroundColor: getColor(this.borderColor), pointHoverBackgroundColor: getColor(this.pointHoverColor),
label: this.label label: this.label
} }
] ]