Skip to content

Commit 55cc2f9

Browse files
committed
pass fontVariant to the axis label
closes #1821
1 parent ec4e8f0 commit 55cc2f9

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

src/marks/axis.js

+2
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

+35
Loading

test/plots/axis-labels.ts

+6
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: "ABCDEF"},
58+
marks: [Plot.axisX({label: "Letter", fontVariant: "small-caps", fill: (d, i) => i})]
59+
});
60+
}
5561
export async function axisLabelVaryingFill() {
5662
return Plot.plot({
5763
x: {domain: "ABCDEF"},

0 commit comments

Comments
 (0)