jeroenheijmans / advent-of-code-charts

Inject charts in your private leaderboard page for Advent of Code
MIT License
120 stars 21 forks source link

Bars that are higher than the canvas are not drawn – but should be, with clipping. #76

Closed tempelmann closed 1 year ago

tempelmann commented 1 year ago

I am using v5.0.0 in Chrome.

I see an issue (see screenshots):

The "minutes taken per star" is missing some bars since day 10, even though the player scores on those days. E.g, mine (blue) should certainly appear in Day 12.

The missing bars are because of the fact that they're exceeding the height of the canvas. In these cases, perhaps you could still draw the bars, but clip them at the top instead of not showing them at all.

Screen Shot 2022-12-12 at 14 25 27

Screen Shot 2022-12-12 at 14 28 23

jeroenheijmans commented 1 year ago

Thx! As I wrote when we e-mailed about this: you're right!

This was originally "by design" but the entire graph is not pulling its weight.

Always showing bars and clipping them would already be a decent quick fix to prevent the worst issue. Perhaps we should go one step further and redesign this graph a bit more, will think about that.

As mentioned in #69 due to personal circumstances I have no option to do big updates this year, but I'll keep it in mind for a next year. Thanks either way for reporting with all the details!

(PS. Looking at your Medals screenshot, you have a tight race for 1st/2nd place going on right there! Go get 'em 😉!)

tempelmann commented 1 year ago

A logarithmic graph may also work (not sure).

Also, do you have any pull with the AoC organizer? It would be great if they'd also record a player's first visit to a new day's page, and return that in the JSON record. This would help us ppl who compete in different time zones, yet to not plan to cheat (!) to have a fairer competition. And of course, your tool would then have a switch to show the relative times instead of the times starting at the fixed time.

(And yes – I would already be leading if I wasn't in Germany: To get the medals I have to get up or stay up until 6am here. My major competitors are in a better time zone. Hence my request for recording the additional start time :)

jeroenheijmans commented 1 year ago

Hah, no, this extension is not affiliated with or explicitly endorsed by the organizer(s). In fact, I try my best to ensure my work causes no extra effort on their part, and try to keep the plugin from being 'polite' in the amount of requests etc.

You're very right that a little bit of extra json would be wonderful for what can be done in an extension like this (as well as others), but I respect the organizer's desire to run a lean and mean operation. Should the extra data ever become available I'd happily use it, but I'm not keen on asking for more than we're already getting for free 😄

("free" as in "by default gratis", if you have the means I recommend you donate to AoC, and I have done so every year)

PS. I feel your pain, to a degree; though me and all my colleagues are in UTC+1, and only some of us get up early for puzzles.

jeroenheijmans commented 1 year ago

Will be fixed via #79 soon.