Set tooltip interaction mode for overtime graphs (#2413)

This commit is contained in:
yubiuser
2022-10-23 09:28:50 +02:00
committed by GitHub
2 changed files with 12 additions and 3 deletions

View File

@@ -236,12 +236,15 @@ $(function () {
},
options: {
responsive: true,
interaction: {
mode: "nearest",
axis: "x",
},
plugins: {
tooltip: {
enabled: true,
yAlign: "bottom",
intersect: false,
mode: "x",
itemSort: function (a, b) {
return b.datasetIndex - a.datasetIndex;
},

View File

@@ -864,6 +864,10 @@ $(function () {
options: {
responsive: true,
maintainAspectRatio: false,
interaction: {
mode: "nearest",
axis: "x",
},
plugins: {
legend: {
display: false,
@@ -871,7 +875,6 @@ $(function () {
tooltip: {
enabled: true,
intersect: false,
mode: "x",
yAlign: "bottom",
itemSort: function (a, b) {
return b.datasetIndex - a.datasetIndex;
@@ -972,6 +975,10 @@ $(function () {
options: {
responsive: true,
maintainAspectRatio: false,
interaction: {
mode: "nearest",
axis: "x",
},
plugins: {
legend: {
display: false,
@@ -980,7 +987,6 @@ $(function () {
// Disable the on-canvas tooltip
enabled: false,
intersect: false,
mode: "x",
external: customTooltips,
yAlign: "top",
itemSort: function (a, b) {