Skip to content

Commit f9a4949

Browse files
committed
fix: CChartLineSimple: fix pointHoverBackgroundColor
1 parent 67dbabb commit f9a4949

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/views/charts/CChartLineSimple.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,26 @@ export default {
3030
type: String,
3131
default: 'Sales'
3232
},
33-
pointed: Boolean
33+
pointed: Boolean,
34+
pointHoverBackgroundColor: String
3435
},
3536
computed: {
37+
pointHoverColor () {
38+
if (this.pointHoverBackgroundColor) {
39+
return this.pointHoverBackgroundColor
40+
} else if (this.backgroundColor !== 'transparent') {
41+
return this.backgroundColor
42+
}
43+
return this.borderColor
44+
},
3645
defaultDatasets () {
3746
return [
3847
{
3948
data: this.dataPoints,
4049
borderColor: getColor(this.borderColor),
4150
backgroundColor: getColor(this.backgroundColor),
4251
pointBackgroundColor: this.pointBackgroundColor,
43-
pointHoverBackgroundColor: getColor(this.borderColor),
52+
pointHoverBackgroundColor: getColor(this.pointHoverColor),
4453
label: this.label
4554
}
4655
]

0 commit comments

Comments
 (0)