Skip to content

fix(viewer): latency chart — labels no longer spill past the plot edge#174

Merged
ivanmkc merged 1 commit into
masterfrom
fix/latency-chart-spill
Jun 10, 2026
Merged

fix(viewer): latency chart — labels no longer spill past the plot edge#174
ivanmkc merged 1 commit into
masterfrom
fix/latency-chart-spill

Conversation

@ivanmkc

@ivanmkc ivanmkc commented Jun 10, 2026

Copy link
Copy Markdown
Owner

The observability dashboard's "Latency by percentile" chart directly labels each line's end (a text layer at the last point, dx:6) and also rendered the default legend — redundant, and the inline p99/p95/p50 labels sat at/past the plot's right edge (the reported spill). width:"container" + autosize fit contains the axes/legend but not a text-mark pixel offset beyond the data domain, so the end-labels overflowed.

Fix (recipe observability-dashboard.panes.json + demo seed observability.json): drop the now-redundant legend (color/strokeDashlegend:null) and reserve right room with x.scale.domainMax: 25, so the end-of-line labels sit inside the plot. The clean directly-labeled, dashed, color-independent design is kept (no legend clutter).

Added a skill note: when labeling line ends directly, suppress the legend and reserve right room or labels spill.

Verified: latency pane renders p50/p95/p99 inside the frame, no spill, no redundant legend (before/after screenshots captured); build clean; 424/424 unit. Demo-seed change → redeploy after merge so the live board re-seeds.

The observability dashboard's "Latency by percentile" chart directly labels each
line's end (a text layer at the last point, dx:6) AND also rendered the default
legend — redundant, and the inline labels sat right at / past the plot's right
edge (the reported "lines spilling out the right edge"). width:"container" +
autosize fit contains the axes/legend but not a text mark offset beyond the data
domain, so the end-labels overflowed.

Fix the chart spec (recipe + demo seed): drop the now-redundant legend
(`color`/`strokeDash` `legend:null`) and reserve right room with
`x.scale.domainMax:25` so the end-of-line labels sit inside the plot. The
directly-labeled, dashed, color-independent design is kept; no legend clutter.

Skill note added: when labeling line ends directly, suppress the legend and
reserve right room or the labels spill.

Verified: latency pane renders with p50/p95/p99 labels inside the frame, no
spill, no redundant legend; build clean; 424/424 unit.
@ivanmkc ivanmkc merged commit 7e4934d into master Jun 10, 2026
5 checks passed
@ivanmkc ivanmkc deleted the fix/latency-chart-spill branch June 10, 2026 17:15
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