fix: make legend disappear by not declaring plugins twice

This commit is contained in:
Cindy Chang
2024-06-19 10:21:15 +08:00
parent 80529b85fe
commit b10e135fee
3 changed files with 9 additions and 19 deletions

View File

@@ -10,7 +10,7 @@
<button id="logout_btn" class="btn btn-sm btn-neutral mr-2" @click.prevent="logOutButton">
Logout
</button>
<img id="acct_mgmt_button" src="@/assets/icon-head-black.svg" width="32" height="32"
<img v-show="false" id="acct_mgmt_button" src="@/assets/icon-head-black.svg" width="32" height="32"
class="cursor-pointer" @click="onAcctHeadClick"
/>
</div>

View File

@@ -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];

View File

@@ -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]