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

reinitialize #823

Merged
merged 13 commits into from
May 4, 2022
Merged

reinitialize #823

merged 13 commits into from
May 4, 2022

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Mar 24, 2022

merges on #801:

This is mainly in order to test the composition of channel transforms (wanted to have both hexbin and dodge in the same branch). My goal is also to have a base on which to build new channel transforms.

@Fil
Copy link
Contributor Author

Fil commented Mar 26, 2022

Wondering if we should not merge new channels with the old channels when doing composition? (DONE)

@Fil

This comment was marked as resolved.

@Fil Fil mentioned this pull request Mar 28, 2022
(using the same remap intializer as in the darkerDodge plot)
@Fil
Copy link
Contributor Author

Fil commented Mar 30, 2022

Another example of something we can only do with reinitializer:

Capture d’écran 2022-03-30 à 13 58 40

Capture d’écran 2022-03-30 à 13 59 47

We need to be able to read in the x and y scales, the compute all the numbers on the cross-domain x⨂y, then create the color scale (and associated legend).

https://observablehq.com/@observablehq/plot-heatmap-823

@mbostock mbostock merged commit f72a40f into mbostock/reinitialize May 4, 2022
@mbostock mbostock deleted the fil/reinitialize-all branch May 4, 2022 22:11
mbostock pushed a commit that referenced this pull request May 4, 2022
* document layouts (as "scale-aware transforms")

* document binWidth

* document the initialize option after 42ac4f0

* sort hex bins by radius (descending)
group by z
inline hexbin
binWidth is the distance between two centers

(rebased on mbostock/reinitialize)

* dodge

rebased on mbostock/reinitialize

* compose intializers

* use composeInitialize to make dodge composable

* add new channels as you compose initializers

* darker transform, to demonstrate composition with dodgeY

(added as an example, but we could promote it to a transform)

* a more generic "remap"

* jiggle layout
(using the same remap intializer as in the darkerDodge plot)
mbostock pushed a commit that referenced this pull request May 4, 2022
* document layouts (as "scale-aware transforms")

* document binWidth

* document the initialize option after 42ac4f0

* sort hex bins by radius (descending)
group by z
inline hexbin
binWidth is the distance between two centers

(rebased on mbostock/reinitialize)

* dodge

rebased on mbostock/reinitialize

* compose intializers

* use composeInitialize to make dodge composable

* add new channels as you compose initializers

* darker transform, to demonstrate composition with dodgeY

(added as an example, but we could promote it to a transform)

* a more generic "remap"

* jiggle layout
(using the same remap intializer as in the darkerDodge plot)
mbostock added a commit that referenced this pull request May 26, 2022
scale hex radius so that when hexagons touch, circles also touch without overlapping (#803)

(supersedes #795)

simpler hexagon

hexgrid

fix for unscaled channels

reorder

hexbin

fix #806; handle missing hint

infer channel scales

pass data to initializer

offset hexagonal grid slightly

simpler without destructuring

reinitialize (#823)

* document layouts (as "scale-aware transforms")

* document binWidth

* document the initialize option after 42ac4f0

* sort hex bins by radius (descending)
group by z
inline hexbin
binWidth is the distance between two centers

(rebased on mbostock/reinitialize)

* dodge

rebased on mbostock/reinitialize

* compose intializers

* use composeInitialize to make dodge composable

* add new channels as you compose initializers

* darker transform, to demonstrate composition with dodgeY

(added as an example, but we could promote it to a transform)

* a more generic "remap"

* jiggle layout
(using the same remap intializer as in the darkerDodge plot)

composeInitialize
mbostock added a commit that referenced this pull request May 28, 2022
* mark initializers

scale hex radius so that when hexagons touch, circles also touch without overlapping (#803)

(supersedes #795)

simpler hexagon

hexgrid

fix for unscaled channels

reorder

hexbin

fix #806; handle missing hint

infer channel scales

pass data to initializer

offset hexagonal grid slightly

simpler without destructuring

reinitialize (#823)

* document layouts (as "scale-aware transforms")

* document binWidth

* document the initialize option after 42ac4f0

* sort hex bins by radius (descending)
group by z
inline hexbin
binWidth is the distance between two centers

(rebased on mbostock/reinitialize)

* dodge

rebased on mbostock/reinitialize

* compose intializers

* use composeInitialize to make dodge composable

* add new channels as you compose initializers

* darker transform, to demonstrate composition with dodgeY

(added as an example, but we could promote it to a transform)

* a more generic "remap"

* jiggle layout
(using the same remap intializer as in the darkerDodge plot)

composeInitialize

* update dependencies

* Update README

* Update README

* tweak error message

* Fix Plot.hexbin default reducer, and simplify (#884)

* sort tests

* revert inlined hexbin implementation

* simpler z

* simpler scale application

* re-inline d3-hexbin

* use descendingDefined to sort

* coerce X and Y to numbers

* populate radius hint

* fix hexbin z; implicit group on symbol

* update tests

* expose initialize; rewrite remap

* tweak tests

* tweak tests

* tweak tests

* tweak tests

* tweak tests

* tweak tests

* tweak tests

* tweak tests

* fix scale association, numeric coercion

* fix numeric coercion

* remove comment

* initializers

* Update README

* preserve this with composed transforms

* no default sort for hexbin

* channel sorting; default sort by descending r

* don’t consume null sort

* don’t consume null sort, strictly

* Update README

Co-authored-by: Philippe Rivière <[email protected]>
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