Skip to content

Commit 428bdbc

Browse files
Filmbostock
andauthored
null filter on the href channel (#1699)
* null filter on the href channel closes #1696 * the title channel is not filtering the mark, unless it's a tip mark (#1704) * the title channel is not filtering the mark, unless it's a tip mark (any mark that depends on this channel must declare it) * rename to sparse title --------- Co-authored-by: Mike Bostock <[email protected]> --------- Co-authored-by: Mike Bostock <[email protected]>
1 parent 5e313d9 commit 428bdbc

File tree

6 files changed

+22031
-4
lines changed

6 files changed

+22031
-4
lines changed

src/marks/tip.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class Tip extends Mark {
4545
textAnchor = "start",
4646
textOverflow,
4747
textPadding = 8,
48+
title,
4849
pointerSize = 12,
4950
pathFilter = "drop-shadow(0 3px 4px rgba(0,0,0,0.2))"
5051
} = options;
@@ -56,7 +57,8 @@ export class Tip extends Mark {
5657
x1: {value: x1, scale: "x", optional: x2 == null},
5758
y1: {value: y1, scale: "y", optional: y2 == null},
5859
x2: {value: x2, scale: "x", optional: x1 == null},
59-
y2: {value: y2, scale: "y", optional: y1 == null}
60+
y2: {value: y2, scale: "y", optional: y1 == null},
61+
title: {value: title, optional: true} // filter: defined
6062
},
6163
options,
6264
defaults

src/style.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ export function styles(
143143
mark.shapeRendering = impliedString(shapeRendering, "auto");
144144

145145
return {
146-
title: {value: title, optional: true},
147-
href: {value: href, optional: true},
148-
ariaLabel: {value: variaLabel, optional: true},
146+
title: {value: title, optional: true, filter: null},
147+
href: {value: href, optional: true, filter: null},
148+
ariaLabel: {value: variaLabel, optional: true, filter: null},
149149
fill: {value: vfill, scale: "auto", optional: true},
150150
fillOpacity: {value: vfillOpacity, scale: "auto", optional: true},
151151
stroke: {value: vstroke, scale: "auto", optional: true},

0 commit comments

Comments
 (0)