Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-ups on Delaunay/Voronoi #928

Closed
2 of 10 tasks
Fil opened this issue Jun 9, 2022 · 2 comments
Closed
2 of 10 tasks

Follow-ups on Delaunay/Voronoi #928

Fil opened this issue Jun 9, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented Jun 9, 2022

@Fil Fil self-assigned this Jun 9, 2022
@Fil Fil added the enhancement New feature or request label Jun 9, 2022
@mbostock
Copy link
Member

mbostock commented Jun 9, 2022

The Delaunay/Voronoi/Hull marks require x and y, and a such don't accept the result of the dodge transform.

Hmm, this is a bummer. 🤔 This is the same issue we ran into in #889 (review):

Since initializers run after mark construction, there’s no longer a guarantee that the mark will know which channels will be available on render at the time the mark constructor is called. So either we say it should be the responsibility of the initializer to indicate that the channels will be available (which this PR does only for the r channel on the hexbin transform, but not in general); or we say that marks shouldn’t assume to know which channels will be available. #891 takes the latter approach which feels a little bit more robust in this regard, even though the constructor is arguably “confused” about what will happen on render.

So, we’re kind of back to where we were. Since the initializer constructs the channels dynamically, if we don’t want to declare the channels statically in the Mark constructor, the only way to know that the channels are missing would be to initialize the mark and apply its initializer (which currently means rendering the mark… there’s no method for just “fully” initializing a mark).

It definitely seems possible for the initializers to declare which channels they will create: dodgeX creates x, dodgeY creates y, hexbin creates whatever’s declared in outputs. So maybe we just have a convention for declaring these dynamic channels so that mark constructors can know what will happen.

@mbostock
Copy link
Member

This umbrella issue is over a year old. We should close it and re-open more specific issues as needed.

@Fil Fil closed this as completed Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants