fix: make legend disappear by not declaring plugins twice
This commit is contained in:
@@ -835,6 +835,9 @@ export default {
|
||||
title: function(context) {
|
||||
return `${content.x}: ${getMoment(context[0].parsed.x)}`;
|
||||
},
|
||||
label:function(context) {
|
||||
return `${content.y}: ${getSimpleTimeLabel(context.parsed.y, 2)}`;
|
||||
},
|
||||
},
|
||||
},
|
||||
title: {
|
||||
@@ -908,15 +911,6 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
tooltip: {
|
||||
callbacks:{
|
||||
label:function(context) {
|
||||
return `${content.y}: ${getSimpleTimeLabel(context.parsed.y, 2)}`;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
return [primeVueSetData, primeVueSetOption];
|
||||
|
||||
@@ -814,6 +814,11 @@ export default {
|
||||
title: function(context) {
|
||||
return `${content.x}: ${getMoment(context[0].parsed.x)}`;
|
||||
}
|
||||
//TODO: Not sure which one to apply. callbacks:{
|
||||
// label:function(context) {
|
||||
// return `${content.y}: ${getSimpleTimeLabel(context.parsed.y, 2)}`;
|
||||
// },
|
||||
// },
|
||||
},
|
||||
},
|
||||
title: {
|
||||
@@ -888,15 +893,6 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
tooltip: {
|
||||
callbacks:{
|
||||
label:function(context) {
|
||||
return `${content.y}: ${getSimpleTimeLabel(context.parsed.y, 2)}`;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
return [primeVueSetData, primeVueSetOption]
|
||||
|
||||
Reference in New Issue
Block a user