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

document stack #1352

Merged
merged 11 commits into from
Mar 23, 2023
Merged

document stack #1352

merged 11 commits into from
Mar 23, 2023

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Mar 17, 2023

  • expand is deprecated; use normalize in tests

TODO/questions:

  • fix documentation notebook which still mentions expand and silhouette
  • is there a way to mark certain option values ("silhouette", "expand") as @deprecated? Fixed in 2a71c9d
  • remove explicit "x" | "y" in StackOrderName?

for #1343

Sorry, something went wrong.

@Fil Fil requested a review from mbostock March 17, 2023 15:22
@Fil Fil marked this pull request as ready for review March 17, 2023 15:22
@mbostock
Copy link
Member

remove "x" | "y" from StackOrderName?

Are you suggesting that we deprecate the x and y orders for the sake of parsimony, since they are equivalent to value? It’s implemented here:

case "value":
case ky:
return orderY;

Alternatively, are you suggesting that offer stricter validation, only letting you use the x order with stackX, and the y order with stackY? I think we could do that by having separate interfaces for StackXOptions and StackYOptions, but it’s so rare that I don’t think it’s worth doing.

@Fil
Copy link
Contributor Author

Fil commented Mar 20, 2023

Thanks for the clarification. I was wanting to investigate what "x" or "y" did differently than "value", since I wasn't sure I remembered precisely. It's fine to keep them around as aliases, we just need to document them more clearly.

README.md Outdated Show resolved Hide resolved
src/transforms/stack.d.ts Outdated Show resolved Hide resolved
src/transforms/stack.d.ts Outdated Show resolved Hide resolved
src/transforms/stack.d.ts Outdated Show resolved Hide resolved
src/transforms/stack.d.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@mbostock mbostock merged commit 2070e81 into main Mar 23, 2023
@mbostock mbostock deleted the fil/ts-stack branch March 23, 2023 00:51
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* expand is deprecated; use normalize

* normalize is the reference, expand the deprecated value

* stackOptions

* stack transforms

* avoid duplications

* mark *x* and *y* as being an alias of *value*

* Update src/transforms/stack.d.ts

Co-authored-by: Mike Bostock <[email protected]>

* Update src/transforms/stack.d.ts

Co-authored-by: Mike Bostock <[email protected]>

* simpler

* tweaks

* Update README

---------

Co-authored-by: Mike Bostock <[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.

None yet

2 participants