fix: add offset in pointed mode, change point styles in CChartLineSimple

This commit is contained in:
woothu
2019-04-15 17:13:01 +02:00
parent 4663251573
commit 4c7d2967de
+10 -2
View File
@@ -22,7 +22,6 @@ export default {
type: String,
default: 'transparent'
},
pointHoverBackgroundColor: String,
dataPoints: {
type: Array,
default: () => [10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]
@@ -40,16 +39,25 @@ export default {
data: this.dataPoints,
borderColor: getColor(this.borderColor),
backgroundColor: getColor(this.backgroundColor),
pointHoverBackgroundColor: getColor(this.pointHoverBackgroundColor),
pointBackgroundColor: this.pointBackgroundColor,
pointHoverBackgroundColor: getColor(this.borderColor),
label: this.label
}
]
},
pointBackgroundColor () {
if (this.backgroundColor === 'transparent') {
return '#fff'
} else {
return getColor(this.backgroundColor)
}
},
pointedOptions () {
return {
scales: {
xAxes: [
{
offset: true,
gridLines: {
color: 'transparent',
zeroLineColor: 'transparent'