Commit d1fce075 authored by Francis Renaud's avatar Francis Renaud
Browse files

NA-574 Grouping apps by type

parent 43c5968c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -401,12 +401,14 @@ class IDCGraph extends Component {
    const data = this.root; // || this.props.displayedScenario;
    this.root = d3.hierarchy(data, getScenarioNodeChildren);
    
    this.nodes = this.root.descendants();
    const compareTypes = (a, b)  => {
      return a.data.type < b.data.type;
    };
    this.nodes = this.root.descendants().sort(compareTypes);

    copyAttributesRecursive(data)(this.root);

    let tree = d3.tree().size([this.props.height, this.props.width - 100]);
    let cluster = d3.cluster().size([this.props.height, this.props.width - 100]);
    clusterFlip(tree)(this.root);
  }