|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="column"> |
|
|
|
|
<svg id="chartID" class="chart"></svg> |
|
|
|
|
<div id="FeatureGraph" style="border-style: solid; border-width: 2px; border-color: yellow; min-height: 819px; max-height: 819px; min-width: 819px"></div> |
|
|
|
|
<div id="FeatureGraph" style="border-style: solid; border-width: 3px; border-color: yellow; min-height: 819px; max-height: 819px; min-width: 819px"></div> |
|
|
|
|
<div id="toolbar" style="min-height: 67px; max-height: 67px; margin-top: 25px"> |
|
|
|
|
<div class="panel panel-default" data-placement="center"> |
|
|
|
|
<div class="panel-body" id="resetAllFilters" data-placement="center" style="margin-top: -20px"> |
|
|
|
@ -102,6 +102,7 @@ export default { |
|
|
|
|
this.graphVizualization() |
|
|
|
|
}, |
|
|
|
|
computeOnce () { |
|
|
|
|
var numberOfTransformations = 4 // change that |
|
|
|
|
|
|
|
|
|
var listofNodes = this.dataFS[34] |
|
|
|
|
var dataLocOnce = [] |
|
|
|
@ -109,6 +110,8 @@ export default { |
|
|
|
|
dataLocOnce.push(JSON.parse(this.dataFS[loop+2])) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var featureNames = JSON.parse(this.dataFS[35]) |
|
|
|
|
|
|
|
|
|
var pushEach |
|
|
|
|
var oldVal |
|
|
|
|
var newVal |
|
|
|
@ -124,14 +127,15 @@ export default { |
|
|
|
|
var pushEachFinal = [] |
|
|
|
|
|
|
|
|
|
this.dataFSTrans.forEach(function(element, index) { |
|
|
|
|
var round = element.round |
|
|
|
|
round = JSON.parse(round[loop-1]) |
|
|
|
|
|
|
|
|
|
var transf1 = element.transf1 |
|
|
|
|
transf1 = JSON.parse(transf1[loop-1]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
pushEach = [] |
|
|
|
|
Object.entries(round).forEach( |
|
|
|
|
Object.entries(transf1).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var retrieveData = dataLocOnce[loop-1] |
|
|
|
@ -143,15 +147,15 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+0], valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLogE = element.roundLogE |
|
|
|
|
roundLogE = JSON.parse(roundLogE[loop-1]) |
|
|
|
|
var transf2 = element.transf2 |
|
|
|
|
transf2 = JSON.parse(transf2[loop-1]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
Object.entries(roundLogE).forEach( |
|
|
|
|
Object.entries(transf2).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var retrieveData = dataLocOnce[loop-1] |
|
|
|
@ -163,15 +167,15 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r_E", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+1], valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog2 = element.roundLog2 |
|
|
|
|
roundLog2 = JSON.parse(roundLog2[loop-1]) |
|
|
|
|
var transf3 = element.transf3 |
|
|
|
|
transf3 = JSON.parse(transf3[loop-1]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
Object.entries(roundLog2).forEach( |
|
|
|
|
Object.entries(transf3).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var retrieveData = dataLocOnce[loop-1] |
|
|
|
@ -183,15 +187,15 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r_2", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+2], valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog10 = element.roundLog10 |
|
|
|
|
roundLog10 = JSON.parse(roundLog10[loop-1]) |
|
|
|
|
var transf4 = element.transf4 |
|
|
|
|
transf4 = JSON.parse(transf4[loop-1]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
Object.entries(roundLog10).forEach( |
|
|
|
|
Object.entries(transf4).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var retrieveData = dataLocOnce[loop-1] |
|
|
|
@ -203,7 +207,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r_10", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+3], valueIns: outcome}) |
|
|
|
|
pushEachFinal.push({key: listofNodes[index], value: pushEach}) |
|
|
|
|
}) |
|
|
|
|
pushEachFinalFinal.push(pushEachFinal) |
|
|
|
@ -213,10 +217,14 @@ export default { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
initializeNetwork () { |
|
|
|
|
var numberOfTransformations = 4 // change that |
|
|
|
|
|
|
|
|
|
var featureNames = JSON.parse(this.dataFS[35]) |
|
|
|
|
|
|
|
|
|
this.jsonData = [] |
|
|
|
|
var threshLoc = this.threshold |
|
|
|
|
|
|
|
|
|
this.corrMatrixComb = [] |
|
|
|
|
this.corrMatrixComb = [] |
|
|
|
|
this.corrMatrixCombTotal = [] |
|
|
|
|
this.VIFRemaining = [] |
|
|
|
|
this.MIRemaining = [] |
|
|
|
@ -238,18 +246,18 @@ export default { |
|
|
|
|
var MIRemainingLoc = [] |
|
|
|
|
|
|
|
|
|
this.dataFSTrans.forEach(function(element, index) { |
|
|
|
|
var round = element.round |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(round[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(round[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(round[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(round[20+quadrantNumberLocal])) |
|
|
|
|
round = JSON.parse(round[quadrantNumberLocal]) |
|
|
|
|
var transf1 = element.transf1 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(transf1[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf1[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(transf1[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(transf1[20+quadrantNumberLocal])) |
|
|
|
|
transf1 = JSON.parse(transf1[quadrantNumberLocal]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
pushEach = [] |
|
|
|
|
Object.entries(round).forEach( |
|
|
|
|
Object.entries(transf1).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var search = Object.values(dataLoc[key]) |
|
|
|
@ -260,19 +268,19 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLogE = element.roundLogE |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(roundLogE[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(roundLogE[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(roundLogE[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(roundLogE[20+quadrantNumberLocal])) |
|
|
|
|
roundLogE = JSON.parse(roundLogE[quadrantNumberLocal]) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+0], valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var transf2 = element.transf2 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(transf2[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf2[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(transf2[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(transf2[20+quadrantNumberLocal])) |
|
|
|
|
transf2 = JSON.parse(transf2[quadrantNumberLocal]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
Object.entries(roundLogE).forEach( |
|
|
|
|
Object.entries(transf2).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var search = Object.values(dataLoc[key]) |
|
|
|
@ -283,19 +291,19 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r_E", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog2 = element.roundLog2 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(roundLog2[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(roundLog2[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(roundLog2[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(roundLog2[20+quadrantNumberLocal])) |
|
|
|
|
roundLog2 = JSON.parse(roundLog2[quadrantNumberLocal]) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+1], valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var transf3 = element.transf3 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(transf3[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf3[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(transf3[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(transf3[20+quadrantNumberLocal])) |
|
|
|
|
transf3 = JSON.parse(transf3[quadrantNumberLocal]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
Object.entries(roundLog2).forEach( |
|
|
|
|
Object.entries(transf3).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var search = Object.values(dataLoc[key]) |
|
|
|
@ -306,19 +314,19 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r_2", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog10 = element.roundLog10 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(roundLog10[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(roundLog10[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(roundLog10[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(roundLog10[20+quadrantNumberLocal])) |
|
|
|
|
roundLog10 = JSON.parse(roundLog10[quadrantNumberLocal]) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+2], valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var transf4 = element.transf4 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(transf4[5+quadrantNumberLocal]))) |
|
|
|
|
corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf4[10+quadrantNumberLocal]))[0] * 100) |
|
|
|
|
VIFRemainingLoc.push(Object.values(JSON.parse(transf4[15+quadrantNumberLocal]))[0]) |
|
|
|
|
MIRemainingLoc.push(JSON.parse(transf4[20+quadrantNumberLocal])) |
|
|
|
|
transf4 = JSON.parse(transf4[quadrantNumberLocal]) |
|
|
|
|
oldVal = 0 |
|
|
|
|
newVal = 0 |
|
|
|
|
outcome = 0 |
|
|
|
|
countLoc = 0 |
|
|
|
|
Object.entries(roundLog10).forEach( |
|
|
|
|
Object.entries(transf4).forEach( |
|
|
|
|
function ([feature, value]) { |
|
|
|
|
var key = Object.keys(value) |
|
|
|
|
var search = Object.values(dataLoc[key]) |
|
|
|
@ -329,7 +337,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "r_10", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+3], valueIns: outcome}) |
|
|
|
|
pushEachFinal.push({key: listofNodes[index], value: pushEach}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -360,14 +368,16 @@ export default { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
groupID = 0 |
|
|
|
|
var featureNumber = 0 |
|
|
|
|
listofNodes.forEach( function(element) { |
|
|
|
|
groupID++ |
|
|
|
|
nodes.push( |
|
|
|
|
{"name": "r", "group": groupID, "active": false}, |
|
|
|
|
{"name": "r_E", "group": groupID, "active": false}, |
|
|
|
|
{"name": "r_2", "group": groupID, "active": false}, |
|
|
|
|
{"name": "r_10", "group": groupID, "active": false}, |
|
|
|
|
{"name": featureNames[(featureNumber)*numberOfTransformations+0], "group": groupID, "active": false}, |
|
|
|
|
{"name": featureNames[(featureNumber)*numberOfTransformations+1], "group": groupID, "active": false}, |
|
|
|
|
{"name": featureNames[(featureNumber)*numberOfTransformations+2], "group": groupID, "active": false}, |
|
|
|
|
{"name": featureNames[(featureNumber)*numberOfTransformations+3], "group": groupID, "active": false}, |
|
|
|
|
) |
|
|
|
|
featureNumber++ |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
Object.entries(pushEachFinal).forEach( |
|
|
|
@ -528,92 +538,104 @@ export default { |
|
|
|
|
.data(graph.nodes) |
|
|
|
|
.enter().append('g') |
|
|
|
|
.on("click", function(id, index) { |
|
|
|
|
// This is for transformation |
|
|
|
|
if (modeLoc == 0) { |
|
|
|
|
for (let i = 0; i < listofNodes.length; i++) { |
|
|
|
|
var numb = graph.nodes[i]['group'].match(/\d/g) |
|
|
|
|
numb = parseInt(numb.join("")) |
|
|
|
|
var items = document.getElementsByClassName(numb) |
|
|
|
|
items.forEach( function (it) { |
|
|
|
|
it.childNodes[0].style.visibility = "hidden"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.28) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "#D3D3D3"; |
|
|
|
|
it.childNodes[2].style.visibility = "hidden"; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < graph.nodes.length; i++) { |
|
|
|
|
var str = String(graph.nodes[i].group) |
|
|
|
|
if (!str.includes("root")) { |
|
|
|
|
graph.nodes[i].active = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
node.selectAll('text').remove(); |
|
|
|
|
|
|
|
|
|
var labels = node.append("text") |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
var clickedNode = document.getElementById('svg'+index).getAttribute('class') |
|
|
|
|
if (!clickedNode.includes("root")) { |
|
|
|
|
var clearSendNode = [] |
|
|
|
|
clearSendNode.push(id.name) |
|
|
|
|
clearSendNode.push(clickedNode-1) |
|
|
|
|
EventBus.$emit('transformNodes', clearSendNode) |
|
|
|
|
} else { |
|
|
|
|
for (let i = 0; i < listofNodes.length; i++) { |
|
|
|
|
var numb = graph.nodes[i]['group'].match(/\d/g) |
|
|
|
|
numb = parseInt(numb.join("")) |
|
|
|
|
var items = document.getElementsByClassName(numb) |
|
|
|
|
|
|
|
|
|
var groupLoc = index + 1 |
|
|
|
|
var items = document.getElementsByClassName(groupLoc) |
|
|
|
|
items.forEach( function (it) { |
|
|
|
|
if (it.childNodes[0].style.visibility == "hidden") { |
|
|
|
|
it.childNodes[0].style.visibility = "visible"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(1) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "none"; |
|
|
|
|
it.childNodes[2].style.visibility = "visible"; |
|
|
|
|
} else { |
|
|
|
|
items.forEach( function (it) { |
|
|
|
|
it.childNodes[0].style.visibility = "hidden"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.28) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "#D3D3D3"; |
|
|
|
|
it.childNodes[2].style.visibility = "hidden"; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
var regex = /\d+/g |
|
|
|
|
var string = id.group |
|
|
|
|
var matches = parseInt(string.match(regex)[0]) |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < graph.nodes.length; i++) { |
|
|
|
|
for (let i = 0; i < graph.nodes.length; i++) { |
|
|
|
|
var str = String(graph.nodes[i].group) |
|
|
|
|
if (!str.includes("root")) { |
|
|
|
|
graph.nodes[i].active = false |
|
|
|
|
} else { |
|
|
|
|
document.getElementById('svg'+index).childNodes[0].childNodes[1].style.fill = "black" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
node.selectAll('text').remove(); |
|
|
|
|
|
|
|
|
|
var labels = node.append("text") |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
|
|
|
|
|
if (graph.nodes[i].group == matches) { |
|
|
|
|
graph.nodes[i].active = true |
|
|
|
|
var groupLoc = index + 1 |
|
|
|
|
var items = document.getElementsByClassName(groupLoc) |
|
|
|
|
items.forEach( function (it) { |
|
|
|
|
if (it.childNodes[0].style.visibility == "hidden") { |
|
|
|
|
it.childNodes[0].style.visibility = "visible"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(1) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "none"; |
|
|
|
|
it.childNodes[2].style.visibility = "visible"; |
|
|
|
|
} else { |
|
|
|
|
it.childNodes[0].style.visibility = "hidden"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.28) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "#D3D3D3"; |
|
|
|
|
it.childNodes[2].style.visibility = "hidden"; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
var regex = /\d+/g |
|
|
|
|
var string = id.group |
|
|
|
|
var matches = parseInt(string.match(regex)[0]) |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < graph.nodes.length; i++) { |
|
|
|
|
|
|
|
|
|
if (graph.nodes[i].group == matches) { |
|
|
|
|
graph.nodes[i].active = true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
node.selectAll('text').remove(); |
|
|
|
|
node.selectAll('text').remove(); |
|
|
|
|
|
|
|
|
|
var labels = node.append("text") |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
EventBus.$emit('brushLink', groupLoc-1) |
|
|
|
|
var labels = node.append("text") |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
EventBus.$emit('brushLink', groupLoc-1) |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
var groupsColor = d3.select('#svg'+index)._groups['0'][0].childNodes[0].childNodes[1] |
|
|
|
|
var regex = /\d+/g |
|
|
|
|
var idLocal = parseInt(d3.select('#svg'+index)._groups['0'][0].getAttribute("id").match(regex)) |
|
|
|
|
if (groupsColor.getAttribute('fill') == "black") { |
|
|
|
|
if (groupsColor.getAttribute('fill') == "#D3D3D3") { |
|
|
|
|
if (selectionCounter < 3) { |
|
|
|
|
// add here the different states of comparison! (=2 and =3) |
|
|
|
|
groupsColor.setAttribute('fill', '#D3D3D3') |
|
|
|
|
groupsColor.setAttribute('fill', '#black') |
|
|
|
|
selectionCounter = selectionCounter + 1 |
|
|
|
|
EventBus.$emit('Counter', selectionCounter) |
|
|
|
|
IDsGather.push(idLocal); |
|
|
|
@ -627,7 +649,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
groupsColor.setAttribute('fill', 'black') |
|
|
|
|
groupsColor.setAttribute('fill', '#D3D3D3') |
|
|
|
|
selectionCounter = selectionCounter - 1 |
|
|
|
|
EventBus.$emit('Counter', selectionCounter) |
|
|
|
|
var index = IDsGather.indexOf(idLocal); |
|
|
|
@ -666,6 +688,8 @@ export default { |
|
|
|
|
|
|
|
|
|
if (graph.nodes[i].group == matches) { |
|
|
|
|
graph.nodes[i].active = false |
|
|
|
|
} else { |
|
|
|
|
document.getElementById('svg'+index).childNodes[0].childNodes[1].style.fill = "#D3D3D3" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -815,9 +839,9 @@ export default { |
|
|
|
|
var data = [] |
|
|
|
|
var barchartData = [] |
|
|
|
|
if (IDsGather.includes(indexNode)) { |
|
|
|
|
data.push({value: VIFVarFormatted[indexNode], color: '#D3D3D3'}) |
|
|
|
|
} else { |
|
|
|
|
data.push({value: VIFVarFormatted[indexNode], color: 'black'}) |
|
|
|
|
} else { |
|
|
|
|
data.push({value: VIFVarFormatted[indexNode], color: '#D3D3D3'}) |
|
|
|
|
} |
|
|
|
|
data.push({value: corrGlobFormatted[indexNode], color: colorsScaleNodes(MIVar[indexNode])}) |
|
|
|
|
|
|
|
|
@ -1076,7 +1100,7 @@ export default { |
|
|
|
|
var binaryBarLegend = [] |
|
|
|
|
var exemplaryValues = [25, 75] |
|
|
|
|
|
|
|
|
|
dataLegend.push({value: 25, color: 'black'}) |
|
|
|
|
dataLegend.push({value: 25, color: '#D3D3D3'}) |
|
|
|
|
dataLegend.push({value: 50, color: '#6baed6'}) |
|
|
|
|
|
|
|
|
|
for(let k = 0; k < 2; k++) { |
|
|
|
@ -1203,7 +1227,7 @@ export default { |
|
|
|
|
textLine.append('line') |
|
|
|
|
.style("stroke", "black") |
|
|
|
|
.style("stroke-width", 3) |
|
|
|
|
.attr("x1", 35 + marginBorderX) |
|
|
|
|
.attr("x1", 36 + marginBorderX) |
|
|
|
|
.attr("y1", 50 - marginBorder) |
|
|
|
|
.attr("x2", 74 + marginBorderX) |
|
|
|
|
.attr("y2", 50 - marginBorder) |
|
|
|
|