Skip to content

fix(charts): render a dot for single-point series instead of an empty path - #371

Merged
imshashank merged 2 commits into
Noveum:mainfrom
ayam04:fix/single-point-scope-chart
Aug 29, 2026
Merged

imshashank merged 2 commits into
Noveum:mainfrom
ayam04:fix/single-point-scope-chart

Conversation

@ayam04

@ayam04 ayam04 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #175

What changed

A series with exactly one bucket previously produced only a move command, so the chart painted nothing. Single-point series now render a centered marker as a zero-length line with a round cap and a non-scaling stroke. This keeps the marker circular even though the chart SVG stretches its coordinate system non-uniformly.

Filled areas are omitted for one-point series because a zero-width area conveys no trend. Multi-point line and area behavior is unchanged.

Review fixes

The initial circle implementation would stretch into an ellipse under preserveAspectRatio="none". The final implementation uses:

  • strokeLinecap="round"
  • strokeWidth={7}
  • vectorEffect="non-scaling-stroke"

Chromium renders confirmed a circular 7px marker at both 160px and 640px chart widths.

Verification

  • Focused chart and geometry suites: 10 passed, 20 assertions
  • Adjacent LinePlot plus changed LineChart suites: 18 passed, 86 assertions
  • Web typecheck: passed
  • Repository lint, comment policy, source-byte policy, Bun-import policy, dependency checks, and every workspace typecheck: passed
  • Independent code and browser audit: no blockers

The full local suite later encountered a Bun 1.3.14 SIGTRAP at the unchanged line-plot.test.tsx after the preceding lanes passed. That file immediately passed 16 of 16 in isolation. Hosted exact-head CI remains required before merge.

Greptile Summary

The PR updates single-point line-chart series to display a centered, circular marker while leaving multi-point rendering unchanged.

  • Renders a zero-length line with a round, non-scaling stroke for one-point series.
  • Omits zero-width area fills for one-point series.
  • Adds focused coverage for single-point and multi-point rendering.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/web/src/features/charts/line-chart.tsx Adds centered, non-scaling round markers for single-point series and suppresses their zero-width fills.
apps/web/tests/features/charts/line-chart.test.tsx Verifies marker geometry and attributes while preserving multi-point line and fill behavior.

Reviews (4): Last reviewed commit: "fix(charts): keep single-point markers c..." | Re-trigger Greptile

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

@ayam04 is attempting to deploy a commit to the MagicAPI Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thanks for your first pull request to Orbit.

Two things that will save you a review round: bun run verify runs the
same four checks CI does, and the repo has no comments in code by policy,
so bun run check-comments will flag any you added out of habit.

A maintainer will review this shortly. Ask anything on the thread.

@github-actions github-actions Bot added tests Test coverage and test infrastructure area: web The Next.js app and its UI area: integrations GitHub, Slack and webhooks labels Aug 29, 2026
@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 25 minutes.

View limit details

Limit details: You’ve used the included review currently available.

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 29528b97-883b-420f-a4df-a786efe3ec22

📥 Commits

Reviewing files that changed from the base of the PR and between a727dde and 9ff350d.

📒 Files selected for processing (2)
  • apps/web/src/features/charts/line-chart.tsx
  • apps/web/tests/features/charts/line-chart.test.tsx

Comment @coderabbitai help to get the list of available commands.

… path

A series with exactly one bucket produced a pure move command (M x y) which SVG paints nothing, so the scope chart rendered blank for workspaces whose history fits in one week (issue Noveum#175).

SeriesPath now renders a small circle at the centred point for a single value, and the area fill is skipped for single-point series since the zero-width shape paints nothing. Two component tests: single point renders a circle at the centred x, multi-point still renders paths.

Signed-off-by: ayam04 <[email protected]>
@ayam04
ayam04 force-pushed the fix/single-point-scope-chart branch from 121f1a9 to 3a683a8 Compare August 29, 2026 11:53
@github-actions github-actions Bot removed the area: integrations GitHub, Slack and webhooks label Aug 29, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@greptileai review

Please review exact head 9ff350db after the maintainer fix.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'HEAD: '
git rev-parse HEAD
printf 'SHORT_HEAD: '
git rev-parse --short HEAD
printf 'REQUESTED_PREFIX: %s\n' '9ff350db'

Length of output: 390


@imshashank The checked-out revision is 9ff350db6f8f103260f2870e2eecb35e93db40c9. It matches the requested head. I will review the full change set.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 25 minutes.

Copy link
Copy Markdown
Contributor

@greptile-apps please review exact head 9ff350db.

@imshashank imshashank 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.

Reviewed the exact head and the rendered output. The round-capped non-scaling marker remains circular under non-uniform SVG scaling, one-point fills are correctly suppressed, multi-point behavior is preserved, and the focused, type, policy, browser, and independent audit checks are clean.

@imshashank
imshashank merged commit 0fd83aa into Noveum:main Aug 29, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: web The Next.js app and its UI tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The scope chart renders blank when the series has a single bucket

2 participants