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

tooltips: false does not disable tooltips #8059

Closed
santam85 opened this issue Nov 16, 2020 · 7 comments
Closed

tooltips: false does not disable tooltips #8059

santam85 opened this issue Nov 16, 2020 · 7 comments

Comments

@santam85
Copy link

Expected Behavior

In beta.6, tooltips: false has no effect, need to specify tooltips: {enabled: false}

This is exemplified in chartjs/chartjs-plugin-datalabels#203, in some of the samples.

@LeeLenaleee
Copy link
Collaborator

LeeLenaleee commented Nov 16, 2020

Can you provide a working sample because I tried it in two separate projects of my own (both vue prjects) and in a sample from Chart.js itself. In all projects tooltips: false worked as intended

@santam85
Copy link
Author

santam85 commented Nov 16, 2020

Here you can find the same example present in the chartjs-plugin-datalabels repo:
https://jsfiddle.net/ycm83tj4/1/

@LeeLenaleee
Copy link
Collaborator

I dont know what exactly is going on but for others:
It only happens when you use Chart.defaults.set() and the bug only appears on Arc elements, if you directly put tooltips: false in the options itself it works for all elements

santam85 added a commit to santam85/chartjs-plugin-datalabels that referenced this issue Nov 16, 2020
@kurkle
Copy link
Member

kurkle commented Nov 17, 2020

Ah. in defaults, tooltip is a plugin like legend and title. defaults.tooltips is not currently read at all. defaults.plugins.tooltip is.

options.tooltips still the place for configuration.

I'm not happy with this.

@simonbrunel
Copy link
Member

Is it still a need to keep tooltips under options? What the benefit compared to options.plugin.tooltip?

@santam85
Copy link
Author

@kurkle @simonbrunel happy to take a stab at a PR if you could clarify the desired configuration schema?

@kurkle
Copy link
Member

kurkle commented Nov 30, 2020

Actually closed by #8089, by removing options.tooltips in favor of options.plugins.tooltip.

@kurkle kurkle closed this as completed Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants