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

exclusiveFacets #1649

Merged
merged 7 commits into from
Aug 21, 2023
Merged

exclusiveFacets #1649

merged 7 commits into from
Aug 21, 2023

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented May 28, 2023

Fixes #1648.

This needs to pad the data with duplicates, too. Done.

I think we might also read using non-exclusive faceted index, while writing using the exclusive faceted index. Otherwise channels supplied as arrays of values would not work. I’m not sure whether we would do anything about channels that are supplied as arrays of values that are not read by the transform; that feels like a generic issue where transforms can reindex and break the association with data, and maybe if we consider that an issue, Plot should provide a generic mechanism to reindex channel values after transforming data. Done.

@Fil
Copy link
Contributor

Fil commented Jun 1, 2023

#1662 tries to solve the array channel reindexing issue

we also need to list any other transform or initializer that needs reindexing, and create a test for it

@Fil Fil mentioned this pull request Jun 1, 2023
2 tasks
@Fil Fil mentioned this pull request Jun 1, 2023
@mbostock mbostock marked this pull request as ready for review August 18, 2023 21:01
@mbostock mbostock enabled auto-merge (squash) August 18, 2023 21:01
@mbostock
Copy link
Member Author

Looks good to me. 👍

Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

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

Yes! And it works (almost) when merged into #1623, by adding this:

 function delaunayMark(DelaunayMark, data, {x, y, ...options} = {}) {
   [x, y] = maybeTuple(x, y);
+  options = basic(options, (data, facets) => exclusiveFacets(data, facets));
   return new DelaunayMark(data, {...options, x, y});
 }

@mbostock mbostock merged commit 8b9016a into main Aug 21, 2023
1 check passed
@mbostock mbostock deleted the mbostock/exclusive-facets branch August 21, 2023 08:18
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* exclusiveFacets

* pad the data with duplicates

* reindex

* test

* done

* reindex iterables

* reindex symbol

---------

Co-authored-by: Philippe Rivière <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some transforms (and marks) require facets to be exclusive
2 participants