mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 23:10:50 +08:00
c84777d7bf
the x axis division was set to a fixed number of steps rather than picking a neat step size, which created uneven numbers. this pr changes this so an appropriate factor is determined, the x-axis min/max is floor'd/ceil'd to that factor and the divisions are created based on that factor. the cumulative rating line also extends to the new end of the graph. in addition, the bars of the bar chart are now aligned using the left edge of the bar rather than the center. in the after-image, note how the left edge of the bar for 1600 rating aligns with the division. (this is based on the assumption that a rating bucket, say "1500", spans the interval [1500, 1600]. if the bucket spans [1450, 1550] instead, i will revert the change) before <img width="632" height="217" alt="image" src="https://github.com/user-attachments/assets/b7053d43-99bb-4e5b-87a4-dcec37d56b50" /> after <img width="608" height="230" alt="image" src="https://github.com/user-attachments/assets/3f9e4284-f1b1-4bcb-8f70-f75f4e242b19" /> could optimize the while loop into a single mathematical expression, but this is easier to read imo. lmk if you'd prefer the expression instead
c84777d7bf
·
2026-05-11 18:31:26 +09:00
History