Open Dennayz opened 1 year ago
The current behaviour is the correct behaviour, since you specify the mode as index
it takes the index in the data array, and your data arrays have different lenghts so to get what you want with mode index you need to have all your data arrays be the same length.
The current behaviour is the correct behaviour, since you specify the mode as
index
it takes the index in the data array, and your data arrays have different lenghts so to get what you want with mode index you need to have all your data arrays be the same length.
I see, is there another mode I can use that can help with my situation?
No, afaik there is no build in mode that does what you want so you will need to create your own custom mode to achieve what you want
Expected behavior
I'm trying to make the tooltip group all datasets under the same x axis but it is not working. I am using
interaction: { mode: "index" }
. The expected behaviour is suppose to show the correct datasets for each x axis.Current behavior
It is showing mixed datasets in each of the tooltips, which is incorrect.
Reproducible sample
https://codepen.io/dza48/pen/WNzmymw
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
v3.8.2
Browser name and version
No response
Link to your project
No response