Repository navigation
Move the chart legends below the charts on phones (#814) - #824
Merged
Merged
Conversation
This was referenced Nov 11, 2026
seanjonesmc
commented
Nov 11, 2026
|
|
||
| return ( | ||
| <div className="absolute right-6 top-6 rounded border border-gray-200 bg-white p-4 shadow-sm"> | ||
| <div className="mx-4 mb-4 mt-2 rounded border border-gray-200 bg-white p-4 shadow-sm md:absolute md:right-6 md:top-6 md:m-0"> |
Collaborator
Author
There was a problem hiding this comment.
Adjusts the legend position so it sits below the graphs on smaller formats, as the legend on normal format sits on top of the graph content and when the graph shrinks, the legend covers the data. In larger formats, we still render with standard positioning. md:m-0 cancels out the smaller-format margins so there's no shift
|
|
||
| {/* Responsive container to ensure chart resizes */} | ||
| <div className="relative h-[400px] w-full"> | ||
| <div className="relative w-full md:h-[400px]"> |
Collaborator
Author
There was a problem hiding this comment.
Same wrapper changes as previous
|
|
||
| return ( | ||
| <div className="absolute bottom-20 right-6 z-10 rounded border border-gray-200 bg-white p-4 shadow-sm"> | ||
| <div className="mx-4 mb-4 mt-2 rounded border border-gray-200 bg-white p-4 shadow-sm md:absolute md:bottom-20 md:right-6 md:z-10 md:m-0"> |
Collaborator
Author
There was a problem hiding this comment.
Same legend change as above
mxd1760
approved these changes
Nov 18, 2026
mxd1760
left a comment
Collaborator
There was a problem hiding this comment.
This does what it says and makes the smaller graphs readable.
mxd1760
force-pushed
the
fix/814/responsive-chart-legends
branch
5 times, most recently
from
November 25, 2026 00:44
8e8101b to
17321a9
Compare
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mxd1760
force-pushed
the
fix/814/responsive-chart-legends
branch
from
November 25, 2026 00:45
17321a9 to
0c0ffee
Compare
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.
Part 7 of 8 splitting up #814. Based on #823.
Summary
Each chart's legend is a box that floats over the chart. On a phone the box covers most of the plot.
On a phone the legend now sits in a box below its chart, so the whole chart is visible. On a tablet and laptop the legends float in the corner exactly as before. To make room, the chart area no longer has a fixed height on a phone. The chart itself keeps its own height.
Test Plan
Lint, typecheck and format checks pass. Unit tests fail the same way they did before this change.
Screenshots
Next: #825