Skip to content

test=penguinBinStack - #195

Closed
Fil wants to merge 3 commits into
mbostock/compose-transformfrom
fil/binstack
Closed

Fil wants to merge 3 commits into
mbostock/compose-transformfrom
fil/binstack

Conversation

@Fil

@Fil Fil commented Mar 7, 2021

Copy link
Copy Markdown
Contributor

A tiny step (and test) for bin + stack.

I'm sending this very much half-baked, in case it helps (won't have more time today).

Capture d’écran 2021-03-07 à 10 37 55

@Fil
Fil marked this pull request as draft March 7, 2021 09:40
@Fil
Fil requested a review from mbostock March 7, 2021 09:40
@Fil

Fil commented Mar 7, 2021

Copy link
Copy Markdown
Contributor Author

Capture d’écran 2021-03-07 à 18 41 13

Capture d’écran 2021-03-07 à 18 31 56

…they can be stacked directly with stackY and stackX (which stack on location=x and location=y respectively).
@mbostock

mbostock commented Mar 7, 2021

Copy link
Copy Markdown
Member

This is helpful, thanks. I want to try a slightly different approach — the bin transform is already computing the z channel, so it should be able to return the materialized channel (using lazyChannel like the stack transform), such that if you pass fill: "species" to the bin transform, it’ll use it for z and make it available for rendering the bins, rather than needing a fill: "z" which is computed after the bin transform is applied.

@Fil

Fil commented Mar 7, 2021

Copy link
Copy Markdown
Contributor Author

Just to complete the comments on this draft and examples:

  • The 1-d examples were a bit awkward since stackX needs to be given a specific y (location) to stack on. The location I've chosen is y:x0 (it could also be y:x1 with no incidence—it just needs to be an identifier allowing to group the bins that have the same (x0, x1) with different z). There's probably some possibility of improvement here.

  • The 2-d example doesn't allow to specify fill: "species", since only z is passed. I won't look into it but this is a desirable feature.

@Fil Fil closed this Mar 7, 2021
@Fil Fil reopened this Mar 7, 2021
@Fil Fil closed this Mar 7, 2021
@mbostock mbostock mentioned this pull request Mar 7, 2021
@Fil
Fil deleted the fil/binstack branch October 16, 2022 18:38
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.

2 participants