Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/marks/waffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class WaffleY extends BarY {

function waffleRender(y) {
return function (index, scales, values, dimensions, context) {
const {ariaLabel, href, title, ...visualValues} = values;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this needs to be done somewhere else in the future, we should probably instead split applyChannelStyles into two functions (applyChannelStyles and applyChannelSemantics).

const {unit, gap, rx, ry, round} = this;
const {document} = context;
const Y1 = values.channels[`${y}1`].value;
Expand Down Expand Up @@ -86,7 +87,7 @@ function waffleRender(y) {
.attr("id", (i) => `${patternId}-${i}`)
.select("rect")
.call(applyDirectStyles, this)
.call(applyChannelStyles, this, values)
.call(applyChannelStyles, this, visualValues)
)
.call((g) =>
g
Expand All @@ -104,6 +105,7 @@ function waffleRender(y) {
)
.attr("fill", (i) => `url(#${patternId}-${i})`)
.attr("stroke", this.stroke == null ? null : (i) => `url(#${patternId}-${i})`)
.call(applyChannelStyles, this, {ariaLabel, href, title})
)
.node();
};
Expand Down
Loading