Skip to content

fix(ui): render d3 axis ticks in the viewer font - #35

Merged
nekomeowww merged 1 commit into
mainfrom
nekomeowww/fix/axis-tick-font
Oct 20, 2026
Merged

nekomeowww merged 1 commit into
mainfrom
nekomeowww/fix/axis-tick-font

Conversation

@nekomeowww

Copy link
Copy Markdown
Contributor

Summary

Numeric tick labels on the parallel coordinates, case cartesian, and scatter matrix charts used the system sans font. The rest of the chart text uses the viewer font (Quicksand).

Cause: each call to d3-axis writes font-family="sans-serif" (and font-size="10") onto the axis <g> (node_modules/d3-axis/src/axis.js:109-110). The tick <text> elements inherit that value.

Fix: call .attr('font-family', null) after each axis call, so the ticks inherit font.sans from the page. Changed files: ParallelCoordinates.vue, CaseCartesian.vue, ScatterMatrix.vue.

How tested

  • I ran pnpm -F @vieval/ui dev:client against a running vieval viewer and opened the Scores tab in the Chart view. With agent-browser, all 21 g.tick text elements now compute to "Quicksand Variable", …. Before the fix they computed to sans-serif.
  • pnpm exec eslint on the changed files
  • pnpm -F @vieval/ui typecheck

🤖 Generated with Claude Code

d3-axis sets font-family="sans-serif" on each axis group, so numeric tick
labels used the system sans instead of Quicksand. Drop the attribute after
each axis call so ticks inherit the page font.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

Approval required for deploying to Cloudflare Workers (Preview) for docs.

Name Link
Waiting for approval For maintainers, approve here

@nekomeowww
nekomeowww merged commit 7961f04 into main Oct 20, 2026
5 checks passed
@nekomeowww
nekomeowww deleted the nekomeowww/fix/axis-tick-font branch October 20, 2026 22:33
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.

1 participant