You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to be able to pass a function into nodePadding, so that different nodes can have different padding.
My particular use case for this is showing hierarchical data, for which the nodes on the top level have a larger font size than the ones in the lower level.
Currently with a global nodePadding value, the padding is driven by the larger font size, and leaves unnecessary space between the nodes with the smaller font size.
The text was updated successfully, but these errors were encountered:
mbostock
changed the title
Feature Request: nodePadding as Function
nodePadding as a function?
Sep 1, 2019
Related, I just fixed #63 where if the padding was too large resulting, we’d produce negative node heights. If we make the padding variable for each node, the fix for large values will presumably be more complicated. Also, what’s the desired behavior when two adjacent nodes have different padding? Use the maximum of the two similar to CSS margin-collapse?
It would be great to be able to pass a function into nodePadding, so that different nodes can have different padding.
My particular use case for this is showing hierarchical data, for which the nodes on the top level have a larger font size than the ones in the lower level.
Currently with a global nodePadding value, the padding is driven by the larger font size, and leaves unnecessary space between the nodes with the smaller font size.
The text was updated successfully, but these errors were encountered: