fix: add offset in pointed mode, change point styles in CChartLineSimple
This commit is contained in:
@@ -22,7 +22,6 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: 'transparent'
|
default: 'transparent'
|
||||||
},
|
},
|
||||||
pointHoverBackgroundColor: String,
|
|
||||||
dataPoints: {
|
dataPoints: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]
|
default: () => [10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]
|
||||||
@@ -40,16 +39,25 @@ export default {
|
|||||||
data: this.dataPoints,
|
data: this.dataPoints,
|
||||||
borderColor: getColor(this.borderColor),
|
borderColor: getColor(this.borderColor),
|
||||||
backgroundColor: getColor(this.backgroundColor),
|
backgroundColor: getColor(this.backgroundColor),
|
||||||
pointHoverBackgroundColor: getColor(this.pointHoverBackgroundColor),
|
pointBackgroundColor: this.pointBackgroundColor,
|
||||||
|
pointHoverBackgroundColor: getColor(this.borderColor),
|
||||||
label: this.label
|
label: this.label
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
pointBackgroundColor () {
|
||||||
|
if (this.backgroundColor === 'transparent') {
|
||||||
|
return '#fff'
|
||||||
|
} else {
|
||||||
|
return getColor(this.backgroundColor)
|
||||||
|
}
|
||||||
|
},
|
||||||
pointedOptions () {
|
pointedOptions () {
|
||||||
return {
|
return {
|
||||||
scales: {
|
scales: {
|
||||||
xAxes: [
|
xAxes: [
|
||||||
{
|
{
|
||||||
|
offset: true,
|
||||||
gridLines: {
|
gridLines: {
|
||||||
color: 'transparent',
|
color: 'transparent',
|
||||||
zeroLineColor: 'transparent'
|
zeroLineColor: 'transparent'
|
||||||
|
|||||||
Reference in New Issue
Block a user