Skip to content

transforms should respect *z* series specified as {value: z}#2272

Open
Fil wants to merge 1 commit intomainfrom
fil/window-z
Open

transforms should respect *z* series specified as {value: z}#2272
Fil wants to merge 1 commit intomainfrom
fil/window-z

Conversation

@Fil
Copy link
Copy Markdown
Contributor

@Fil Fil commented Jan 19, 2025

When z is specified as stroke: {value: "series"}, it should not be ignored by the window (map) transform, the stack ordering, and the select transform.

transform before (incorrect) after
map window (mixed series) Image Image
stack (bad order) zValueStack-old zValueStack
select (1 series instead of 6) zValueSelect-old zValueSelect

@Fil Fil changed the title the window transform should respect *z* series the window transform should respect *z* series defined as an object Jan 19, 2025
@Fil Fil changed the title the window transform should respect *z* series defined as an object the window transform should respect *z* series specified as {value: z} Jan 19, 2025
@Fil Fil changed the title the window transform should respect *z* series specified as {value: z} the map transform should respect *z* series specified as {value: z} Jan 19, 2025
@Fil

This comment was marked as resolved.

Comment thread src/options.js
export function maybeZ({z, fill, stroke} = {}) {
if (z === undefined) [z] = maybeColorChannel(fill);
if (z === undefined) [z] = maybeColorChannel(stroke);
if (isOptions(z)) z = z.value;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note: other properties on the options z could be:

  • scale — which scale to use
  • label — a label for axes/legends
  • hint — internal hints (e.g., {length: true} for stack)
  • filter — a filter function for the channel
  • optional — whether the channel can be null

none of these matter to determine how to group series.

@Fil Fil marked this pull request as ready for review April 15, 2026 09:48
@Fil Fil requested a review from mbostock April 15, 2026 09:48
@Fil Fil added the bug Something isn’t working label Apr 15, 2026
@Fil Fil changed the title the map transform should respect *z* series specified as {value: z} transforms should respect *z* series specified as {value: z} Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn’t working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant