Skip to content

Commit cb42964

Browse files
Filmbostock
authored andcommitted
pass fontVariant to the axis label
closes #1821
1 parent 111cdf7 commit cb42964

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

src/marks/axis.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ function labelOptions(
488488
fontFamily,
489489
fontSize,
490490
fontStyle,
491+
fontVariant,
491492
fontWeight,
492493
monospace,
493494
pointerEvents,
@@ -508,6 +509,7 @@ function labelOptions(
508509
fontFamily,
509510
fontSize,
510511
fontStyle,
512+
fontVariant,
511513
fontWeight,
512514
monospace,
513515
pointerEvents,

test/output/axisLabelFontVariant.svg

Lines changed: 33 additions & 0 deletions
Loading

test/plots/axis-labels.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export async function axisLabelBothReverse() {
5252
});
5353
}
5454

55+
export async function axisLabelFontVariant() {
56+
return Plot.plot({
57+
x: {domain: "abcde"},
58+
marks: [Plot.axisX({label: "Letter", fontVariant: "small-caps"})]
59+
});
60+
}
5561
export async function axisLabelVaryingFill() {
5662
return Plot.plot({
5763
x: {domain: "ABCDEF"},

0 commit comments

Comments
 (0)