Improve line track Y-axis scale#924
Open
Sajeeth-Wimalasuriyan wants to merge 2 commits into
Open
Conversation
Sajeeth-Wimalasuriyan
commented
Jul 7, 2026
Contributor
Added y axis labels that get generated or removed as graph is adjusted in size.
Add tick marks, a centered middle value, and horizontal grid lines to line tracks. Interior values scale with track height and stay symmetric about the center; interior ticks, labels, and grid lines are hidden on short tracks. Co-authored-by: Cursor <cursoragent@cursor.com>
Sajeeth-Wimalasuriyan
requested review from
amokiche-amd,
drchen-amd and
tomk-amd
as code owners
July 7, 2026 19:02
tomk-amd
reviewed
Jul 13, 2026
Comment on lines
+156
to
+162
| // Grid lines behind the data, matching the meta-area ticks. | ||
| if(m_track_height >= Y_AXIS_LABEL_MIN_TRACK_HEIGHT) | ||
| { | ||
| std::vector<double> grid_ticks; | ||
| GenerateYAxisTicks(content_size.y, grid_ticks); | ||
| const ImU32 grid_color = | ||
| ApplyAlpha(m_settings.GetColor(Colors::kGridColor), Y_AXIS_GRID_LINE_ALPHA); |
Collaborator
There was a problem hiding this comment.
grid_ticks - make this a member m_grid_ticks - so it doesn't have to be re-created each frame...
Then call GenerateYAxisTicks(content_size.y, grid_ticks); only if track size changed..
Collaborator
Collaborator
Cache generated ticks and align the new scale with the timeline grid. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

