fix(viewer): latency chart — labels no longer spill past the plot edge#174
Merged
Conversation
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.
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.
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 inlinep99/p95/p50labels sat at/past the plot's right edge (the reported spill).width:"container"+ autosizefitcontains 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 seedobservability.json): drop the now-redundant legend (color/strokeDash→legend:null) and reserve right room withx.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.