arp242 / goatcounter

Easy web analytics. No tracking of personal data.
https://www.goatcounter.com
Other
4.54k stars 190 forks source link

[Bug] Gray bars appear on mouse hover when "view by day" is selected #717

Closed brandon-toner closed 7 months ago

brandon-toner commented 9 months ago

Description: Gray bars appear on mouse hover when "view by day" is selected

See attached GIF for example of behaviour. 2024-01-27-1442 03_Screenshot

arp242 commented 9 months ago

Can you tell me which browser you're using, and on which system? Thanks.

brandon-toner commented 9 months ago

Sure thing:

brandon-toner commented 9 months ago

Reproduced in:

arp242 commented 9 months ago

Thanks. Looks like something goes wrong for bar charts with "view by day" selected but just a few days in the date range, so you have very wide bars.

It only breaks if you zoom; at zoom level 0 it's fine. I'm guessing your mac "zooms" automatically with its retina display(?)

Example: https://stats.arp242.net/?hl-period=week&period-start=2024-01-20&period-end=2024-01-27&filter=&daily=on

paularmstrong commented 8 months ago

It only breaks if you zoom; at zoom level 0 it's fine. I'm guessing your mac "zooms" automatically with its retina display(?)

Macs don't zoom on their own.

It looks like it may be likely that the mouseover implementation doesn't take into account the DPR that's initialized in charty when drawing the boxes for hovers: https://github.com/arp242/goatcounter/blob/eb5052663d99d0d4c9d7218eb1394d99de792ff3/public/dashboard.js#L583

arp242 commented 7 months ago

Okay, should be fixed. Let me know if you're still having problems.