goatcounter icon indicating copy to clipboard operation
goatcounter copied to clipboard

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

Open brandon-toner opened this issue 1 year ago • 5 comments

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

brandon-toner avatar Jan 27 '24 18:01 brandon-toner

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

arp242 avatar Jan 27 '24 20:01 arp242

Sure thing:

  • Browser: Chrome Version 121.0.6167.85 (Official Build) (arm64)
  • System: MacOS 14.2 (23C64)

brandon-toner avatar Jan 27 '24 20:01 brandon-toner

Reproduced in:

  • Firefox 122.0 (64-bit)
  • Safari 17.2 (19617.1.17.11.9)

brandon-toner avatar Jan 27 '24 20:01 brandon-toner

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

arp242 avatar Jan 27 '24 20:01 arp242

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

paularmstrong avatar Mar 07 '24 17:03 paularmstrong

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

arp242 avatar Apr 08 '24 17:04 arp242