fix(plotting): lane-chart line breaks at lane boundaries (#121); docs: series length + derived variables - #127
Merged
Merged
Conversation
…: series length + derived variables ## Summary - **What:** on a lane chart the connecting line is now its own trace with a gap at each lane boundary, drawn under the markers. Two new user-guide pages. - **Why:** #121 — the last point of one subgroup joined to the first of the next drew a steep "event" at every boundary that was only the sort order. The docs pages state the series-length position (from #114, with the reporter's table and credit) and the derived-variables contract (from #126), neither of which existed anywhere a user would look. - **Scope:** plotting/renderers.py (main-trace block + two helpers); tests/test_lane_connectors.py; docs/user-guide/series-length.md, docs/user-guide/derived-variables.md, docs/myst.yml, key-concepts.md; CHANGELOG. ## Contract / Invariants (must remain true) - Single-series charts and faceted charts: unchanged trace (lines+markers), no extra trace (pinned). - Markers trace keeps name, hovertemplate, customdata, legend, signal highlighting. - x arrays contain no nulls (gaps repeat the boundary x; only y carries None), so test_plotting_xaxis's numeric-x check still holds. - No chart math; validator exit 0. ## Behavior Changes (explicit) - Lane charts: fig.data gains a 'lines' trace named '<chart> (lanes)' (hoverinfo skip, showlegend False) and the markers trace's mode becomes 'markers'. ## Tests - test_lane_connectors: one gap per boundary at the right positions; no drawn segment spans two lanes; markers keep hover, line has none; single-series unchanged; faceted unchanged. ## Manual Verification - pytest tests/: 2426 passed; ruff clean; mypy renderers.py clean; validator exit 0
…rectly (codecov/patch)
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
by=[]), the connecting line is now its own trace with a gap at each lane boundary, drawn under the markers. Plus two user-guide pages.validation/short_series_bands.pyand credit to @rabujamra) and the derived-variables contract from fix(derivations): evaluate/validate never raise; non-finite results are violations; construction validates #126. Neither existed anywhere a user would look.plotting/renderers.py(main-trace block, two helpers);tests/test_lane_connectors.py;docs/user-guide/series-length.md,docs/user-guide/derived-variables.md,docs/myst.yml,docs/getting-started/key-concepts.md; CHANGELOG.Contract / invariants
lines+markerstrace with no extra trace (pinned).validation/e2e_bishop_report.pyexits 0.Behaviour changes
linestrace named<chart> (lanes)(hoverinfo='skip',showlegend=False) and the markers trace's mode becomesmarkers. Visually: the same points, the same limits, and no segment crossing a lane boundary.Methodology
Tests
tests/test_lane_connectors.py:one gap per boundary, at the lane-start positions; point counts unchanged
no drawn segment spans two lanes (lanes 100 apart, segments never jump)
markers keep hover; the line trace has none and no legend entry
single-series chart unchanged; faceted chart unchanged
pytest tests/— 2426 passed, 10 skippedruff check .— cleanmypy processbehavior/plotting/renderers.py— cleanGolden masters untouched
Notes
weco-rules.md,sds-detection.md, the derived-variables tutorial).🤖 Generated with Claude Code
https://claude.ai/code/session_01BKphCi1LC1hjGYteWEK9JV