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