Skip to content

map option for map[XY] - #480

Closed
mbostock wants to merge 2 commits into
mainfrom
mbostock/map-longhand
Closed

mbostock wants to merge 2 commits into
mainfrom
mbostock/map-longhand

Conversation

@mbostock

@mbostock mbostock commented Aug 3, 2021

Copy link
Copy Markdown
Member

Fixes #479.

My first take was to support Plot.normalizeX(basis, options) and Plot.normalizeY(basis, options). While that’s more consistent with Plot.mapX(map, options) and Plot.mapY(map, options), it’s not consistent with Plot.windowX(options) and Plot.windowY(options). So, I then decided it would be better to standardize on Plot.mapX(options) and Plot.mapY(options), and only use the two-argument form when you want to declare the output channels explicitly (e.g., Plot.map, Plot.group, and Plot.bin).

For backwards-compatibility we can continue to support the old form of Plot.mapX and Plot.mapY, but I consider it deprecated and removed it from the documentation.

@mbostock
mbostock requested a review from Fil August 3, 2021 21:46

@Fil Fil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good! Since we're still in the 0.x, do we have to maintain any sort of backwards-compatibility? And if so, for how many versions?

@mbostock

mbostock commented Aug 4, 2021

Copy link
Copy Markdown
Member Author

We need to maintain backwards-compatibility for Observable until we ship version pinning. Otherwise notebooks will upgrade and break.

Also, I’ve realized that the pattern in this PR is inconsistent with the pattern I proposed for basic transforms in #472, so I want to think about how to resolve this discrepancy before landing.

@mbostock

Copy link
Copy Markdown
Member Author

Closing in favor of #494.

@mbostock mbostock closed this Aug 10, 2021
@mbostock
mbostock deleted the mbostock/map-longhand branch August 20, 2021 22:24
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.

Plot.normalizeX and Plot.mapX have different structure

2 participants