fix: SW-2058 Remove data-point dots from area graph legend and traces#157
Open
owilliams-tetrascience wants to merge 3 commits into
Open
fix: SW-2058 Remove data-point dots from area graph legend and traces#157owilliams-tetrascience wants to merge 3 commits into
owilliams-tetrascience wants to merge 3 commits into
Conversation
… (SW-2058) AreaGraph traces were switched to mode "lines+markers" with a marker config to render dots at each data point. Since tooltips are custom-bound (hoverinfo: "none"), those dots added no functional value but Plotly reflected lines+markers in the legend, drawing a circle over each fill swatch — the legend looked off. Revert both trace builders (stacked and normal) back to mode "lines" and drop the marker config. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the AreaGraph legend rendering by removing per-point marker dots that were unintentionally being reflected in Plotly’s legend swatches. It restores the AreaGraph traces (both stacked and normal variants) to line-only mode, preserving the existing custom tooltip behavior driven by Plotly hover events.
Changes:
- Revert stacked AreaGraph traces from
mode: "lines+markers"back tomode: "lines". - Revert normal AreaGraph traces from
mode: "lines+markers"back tomode: "lines". - Remove the
markerconfiguration that previously rendered dots at every data point.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The revert deleted well-covered marker lines from AreaGraph (a file above the repo's average line coverage), nudging overall coverage down 0.01% and tripping the no-decrease gate. Add a unit test that exercises the tooltip getLines callback in both branches — normal-mode points (no customdata) and stacked points (numeric customdata) — bringing AreaGraph line coverage to 100% and restoring the overall figure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removing the AreaGraph markers left overall line coverage one line short of the no-decrease gate. Cover the pieLines text-percentage branch in the chart tooltip formatter (lines.ts) — an existing, previously-untested path — bringing lines.ts to 100% line coverage and restoring the overall total. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
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
Fixes SW-2058 — the AreaGraph legend showed circles sitting on top of the rectangle fill swatches for each series ("Series 1/2/3"), which looked off.
The dots were introduced in
3af18ab("fix(charts): refine hover tooltips and markers"), which switched AreaGraph traces frommode: "lines"tomode: "lines+markers"and added amarkerconfig to render a dot at each data point. Because AreaGraph tooltips are custom-bound (the traces usehoverinfo: "none"), those dots added no functional value — but Plotly faithfully reflectslines+markersin the legend, drawing a circle over each swatch.This reverts both trace builders (stacked and normal modes) back to
mode: "lines"and drops themarkerconfig.themeis still used elsewhere in the component (axes, legend colors), so no other cleanup was needed.Type of Change
Checklist
yarn lintpassesyarn buildpassesyarn test:allpassesyarn typecheckandyarn lintpass locally. No story or test changes — this is a pure revert of two trace-config blocks.Testing
No new Zephyr cases; existing AreaGraph stories cover the rendering.
Verification
Screenshots
Before: circle markers overlaid each legend fill swatch (and dots at every data point on the areas). After: clean line+fill legend swatches with no markers.
🤖 Generated with Claude Code