Sessions: fix tooltip modes (#17997)

This commit is contained in:
Michael Geers 2025-01-01 20:38:02 +01:00 • committed by GitHub
parent 2739488a91
commit 413339b1b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 8 additions and 14 deletions

View file

@ -92,8 +92,7 @@ export default {
...commonOptions.plugins,
tooltip: {
...commonOptions.plugins.tooltip,
intersect: false,
mode: "index",
axis: "r",
position: "topBottomCenter",
callbacks: {
title: () => null,

View file

@ -86,9 +86,8 @@ export default {
...commonOptions.plugins,
tooltip: {
...commonOptions.plugins.tooltip,
mode: "index",
axis: "r",
position: "center",
intersect: false,
callbacks: {
label: (tooltipItem) => this.formatValue(tooltipItem.raw || 0),
labelColor: tooltipLabelColor(false),

View file

@ -223,8 +223,7 @@ export default {
...commonOptions.plugins,
tooltip: {
...commonOptions.plugins.tooltip,
mode: "index",
intersect: false,
axis: "x",
positioner: (context) => {
const { chart, tooltipPosition } = context;
const { tooltip } = chart;

View file

@ -102,9 +102,8 @@ export default {
...commonOptions.plugins,
tooltip: {
...commonOptions.plugins.tooltip,
mode: "index",
axis: "r",
position: "center",
intersect: false,
callbacks: {
label: (tooltipItem) => this.formatValue(tooltipItem.raw || 0),
labelColor: tooltipLabelColor(false),

View file

@ -159,8 +159,7 @@ export default {
...commonOptions.plugins,
tooltip: {
...commonOptions.plugins.tooltip,
mode: "index",
intersect: false,
axis: "x",
positioner: (context) => {
const { chart, tooltipPosition } = context;
const { tooltip } = chart;

View file

@ -92,8 +92,7 @@ export default {
...commonOptions.plugins,
tooltip: {
...commonOptions.plugins.tooltip,
intersect: false,
mode: "index",
axis: "r",
position: "topBottomCenter",
callbacks: {
title: () => null,

View file

@ -147,8 +147,6 @@ export default {
...commonOptions.plugins,
tooltip: {
...commonOptions.plugins.tooltip,
intersect: false,
mode: "index",
axis: "xy",
position: "topBottomCenter",
callbacks: {

View file

@ -45,6 +45,8 @@ export const commonOptions = {
boxPadding: 5,
usePointStyle: false,
borderWidth: 0.00001,
mode: "index",
intersect: false,
},
},
};