Skip to content

Commit 27e8fff

Browse files
Filmbostock
andauthored
waffle href (#2203)
* waffle href * fix syntax * ariaLabel, href; fix test * test title, too --------- Co-authored-by: Mike Bostock <[email protected]>
1 parent 07cab1e commit 27e8fff

File tree

3 files changed

+444
-1
lines changed

3 files changed

+444
-1
lines changed

src/marks/waffle.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export class WaffleY extends BarY {
3535

3636
function waffleRender(y) {
3737
return function (index, scales, values, dimensions, context) {
38+
const {ariaLabel, href, title, ...visualValues} = values;
3839
const {unit, gap, rx, ry, round} = this;
3940
const {document} = context;
4041
const Y1 = values.channels[`${y}1`].value;
@@ -86,7 +87,7 @@ function waffleRender(y) {
8687
.attr("id", (i) => `${patternId}-${i}`)
8788
.select("rect")
8889
.call(applyDirectStyles, this)
89-
.call(applyChannelStyles, this, values)
90+
.call(applyChannelStyles, this, visualValues)
9091
)
9192
.call((g) =>
9293
g
@@ -104,6 +105,7 @@ function waffleRender(y) {
104105
)
105106
.attr("fill", (i) => `url(#${patternId}-${i})`)
106107
.attr("stroke", this.stroke == null ? null : (i) => `url(#${patternId}-${i})`)
108+
.call(applyChannelStyles, this, {ariaLabel, href, title})
107109
)
108110
.node();
109111
};

0 commit comments

Comments
 (0)