feat: SDA-810 Adds customizability to Chromatograms#79
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add \`color?: string\` to PeakAnnotation. When set it overrides the series-derived color for the annotation label, arrow, border, and boundary markers. Series-color remains the default when omitted, so existing consumers are unaffected. Motivated by the SST data app's pass/fail (green/red/grey) peak coloring, which today is implemented as a custom Plotly overlay. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add PeakAnnotation.regionOverlay (with optional regionOverlayWidth) to paint a thickened colored segment along the underlying trace between the peak's startX and endX. Honors peak.color from the per-peak color override; falls back to the series color. This is the first-class equivalent of the ad-hoc Plotly overlay used by the SST runner's ChromatogramPanel, which marks integrated regions green/red/grey by pass/fail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add stackingOrder ("first-on-bottom" | "first-on-top", default
"first-on-bottom") to control which end of the stack series[0] lands
on. Annotations and numeric-yAnchor range annotations follow the
chosen direction so they stay pinned to their trace.
The default preserves existing behavior. The new "first-on-top"
direction matches the convention used by the SST Injection-Viewer
panel and lets consumers keep annotations in source order.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
blee-tetrascience
left a comment
There was a problem hiding this comment.
Requesting changes for Zephyr metadata and lint policy. The diff adds concrete Zephyr IDs, and I do not see a sync action commit on this branch. Please clear the added IDs to empty strings and let the sync action fill them.
| // fields don't change — consumers should memoize selectionAppearance if needed). | ||
| const resolvedAppearance = useMemo( | ||
| () => resolveSelectionAppearance(selectionAppearance), | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps |
There was a problem hiding this comment.
Repo guidance says not to add lint disable comments. Please make the memo dependency shape lint clean, for example by normalizing the selected appearance fields before the memo or by depending on the full object and requiring callers to memoize it.
- ChromatogramChart: normalize selection-appearance fields into primitives before the resolvedAppearance memo so its dependency array is exhaustive-deps clean. Removes the react-hooks/exhaustive-deps eslint-disable. Behavior unchanged. - Clear the Zephyr testCaseIds added by this PR to "" so the sync-storybook-zephyr action assigns real IDs. The Stacked IDs (SW-T1120/1121/1122/1124) were colliding with TdpSearchServer stories on main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@blee-tetrascience addressed both points in 1fdacfb: Zephyr metadata — cleared the concrete IDs this PR adds to
Lint policy — removed the |
|
@copilot resolve the merge conflicts in this pull request |
Resolved — I merged |
When series is empty the component skipped Plotly init and left an uninitialized container, which read as a broken/blank chart. Now it renders the EmptyState (no-data variant) sized and centered to the chart box, so empty/loading data shows a clear "No chromatogram data" placeholder. The EmptySeries play test now asserts the placeholder is visible (the prior step name claimed to check the title but never did). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@blee-tetrascience both review items are resolved — re-requesting review. Zephyr metadata — the Lint policy — the Also folded in a small follow-up while in here: empty
|

Summary
https://tetrascience.atlassian.net/browse/SDA-810
This is what using ChromatogramChart and StackedChromatogram chart instead of using Plotly directly would look like: https://github.com/tetrascience/ts-data-app-system-suitability-testing/compare/chromatogram-encapsulation
Type of Change
Checklist
yarn lintpassesyarn buildpassesyarn test:allpassesTesting
Verification
Screenshots