Skip to content

fix: SW-2058 Remove data-point dots from area graph legend and traces#157

Open
owilliams-tetrascience wants to merge 3 commits into
mainfrom
claude/admiring-greider-897171
Open

fix: SW-2058 Remove data-point dots from area graph legend and traces#157
owilliams-tetrascience wants to merge 3 commits into
mainfrom
claude/admiring-greider-897171

Conversation

@owilliams-tetrascience

@owilliams-tetrascience owilliams-tetrascience commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

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 from mode: "lines" to mode: "lines+markers" and added a marker config to render a dot at each data point. Because AreaGraph tooltips are custom-bound (the traces use hoverinfo: "none"), those dots added no functional value — but Plotly faithfully reflects lines+markers in the legend, drawing a circle over each swatch.

This reverts both trace builders (stacked and normal modes) back to mode: "lines" and drops the marker config. theme is still used elsewhere in the component (axes, legend colors), so no other cleanup was needed.

Type of Change

  • Bug fix

Checklist

  • yarn lint passes
  • yarn build passes
  • yarn test:all passes
  • Storybook stories added/updated
  • Code coverage remains the same or increased

yarn typecheck and yarn lint pass 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

  • Deploys to preview environment for manual verification
  • All CI/E2E checks pass

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

… (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>
Copilot AI review requested due to automatic review settings June 24, 2026 21:30
@owilliams-tetrascience owilliams-tetrascience requested review from a team as code owners June 24, 2026 21:30
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ts-lib-ui-kit-storybook Ready Ready Preview, Comment Jun 24, 2026 9:52pm

Request Review

@owilliams-tetrascience owilliams-tetrascience changed the title SW-2058 Remove data-point dots from area graph legend and traces fix: SW-2058 Remove data-point dots from area graph legend and traces Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to mode: "lines".
  • Revert normal AreaGraph traces from mode: "lines+markers" back to mode: "lines".
  • Remove the marker configuration 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>
@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 94.75% (🎯 83%)
🟰 ±0%
20626 / 21768
🟢 Statements 94.75% (🎯 83%)
🟰 ±0%
20626 / 21768
🟢 Functions 93.58% (🎯 74%)
🟰 ±0%
919 / 982
🟢 Branches 88.8% (🎯 81%)
⬆️ +0.05%
3775 / 4251
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/charts/AreaGraph/AreaGraph.tsx 100%
⬆️ +0.38%
86.11%
⬆️ +6.11%
100%
🟰 ±0%
100%
⬆️ +0.38%
Generated in workflow #858 for commit f3473cb by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants