Skip to content

Auto: given bar, use cell over rect when no reducer#1674

Merged
mbostock merged 3 commits into
mainfrom
toph/auto-simpsons
Jun 7, 2023
Merged

Auto: given bar, use cell over rect when no reducer#1674
mbostock merged 3 commits into
mainfrom
toph/auto-simpsons

Conversation

@tophtucker
Copy link
Copy Markdown
Member

If there's no reducer, the rects will have no extent, so we should treat numbers as ordinal. Fixes #1672. This lets us get to e.g. the Simpsons ratings heatmap:

image
Plot.auto(simpsons, {x: "season", y: "number_in_season", color: "imdb_rating", mark: "bar"}).plot()

This will never be chosen unless mark: "bar" is passed, because of isZeroReducer(xReduce) || isZeroReducer(yReduce) || colorReduce != null ? "bar" above.

@tophtucker tophtucker requested review from Fil and mbostock June 7, 2023 01:17
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.

Could Plot.auto make the Simpsons cell heatmap?

2 participants