Skip to content

Improve ranked play rating graph's x-axis divisions#37534

Open
IceDynamix wants to merge 5 commits intoppy:masterfrom
IceDynamix:rating-graph-div
Open

Improve ranked play rating graph's x-axis divisions#37534
IceDynamix wants to merge 5 commits intoppy:masterfrom
IceDynamix:rating-graph-div

Conversation

@IceDynamix
Copy link
Copy Markdown

@IceDynamix IceDynamix commented Apr 26, 2026

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
image

after
image

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

@IceDynamix IceDynamix marked this pull request as draft April 26, 2026 02:50
@IceDynamix IceDynamix marked this pull request as ready for review April 26, 2026 14:39
@peppy peppy requested a review from smoogipoo May 7, 2026 05:06
Copy link
Copy Markdown
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have not checked code, but looks better visually

@smoogipoo
Copy link
Copy Markdown
Contributor

smoogipoo commented May 7, 2026

(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)

I think the latter is true, based on the use of Round here:

https://github.com/ppy/osu-server-spectator/blob/a502bd11bc80e49d537d78b4b86427f133fc241f/osu.Server.Spectator/Hubs/Multiplayer/Matchmaking/Queue/MatchmakingLobby.cs#L115-L119

@smoogipoo smoogipoo self-assigned this May 7, 2026
@smoogipoo smoogipoo moved this from Inbox to Pending Review in osu! team task tracker May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Pending Review

Development

Successfully merging this pull request may close these issues.

3 participants