diff --git a/src/js/src/components/StateOfHealth.vue b/src/js/src/components/StateOfHealth.vue index f1b5b5d4..05f9aa99 100644 --- a/src/js/src/components/StateOfHealth.vue +++ b/src/js/src/components/StateOfHealth.vue @@ -192,16 +192,12 @@
- - - - - {{ n }} - - - + + + + {{ n }} + +
@@ -582,14 +578,17 @@ export default { return '#999'; }, + setEdge( type ) { + this.showEdgeType = type; + this.resetNetwork(); + }, + generateGraph () { if ( this.nodes == null ) { return; } - const nodes = this.nodes.map( d => Object.create( d ) ); - // const links = this.edges.map( d => Object.create( d ) ); - + const nodes = this.nodes; const links = this.edges.filter( (d) => { switch ( this.showEdgeType ) { case 'all': { @@ -606,7 +605,7 @@ export default { } }, this); - const width = 600; + const width = 600; const height = 400; const simulation = d3.forceSimulation( nodes ) @@ -976,6 +975,10 @@ export default { this.generateGraph(); this.generateChord(); } + }, + + showEdgeType: function () { + this.generateGraph(); } }, @@ -1021,4 +1024,8 @@ export default { .modal-card-title { color: whitesmoke; } + + .dropdown-item.is-active { + background-color: whitesmoke; + }