feat(charts): add line chart - #2161
Draft
rodorgas wants to merge 2 commits into
Draft
Conversation
The second of three chart components. It composes the shared internals extracted in the previous refactor — series aggregation, legend/grid/ axis/tooltip builders, and localized messages — so it carries no duplicated mapping logic. Same public shape as BarChart: a designed, constrained API with the Options/Props pair, forwardRef, accessible name/description, loading and empty states, maxSeries aggregation, and tooltip deltas. Line-specific: an axis-trigger tooltip with a line guide + marker (per the tooltip design notes), and gaps for null values (the engine default connectNulls: false) rather than silent interpolation. No direction or grouping: line charts are category-on-x, and stacking is the area chart's job (stage 3). @status experimental, pending the line-chart Figma scope freeze and designer sign-off (SC-001).
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A boolean prop that swaps straight segments for smooth curves. Off by default: straight segments read exact values more precisely, smooth curves suit trend-forward narratives. Threaded through buildLineOption to each line series' engine `smooth` flag.
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.
Summary
The second of three chart components. It composes the shared internals extracted in #2160 — series aggregation, legend/grid/axis/tooltip builders, and localized messages — so it carries no duplicated mapping logic.
Same public shape as
BarChart: a designed, constrained API with the Options/Props pair,forwardRef, accessible name/description, loading and empty states,maxSeriesaggregation, and tooltip deltas. Line-specific: an axis-trigger tooltip with a line guide + marker (per the tooltip design notes), and gaps fornullvalues (the engine defaultconnectNulls: false) rather than silent interpolation. No direction or grouping: line charts are category-on-x, and stacking is the area chart's job (stage 3).Verification: 118 tests pass (100 from the refactor + 18 new),
tsc --noEmitclean,biome checkclean, full build succeeds.Remaining gate (SC-001): pending the line-chart Figma scope freeze (
design-notes/line-chart.md) and designer sign-off on the Chromatic-published Storybook. Built against the tooltip behavior intooltip.mdand reasonable defaults (guide-line color from--sl-color-gray-3, ECharts-default per-point symbols); both are one-line follow-ups once the designer confirms.Session cost