Scott/chart styles#400
Open
sagrimson wants to merge 9 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces horizontal and vertical bar charts, refactors the line chart to be responsive, and updates card auto-height calculations to handle asynchronous SVG rendering via a MutationObserver. Feedback focuses on optimizing wheel event propagation to prevent layout thrashing, fixing visual misalignment bugs in custom chart cursors, simplifying the auto-height observer architecture to avoid performance issues, and removing hardcoded locales to support internationalization.
PauloMFJ
requested changes
Jul 7, 2026
| thead { | ||
| position: sticky; | ||
| top: 0; | ||
| z-index: 1; |
Contributor
There was a problem hiding this comment.
Let's use:
Suggested change
| z-index: 1; | |
| z-index: $z-index-above-content; |
| <m.div | ||
| key={activeTab.label} | ||
| role="tabpanel" | ||
| className={clsx(s.panel)} |
Contributor
There was a problem hiding this comment.
Suggested change
| className={clsx(s.panel)} | |
| className={s.panel} |
Comment on lines
+16
to
+18
| const BAR_COLOR = `rgb(${COLORS['card-surface-selected']})`; | ||
| const GRID_COLOR = `rgb(${COLORS['card-chart-grid']})`; | ||
| const AXIS_COLOR = `rgb(${COLORS['card-content-muted']})`; |
Contributor
There was a problem hiding this comment.
I reckon all chart colours should probably just be directly tokenized for ease. I.e:
Suggested change
| const BAR_COLOR = `rgb(${COLORS['card-surface-selected']})`; | |
| const GRID_COLOR = `rgb(${COLORS['card-chart-grid']})`; | |
| const AXIS_COLOR = `rgb(${COLORS['card-content-muted']})`; | |
| const BAR_COLOR = `rgb(${COLORS['card-chart-bar']})`; | |
| const GRID_COLOR = `rgb(${COLORS['card-chart-grid']})`; | |
| const AXIS_COLOR = `rgb(${COLORS['card-chart-axis']})`; |
9dbc8ff to
f7150cd
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.
Overview
Adds styled bar chart variants (vertical and horizontal) and line chart improvements to chart cards, replaces hardcoded chart dimensions with responsive containers, and fixes several layout issues around card resizing, table scrolling, and wheel event propagation.
Changes Made
DataChartBarVerticalandDataChartBarHorizontalcomponents using RechartsBarChartwith design token colors, tooltips, compact number formatting, and custom cursors/axis linesDataChartLineto useResponsiveContainerinstead of fixedwidth/heightprops; add tooltip, custom cursor, active dot styling, and full-width axis linebar-vertical,bar-horizontal, andlineeach render the correct chart componentMutationObserveralongside the existingResizeObserverthead, standard (non-compact) number formatting, and bottom marginoverflow-y: auto)