Skip to content

document normalize#1354

Merged
mbostock merged 3 commits into
mainfrom
fil/ts-normalize
Mar 23, 2023
Merged

document normalize#1354
mbostock merged 3 commits into
mainfrom
fil/ts-normalize

Conversation

@Fil
Copy link
Copy Markdown
Contributor

@Fil Fil commented Mar 17, 2023

for #1343

lots of repetitions, but looks ok?

@Fil Fil requested a review from mbostock March 17, 2023 18:10
Comment thread src/transforms/normalize.d.ts Outdated
}

/**
* Normalize series values relative to the given basis. For example, if the
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is another instance where we want the first sentence to emphasize what is unique about normalizeX as opposed to shared across all variations of the normalize transform: it should mention specifically which channels are going to be transformed. (Fixing as I edit.)

Copy link
Copy Markdown
Member

@mbostock mbostock Mar 23, 2023

Choose a reason for hiding this comment

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

Also, since the normalize transform is built on top of the map transform, we should also mention that data are first grouped into series. From Plot.map in the README:

Groups on the first channel of z, fill, or stroke, if any, and then for each channel declared in the specified outputs object, applies the corresponding map method.

Something like:

Groups data into series using the first channel of z, fill, or stroke, if any, and then derives new x, x1, and x2 channels for each corresponding input channel by applying the given normalize basis.

@mbostock mbostock enabled auto-merge (squash) March 23, 2023 16:53
@mbostock mbostock merged commit fcb1991 into main Mar 23, 2023
@mbostock mbostock deleted the fil/ts-normalize branch March 23, 2023 16:54
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* document normalize

* avoid duplication

* edits

---------

Co-authored-by: Mike Bostock <mbostock@gmail.com>
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