Conversation
|
This omission was somewhat intentional: the most common use of fontVariant is for tabular-nums with numeric or temporal ticks so that the numerals align across ticks. That need does not apply to the axis label, since there is only one label per axis and hence no need for the numerals to have the same width — and indeed we prefer not to have tabular-nums because numerals look better with the default variable width. Though, I guess it might be confusing if some of the font-related options apply to both the ticks and the label, but some don’t. We could have separate options (tickFontVariant, labelFontVariant, and tickFontSize, labelFontSize, etc.). Though maybe it’d be better to just have separate marks… though there we already have a tick mark that is something else too? 😭 |
6394b1e to
562fbf5
Compare
mbostock
left a comment
There was a problem hiding this comment.
We could always introduce more fine-grained options in the future if we need it.
562fbf5 to
6b62d55
Compare
* pass fontVariant to the axis label closes observablehq#1821 * Update test/plots/axis-labels.ts --------- Co-authored-by: Mike Bostock <mbostock@gmail.com>
closes #1821