Skip to content

Support sticky left and right axes#29

Merged
Croge32 merged 5 commits into
mainfrom
crogers-sticky-left-and-right-axes
Jun 4, 2026
Merged

Support sticky left and right axes#29
Croge32 merged 5 commits into
mainfrom
crogers-sticky-left-and-right-axes

Conversation

@Croge32

@Croge32 Croge32 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

This PR adds 2 new slots: sticky_left_axis and sticky_right_axis. These when used with a y_axis component within allow a user to specify that an axis should stick to the left or right of the graph.

Usage examples:

<:sticky_left_axis :let={graph}>
  <.y_axis :let={value} ...>{round(value)}°</.y_axis>
</:sticky_left_axis>

<:sticky_right_axis :let={graph}>
  <.y_axis :let={value}  position={:right} ...>{value}</.y_axis>
</:sticky_right_axis>

Screenshot of examples. Note that scrollbar is in the middle of the graph and axes are both visible:
Screenshot 2026-06-04 at 1 25 23 PM

@Croge32 Croge32 force-pushed the crogers-sticky-left-and-right-axes branch from 90ec5ec to 7303256 Compare June 4, 2026 18:27
Comment thread lib/plox.ex Outdated

@ngscheurich ngscheurich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@Croge32 Croge32 enabled auto-merge (squash) June 4, 2026 19:06
@Croge32 Croge32 merged commit 959c926 into main Jun 4, 2026
3 checks passed
@Croge32 Croge32 deleted the crogers-sticky-left-and-right-axes branch June 4, 2026 19:06
@Croge32 Croge32 restored the crogers-sticky-left-and-right-axes branch June 4, 2026 19:10
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.

3 participants