Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hoveredOutlierIndex returns -1 every time #17

Closed
SorataYuu opened this issue Feb 17, 2022 · 4 comments
Closed

hoveredOutlierIndex returns -1 every time #17

SorataYuu opened this issue Feb 17, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@SorataYuu
Copy link

When I have a box plot, and mouse over an outlier. The tooltip context returns hoveredOutlierIndex as -1 despite being hovered over an outlier.

I tried to access it using this.

chart_config.options.interaction = {
            mode: 'index'
        };

        chart_config.options.plugins.tooltip.callbacks.footer = (tooltip_items) => {
            console.log(tooltip_items);
        }
@SorataYuu SorataYuu added the bug Something isn't working label Feb 17, 2022
@sgratzl
Copy link
Owner

sgratzl commented Feb 17, 2022

can you provide a sample codepen, please

@SorataYuu
Copy link
Author

I've made a codepen that prints the hoveredOutlierIndex on the tooltip:
https://codepen.io/soratayuu/pen/MWOrNxw

@sgratzl
Copy link
Owner

sgratzl commented Feb 18, 2022

take a look at https://codepen.io/sgratzl/pen/bGYLqWK?editors=0010

I just released v3.7.0 which adapt for chart.js 3.7

@sgratzl sgratzl self-assigned this Feb 18, 2022
@SorataYuu
Copy link
Author

It works great! Thank you! Really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants