naver / billboard.js

📊 Re-usable, easy interface JavaScript chart library based on D3.js
https://naver.github.io/billboard.js/
MIT License
5.83k stars 350 forks source link

Tooltips on bar charts do not work in Firefox as of 3.12.3 #3854

Open m-gallesio opened 1 month ago

m-gallesio commented 1 month ago

I am using Firefox 128.0.2 on Windows 10. Tooltips on bar charts do not work with billboard.js >= 3.12.3. They do work correctly in version 3.12.2.

This can be seen in any documentation page (e.g. https://naver.github.io/billboard.js/demo/#Chart.BarChart)

This seems to be a Firefox-specific problem, since they work in Edge 126.0.2592.113.

netil commented 1 month ago

@m-gallesio thanks for the report. I'll go over it.

netil commented 1 month ago

@m-gallesio, tested on :

As you can see from the below screenshot, it works showing tooltip correctly. treemap-chrome

From the billboard.js 3.12.3 release, updated input type(mouse or touch) determination logic which possible the cause of your case. Check if you're using touch enabled devices.

m-gallesio commented 1 month ago

My device is a regular laptop and should not be touch-enabled; I will have to look more into this.

Mathnstein commented 3 weeks ago

I can confirm the issue is that newer firefox and this interaction property are not working together correctly by default. Here is a solution with touch explicitly set to false: interaction: {inputType: {mouse: true, touch: false}},

explicit_touch_false

m-gallesio commented 1 day ago

The relevant commit seems to be this: https://github.com/naver/billboard.js/commit/f6201adc23791ec90135c6b41a485ef1dfb0937f. Its message seems wrong, there IS a difference in conditions in that the old version checked the media queries WITH parentheses while the new version does NOT. I am decently sure parentheses should be included (see MDN as well as this line in the same file).