the title channel is not filtering the mark, unless it's a tip mark#1704
Merged
Conversation
(any mark that depends on this channel must declare it)
mbostock
reviewed
Jun 22, 2023
| x2: {value: x2, scale: "x", optional: x1 == null}, | ||
| y2: {value: y2, scale: "y", optional: y1 == null} | ||
| y2: {value: y2, scale: "y", optional: y1 == null}, | ||
| title: {value: title, optional: true} // filter: defined |
Member
There was a problem hiding this comment.
So, just for posterity: this works because the channels that are defined here override the default channels that are declared by styles. And that’s specifically because styles is listed first in the spread here:
Line 44 in 5e313d9
That’s fine. It’s a little subtle, but it makes sense that the mark-specific channel definitions would override the defaults.
| import * as Plot from "@observablehq/plot"; | ||
| import * as d3 from "d3"; | ||
|
|
||
| export async function titleDefinedTip() { |
Member
There was a problem hiding this comment.
I’m going to rename this to “sparseTitle” instead of “titleDefined” since the interesting thing about this test is that sometimes the title is not defined. 😂
mbostock
approved these changes
Jun 22, 2023
mbostock
added a commit
that referenced
this pull request
Jun 22, 2023
…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 <mbostock@gmail.com>
mbostock
added a commit
that referenced
this pull request
Jun 22, 2023
…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 <mbostock@gmail.com>
mbostock
added a commit
that referenced
this pull request
Jun 22, 2023
* 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 <mbostock@gmail.com> --------- Co-authored-by: Mike Bostock <mbostock@gmail.com>
Fil
added a commit
that referenced
this pull request
Aug 21, 2023
* 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 <mbostock@gmail.com> --------- Co-authored-by: Mike Bostock <mbostock@gmail.com>
chaichontat
pushed a commit
to chaichontat/plot
that referenced
this pull request
Jan 14, 2024
* null filter on the href channel closes observablehq#1696 * the title channel is not filtering the mark, unless it's a tip mark (observablehq#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 <mbostock@gmail.com> --------- Co-authored-by: Mike Bostock <mbostock@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(any mark that depends on this channel must declare it)
ref. #1699 (comment)