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
{{ message }}
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.
Not sure if this is something you intended but it caused me some issues. d3.ascending used as the sort key here doesn't sort the "columns" of the sankey diagram in numerical order (d3.ascending is a natural ordering iirc). So if you are trying to do operations right-to-left or reversed, it doesn't work.
varnodesByBreadth=d3.nest().key(function(d){returnd.tier;})//originally d.x; I added a "tier" int index.sortKeys(d3.ascending)//using this the tiers are ordered 0, 1, 10, 2, 3 ... .entries(nodes).map(function(d){returnd.values;});
I swapped out your d3.ascending with a numerical ordering (identical except casting a and b to Numbers) and the "tiers" were then sorted in numerical order. Probably not a big deal but it seemed counter to your intent with this data structure.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Not sure if this is something you intended but it caused me some issues. d3.ascending used as the sort key here doesn't sort the "columns" of the sankey diagram in numerical order (d3.ascending is a natural ordering iirc). So if you are trying to do operations right-to-left or reversed, it doesn't work.
I swapped out your d3.ascending with a numerical ordering (identical except casting a and b to Numbers) and the "tiers" were then sorted in numerical order. Probably not a big deal but it seemed counter to your intent with this data structure.
The text was updated successfully, but these errors were encountered: