Set tooltip interaction mode for overtime graphs

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2022-10-22 22:14:23 +02:00
parent 39f23fde76
commit abb5c47b58

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) {