Skip to content

Fix Plot.hexbin default reducer, and simplify#884

Merged
mbostock merged 1 commit into
mbostock/reinitializefrom
fil/reinitialize
May 27, 2022
Merged

Fix Plot.hexbin default reducer, and simplify#884
mbostock merged 1 commit into
mbostock/reinitializefrom
fil/reinitialize

Conversation

@Fil
Copy link
Copy Markdown
Contributor

@Fil Fil commented May 27, 2022

Oops. I realized everything was wrong when I tested z: null (to have 1 center per position independently of the fill and stroke channels). This should be better 😓

@Fil Fil requested a review from mbostock May 27, 2022 15:33
@mbostock mbostock force-pushed the fil/reinitialize branch from 3820065 to 388c3d1 Compare May 27, 2022 20:08
@mbostock
Copy link
Copy Markdown
Member

I’m still reviewing the implementation of the hexbin transform in the other branch, so I’m just going to blindly merge this now so I don’t have to review it twice. My intuition is there are things I want to change here.

@mbostock mbostock merged commit cd2abec into mbostock/reinitialize May 27, 2022
@mbostock mbostock deleted the fil/reinitialize branch May 27, 2022 20:11
Comment thread src/transforms/hexbin.js
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 <fil@rezo.net>
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