fix(text): inline sparklines smooth with the chart Catmull-Rom curve#174
Merged
Conversation
SparklineGeometry densifies the value run with the same uniform Catmull-Rom spline the chart engine draws as native Beziers (12 sub-segments per span - facets stay under half a point at sparkline sizes), for both the area silhouette and the constant-thickness ribbon. Ribbon clamps the band CENTRE into [half, 1-half] before offsetting so spline overshoot at extremes cannot eat the thickness (pinned by the pair-distance test across all smoothed samples). API unchanged - every sparkline call site gets smooth runs automatically. Regenerated chart-showcase and feature-catalog previews. Full gate: 1261 tests, BUILD SUCCESS.
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.
What
The hero sparklines in chart-showcase read as angular segment chains (5 data points across 42 pt → ~10 pt facets).
SparklineGeometrynow densifies the value run with the same uniform Catmull-Rom spline the chart engine draws as native Béziers — 12 sub-segments per span keeps every facet under half a point at sparkline sizes, while inline shapes stay deterministic polygon rings (no new inline machinery).[half, 1−half]before the ±half offsets, so spline overshoot at extremes can't thin the band (caught by the pair-distance assertion across all smoothed samples during development).Verification
SparklineGeometryTestre-pinned: smoothed ring sizes, original data points surviving at span boundaries, constant thickness across all samples, flat-run centring, error contracts.chart-showcase.pdf+feature-catalog.pdfpreviews ("profit" line now reads smooth)../mvnw verify -pl .— 1261 tests, 0 failures, BUILD SUCCESS.