Relative Content

Tag Archive for rsortingsankey-diagramnetworkd3

Matching the colors and order of inflow and outflow in a sankeyNetwork diagram

I would like to rearrange the inflow and outflow in the Sankey diagram according to each source. For example, among the 2-year survivors in the localized OP group, some continue to survive into the third year while others are censored. Instead of having all the censored cases grouped together, I want the Sankey diagram to split the inflow based on the source. In other words, I want the inflow from survivors to split into survivors and censored cases, with the colors representing different categories (e.g., red, yellow, green) being consistent within their respective groups.

Matching the colors and order of inflow and outflow in a sankeyNetwork diagram

I would like to rearrange the inflow and outflow in the Sankey diagram according to each source. For example, among the 2-year survivors in the localized OP group, some continue to survive into the third year while others are censored. Instead of having all the censored cases grouped together, I want the Sankey diagram to split the inflow based on the source. In other words, I want the inflow from survivors to split into survivors and censored cases, with the colors representing different categories (e.g., red, yellow, green) being consistent within their respective groups.