Repository navigation
docs(charts): keep straight segments for measured data, stated as a rule - #13371
Open
josephfarina wants to merge 1 commit into
Open
josephfarina wants to merge 1 commit into
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
…ule; the curve option says so [skip ci]
josephfarina
force-pushed
the
josephfarina/chart-straight-lines
branch
from
November 21, 2026 14:46
9594a0f to
3346275
Compare
Contributor
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The curve guidance in Chart's best practices now reads as a Do that leads with the rule, and the curve JSDoc on line() and area() matches the code's straight default; no API, default or behavior changes.
- Before CI can run, push a commit whose message does not contain
[skip ci]: GitHub skips theCIandLintworkflows when a pull request's head commit carries that marker, even after the draft is marked ready. - Optional, here or in a follow-up: the Line story's curve examples still call
monotonethe default (apps/storybook/stories/charts/Line.stories.tsx, lines 119 and 126), and the Chart playground story starts atcurve: 'monotone', which contradicts the new JSDoc.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: docs only, with no record or behavior change — verified: three text-only hunks, and the marks tests pass.
- Claim: the old guidance was a Don't item that opened with passing
curve: 'monotone'— verified at the base. - Claim: the
curvedoc comment, which reaches the type definitions, only said the default is straight — verified at the base; the package build emits declarations. - Claim: agents smooth measured charts with
curve: 'monotone'— motivation only; not checkable from the repository. - Claim: the curve item becomes a Do that states the rule first — verified in
Chart.doc.mjsand in the CLI's best-practices output. - Claim: the
curvedoc comment states the straight default for measured data and that'monotone'and'natural'draw smoothed values — verified in both marks; both curves exist in each curve map. - Claim: the other Do/Don't items are unchanged — verified; the colour item moved one slot with identical text.
- Claim: no changeset, because the charts package is private and not released — verified: the package is private and canary-only, and the changeset check rejects unpublished packages.
- Claim: Prettier is clean on the touched files — verified.
- Claim: the changeset check passes — verified.
- Claim: the scope is Chart in the charts package — verified.
- Claim: the public text carries no internal context — verified.
- Claim: the guidance stays within current records — verified against the consumer-docs audience rule.
- File
packages/charts/src/Chart.doc.mjs— clear. - File
packages/charts/src/marks/area.tsx— clear. - File
packages/charts/src/marks/line.tsx— clear.
josephfarina
marked this pull request as ready for review
November 21, 2026 15:45
josephfarina
requested review from
cixzhang and
imdreamrunner
as code owners
November 21, 2026 15:45
This branch was successfully deployed
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.
Docs only; no record or behavior change.
Why
Agents building a metrics report smooth measured line charts with
curve: 'monotone'. The guidance against it was a Don't item that opened with the action itself ("Passcurve: 'monotone'to line() or area() for measured data."), and thecurveoption's own doc comment, which agents read in the package's type definitions, only said the default is straight.What changes
curve: 'monotone'draws values between the points and reads as decoration.curveoption's doc comment says measured data keeps the straight default, and that'monotone'and'natural'draw smoothed values between the points.Effect on built pages
Three fresh agent-built metrics reports, judged blind in both orders against a hand-written page: no page smooths its line (before, two of six did), and every agent read the new
curvecomment. One of three now beats the hand-written page; the other two lose on things outside charts (cards around every section, a phone table that clips).Testing
check:changesetspasses.Scope
Components: Chart (charts package)
preflight: pass 3346275