typescript(vx-hierarchy): re-write package in TypeScript #524
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Enhancements
This PR builds off of typescript(vx-group): re-write package in TypeScript #488 which added TypeScript build support, and converts the
@vx/hierarchy
package to TypeScript.Adds additional exports from
d3-hierarchy
which are commonly needed to generate the needed input to this suite of components (removing the need to also installd3-hierarchy
as a direct dependency)stratify
+hierarchy
to generaterootNode
s for all hierarchy componentstreeemap
tile methods to be passed intoTreemap.props.tile
:treemapSquarify
,treemapBinary
,treemapResquarify
,treemapDice
,treemapSlice
,treemapSliceDice
@types/d3-hierarchy
:HierarchyNode
,HierarchyRectangularNode
,HierarchyCircularNode
,HierarchyPointLink
,HierarchyPointNode
,HierarchyCircularLink
,HierarchyRectangularLink
,HierarchyLink
exports a new default node component for rectangular node layouts:
HierarchyDefaultRectNode
adds a
tile
method select to theTreemap
demo (see below)💥 Breaking Changes
React.Fragments
, which requires bumping thepeerDep
forreact
to^16.3.0-0
🐛 Bug Fix
nodeComponent
would render emptycircle
elements forPartition
andTreemap
because those layouts do not pass circle coordinates, they pass rectangular coordinates (x0
,x1
,y0
,y1
)Tests
/treemap
,trees/
, and/dendrograms
demos.d.ts
filesCloses #523
@hshoff @schillerk @milesj @kristw @Rudeg