Skip to content

auto bin options #1277

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

Merged
merged 2 commits into from
Feb 16, 2023
Merged

auto bin options #1277

merged 2 commits into from
Feb 16, 2023

Conversation

mbostock
Copy link
Member

Related #1261 #1252, allows x- and y-specific options to be passed through when binning. This is primarily useful for control over thresholds. Given the ambiguities raised in #1261 (review), I’m only doing this for the bin transform; for example you still can’t use scale overrides added in #1247. (I think that’s okay because scale overrides are fairly esoteric, and you can switch to a concrete mark type if needed.)

@mbostock mbostock requested review from Fil and tophtucker February 15, 2023 23:27
@mbostock
Copy link
Member Author

mbostock commented Feb 15, 2023

Also note that you can’t use top-level options for binning, e.g.,

Plot.auto(weather, {x: "date", thresholds: d3.utcMonth, y: {value: "temp_max", reduce: "mean"}}).plot()

That would be nice to add as part of #1261 but we’ll have to address the aforementioned ambiguities.

Copy link
Contributor

@tophtucker tophtucker left a comment

Choose a reason for hiding this comment

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

👍 Seems like a fine cutoff for now. (I hadn't thought about how bin has options but group doesn't! A telling asymmetry!!)

@mbostock mbostock merged commit af4d93a into main Feb 16, 2023
@mbostock mbostock deleted the mbostock/auto-bin-options branch February 16, 2023 16:42
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* auto bin options

* pRetTieR
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