-
Notifications
You must be signed in to change notification settings - Fork 187
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 normalize #1354
document normalize #1354
Conversation
src/transforms/normalize.d.ts
Outdated
@@ -22,12 +22,73 @@ export interface NormalizeOptions { | |||
basis?: NormalizeBasis; | |||
} | |||
|
|||
/** | |||
* Normalize series values relative to the given basis. For example, if the |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
* document normalize * avoid duplication * edits --------- Co-authored-by: Mike Bostock <mbostock@gmail.com>
for #1343
lots of repetitions, but looks ok?