Repository navigation
fix(ui): render d3 axis ticks in the viewer font - #35
Merged
Merged
Conversation
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]>
Approval required for deploying to Cloudflare Workers (Preview) for docs.
|
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.
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"(andfont-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 inheritfont.sansfrom the page. Changed files:ParallelCoordinates.vue,CaseCartesian.vue,ScatterMatrix.vue.How tested
pnpm -F @vieval/ui dev:clientagainst a runningvieval viewerand opened the Scores tab in the Chart view. With agent-browser, all 21g.tick textelements now compute to"Quicksand Variable", …. Before the fix they computed tosans-serif.pnpm exec eslinton the changed filespnpm -F @vieval/ui typecheck🤖 Generated with Claude Code