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

dodge #809

Closed
wants to merge 14 commits into from
Closed

dodge #809

wants to merge 14 commits into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Mar 15, 2022

only API change is to pass dimensions as the fifth argument

@Fil Fil requested a review from mbostock March 15, 2022 20:30
@Fil Fil mentioned this pull request Mar 15, 2022
16 tasks
@Fil Fil force-pushed the fil/reinitialize-dodge branch from 91e511a to e03d271 Compare March 16, 2022 08:04
src/plot.js Outdated
// Reinitialize; for deriving channels dependent on other channels.
const newByScale = new Set();
for (const [mark, state] of stateByMark) {
if (mark.reinitialize != null) {
const {facets, channels} = mark.reinitialize(state.facets, state.channels, scales);
const {facets, channels} = mark.reinitialize(state.facets, state.channels, scales, subdimensions);
Copy link
Member

@mbostock mbostock Mar 18, 2022

Choose a reason for hiding this comment

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

Here we’re effectively using fx || fy to test for faceting, but elsewhere we use facets !== undefined. The two aren’t currently guaranteed to be equivalent (because you can currently declare an fx or fy scale without declaring faceting), so we should either make that guarantee, or we should be consistent with which test we use.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's equivalent? This is not using options.fx and options.fy, but scales.fx and scales.fy which are set only if there are corresponding channels in channelsByScale, and defined at the same time as facets in L.49.

@Fil Fil force-pushed the fil/reinitialize-dodge branch from 076cff4 to 2c228d2 Compare March 24, 2022 14:02
@Fil Fil mentioned this pull request Mar 24, 2022
@mbostock mbostock force-pushed the mbostock/reinitialize branch 2 times, most recently from b305131 to 886615b Compare May 4, 2022 22:26
@mbostock
Copy link
Member

mbostock commented May 7, 2022

Merged into #823, which was merged into #801.

@mbostock mbostock closed this May 7, 2022
@Fil Fil deleted the fil/reinitialize-dodge branch October 16, 2022 18:43
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