Skip to content

Tick labelling overhaul - #136

Merged
akenshaw merged 7 commits into
mainfrom
tick-labelling-overhaul
Aug 10, 2026
Merged

Tick labelling overhaul#136
akenshaw merged 7 commits into
mainfrom
tick-labelling-overhaul

Conversation

@akenshaw

Copy link
Copy Markdown
Member

This PR moves axis/grid math out of the UI layer into a shared, UI-agnostic engine in data::chart::ticks, now used by kline, comparison, heatmap, and indicator chart axes.

Time axis (X):

  • Label spacing is denser, and the grid step adapts more smoothly while
    zooming (the step whose actual spacing lands closest to the target is
    picked, instead of the first one that roughly fits)
  • Day/month/year boundaries are now always shown and highlighted, and are
    thinned to the pixel budget so long ranges stay readable
  • The grid anchors to midnight and stays stable while panning,
    so the set of labels no longer shifts around as the view moves

Price axis (Y):

  • Labels now land exactly on real price rows instead of between them, and
    are computed in exact units (no more f32 rounding drift)
  • Label precision follows the market's minimum tick size

@akenshaw
akenshaw merged commit 12b029c into main Aug 10, 2026
3 checks passed
@akenshaw
akenshaw deleted the tick-labelling-overhaul branch August 10, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant