|
|
|
@ -118,15 +118,10 @@ export default { |
|
|
|
|
var MIVar4 = JSON.parse(this.overallData[31]) |
|
|
|
|
var MIVar5 = JSON.parse(this.overallData[32]) |
|
|
|
|
|
|
|
|
|
MIVar1 = MIVar1.concat(MIVar1) |
|
|
|
|
MIVar1 = MIVar1.concat(this.overallDataTransfMI[0]) |
|
|
|
|
MIVar2 = MIVar2.concat(MIVar2) |
|
|
|
|
MIVar2 = MIVar2.concat(this.overallDataTransfMI[1]) |
|
|
|
|
MIVar3 = MIVar3.concat(MIVar3) |
|
|
|
|
MIVar3 = MIVar3.concat(this.overallDataTransfMI[2]) |
|
|
|
|
MIVar4 = MIVar4.concat(MIVar4) |
|
|
|
|
MIVar4 = MIVar4.concat(this.overallDataTransfMI[3]) |
|
|
|
|
MIVar5 = MIVar5.concat(MIVar5) |
|
|
|
|
MIVar5 = MIVar5.concat(this.overallDataTransfMI[4]) |
|
|
|
|
|
|
|
|
|
function min(input) { |
|
|
|
@ -164,7 +159,6 @@ export default { |
|
|
|
|
MIVar3 = MIVar3.map(normalize(MIMin3, MIMax3)) |
|
|
|
|
MIVar4 = MIVar4.map(normalize(MIMin4, MIMax4)) |
|
|
|
|
MIVar5 = MIVar5.map(normalize(MIMin5, MIMax5)) |
|
|
|
|
|
|
|
|
|
var colorsScaleNodes1 = d3v5.scaleOrdinal() |
|
|
|
|
.domain(d3v5.ticks([MIMin1, MIMax1, 5])) |
|
|
|
|
.range(['#6baed6','#4292c6','#2171b5','#08519c','#08306b']); |
|
|
|
@ -186,62 +180,62 @@ export default { |
|
|
|
|
var featuresQuad3 = [] |
|
|
|
|
var featuresQuad4 = [] |
|
|
|
|
var featuresQuad5 = [] |
|
|
|
|
|
|
|
|
|
// 4 is number of transformations! |
|
|
|
|
for (let i = 0; i < features[4].length; i++) { |
|
|
|
|
featuresQuad1.push({"name": features[0][i].key, |
|
|
|
|
"children": [ |
|
|
|
|
{"name": features[0][i].value[0].keyIns, "lin_color": features[0][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*features[4].length+0]), "MI_pick":colorsScaleNodes1([this.overallDataTransfMI[0][i*features[4].length+0]].map(normalize(MIMin1, MIMax1))[0])}, |
|
|
|
|
{"name": features[0][i].value[1].keyIns, "lin_color": features[0][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*features[4].length+1]), "MI_pick":colorsScaleNodes1([this.overallDataTransfMI[0][i*features[4].length+1]].map(normalize(MIMin1, MIMax1))[0])}, |
|
|
|
|
{"name": features[0][i].value[2].keyIns, "lin_color": features[0][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*features[4].length+2]), "MI_pick":colorsScaleNodes1([this.overallDataTransfMI[0][i*features[4].length+2]].map(normalize(MIMin1, MIMax1))[0])}, |
|
|
|
|
{"name": features[0][i].value[3].keyIns, "lin_color": features[0][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*features[4].length+3]), "MI_pick":colorsScaleNodes1([this.overallDataTransfMI[0][i*features[4].length+3]].map(normalize(MIMin1, MIMax1))[0])}, |
|
|
|
|
{"name": features[0][i].value[0].keyIns, "lin_color": features[0][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+0]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+0])}, |
|
|
|
|
{"name": features[0][i].value[1].keyIns, "lin_color": features[0][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+1]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+1])}, |
|
|
|
|
{"name": features[0][i].value[2].keyIns, "lin_color": features[0][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+2]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+2])}, |
|
|
|
|
{"name": features[0][i].value[3].keyIns, "lin_color": features[0][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+3]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+3])}, |
|
|
|
|
], |
|
|
|
|
"lin_color": features[0][i].value[0].valueIns+features[0][i].value[1].valueIns+features[0][i].value[2].valueIns+features[0][i].value[3].valueIns, |
|
|
|
|
"Corr_pick": Math.round(Object.values(corrGlob1)[i+1]['0'] * 100), |
|
|
|
|
"MI_pick": colorsScaleNodes1([MIVar1[i]].map(normalize(MIMin1, MIMax1))[0]) |
|
|
|
|
"MI_pick": colorsScaleNodes1(MIVar1[i]) |
|
|
|
|
}) |
|
|
|
|
featuresQuad2.push({"name": features[1][i].key, |
|
|
|
|
"children": [ |
|
|
|
|
{"name": features[1][i].value[0].keyIns, "lin_color": features[1][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+0]), "MI_pick":colorsScaleNodes2([this.overallDataTransfMI[1][i*4+0]].map(normalize(MIMin2, MIMax2))[0])}, |
|
|
|
|
{"name": features[1][i].value[1].keyIns, "lin_color": features[1][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+1]), "MI_pick":colorsScaleNodes2([this.overallDataTransfMI[1][i*4+1]].map(normalize(MIMin2, MIMax2))[0])}, |
|
|
|
|
{"name": features[1][i].value[2].keyIns, "lin_color": features[1][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+2]), "MI_pick":colorsScaleNodes2([this.overallDataTransfMI[1][i*4+2]].map(normalize(MIMin2, MIMax2))[0])}, |
|
|
|
|
{"name": features[1][i].value[3].keyIns, "lin_color": features[1][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+3]), "MI_pick":colorsScaleNodes2([this.overallDataTransfMI[1][i*4+3]].map(normalize(MIMin2, MIMax2))[0])}, |
|
|
|
|
{"name": features[1][i].value[0].keyIns, "lin_color": features[1][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+0]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+0])}, |
|
|
|
|
{"name": features[1][i].value[1].keyIns, "lin_color": features[1][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+1]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+1])}, |
|
|
|
|
{"name": features[1][i].value[2].keyIns, "lin_color": features[1][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+2]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+2])}, |
|
|
|
|
{"name": features[1][i].value[3].keyIns, "lin_color": features[1][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+3]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+3])}, |
|
|
|
|
], |
|
|
|
|
"lin_color": features[1][i].value[0].valueIns+features[1][i].value[1].valueIns+features[1][i].value[2].valueIns+features[1][i].value[3].valueIns, |
|
|
|
|
"Corr_pick": Math.round(Object.values(corrGlob2)[i+1]['0'] * 100), |
|
|
|
|
"MI_pick": colorsScaleNodes2([MIVar2[i]].map(normalize(MIMin2, MIMax2))[0]) |
|
|
|
|
"MI_pick": colorsScaleNodes2(MIVar2[i]) |
|
|
|
|
}) |
|
|
|
|
featuresQuad3.push({"name": features[2][i].key, |
|
|
|
|
"children": [ |
|
|
|
|
{"name": features[2][i].value[0].keyIns, "lin_color": features[2][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+0]), "MI_pick":colorsScaleNodes3([this.overallDataTransfMI[2][i*4+0]].map(normalize(MIMin3, MIMax3))[0])}, |
|
|
|
|
{"name": features[2][i].value[1].keyIns, "lin_color": features[2][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+1]), "MI_pick":colorsScaleNodes3([this.overallDataTransfMI[2][i*4+1]].map(normalize(MIMin3, MIMax3))[0])}, |
|
|
|
|
{"name": features[2][i].value[2].keyIns, "lin_color": features[2][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+2]), "MI_pick":colorsScaleNodes3([this.overallDataTransfMI[2][i*4+2]].map(normalize(MIMin3, MIMax3))[0])}, |
|
|
|
|
{"name": features[2][i].value[3].keyIns, "lin_color": features[2][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+3]), "MI_pick":colorsScaleNodes3([this.overallDataTransfMI[2][i*4+3]].map(normalize(MIMin3, MIMax3))[0])}, |
|
|
|
|
{"name": features[2][i].value[0].keyIns, "lin_color": features[2][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+0]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+0])}, |
|
|
|
|
{"name": features[2][i].value[1].keyIns, "lin_color": features[2][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+1]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+1])}, |
|
|
|
|
{"name": features[2][i].value[2].keyIns, "lin_color": features[2][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+2]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+2])}, |
|
|
|
|
{"name": features[2][i].value[3].keyIns, "lin_color": features[2][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+3]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+3])}, |
|
|
|
|
], |
|
|
|
|
"lin_color": features[2][i].value[0].valueIns+features[2][i].value[1].valueIns+features[2][i].value[2].valueIns+features[2][i].value[3].valueIns, |
|
|
|
|
"Corr_pick": Math.round(Object.values(corrGlob3)[i+1]['0'] * 100), |
|
|
|
|
"MI_pick": colorsScaleNodes3([MIVar3[i]].map(normalize(MIMin3, MIMax3))[0]) |
|
|
|
|
"MI_pick": colorsScaleNodes3(MIVar3[i]) |
|
|
|
|
}) |
|
|
|
|
featuresQuad4.push({"name": features[3][i].key, |
|
|
|
|
"children": [ |
|
|
|
|
{"name": features[3][i].value[0].keyIns, "lin_color": features[3][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+0]), "MI_pick":colorsScaleNodes4([this.overallDataTransfMI[3][i*4+0]].map(normalize(MIMin4, MIMax5))[0])}, |
|
|
|
|
{"name": features[3][i].value[1].keyIns, "lin_color": features[3][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+1]), "MI_pick":colorsScaleNodes4([this.overallDataTransfMI[3][i*4+1]].map(normalize(MIMin4, MIMax5))[0])}, |
|
|
|
|
{"name": features[3][i].value[2].keyIns, "lin_color": features[3][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+2]), "MI_pick":colorsScaleNodes4([this.overallDataTransfMI[3][i*4+2]].map(normalize(MIMin4, MIMax5))[0])}, |
|
|
|
|
{"name": features[3][i].value[3].keyIns, "lin_color": features[3][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+3]), "MI_pick":colorsScaleNodes4([this.overallDataTransfMI[3][i*4+3]].map(normalize(MIMin4, MIMax5))[0])}, |
|
|
|
|
{"name": features[3][i].value[0].keyIns, "lin_color": features[3][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+0]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+0])}, |
|
|
|
|
{"name": features[3][i].value[1].keyIns, "lin_color": features[3][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+1]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+1])}, |
|
|
|
|
{"name": features[3][i].value[2].keyIns, "lin_color": features[3][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+2]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+2])}, |
|
|
|
|
{"name": features[3][i].value[3].keyIns, "lin_color": features[3][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+3]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+3])}, |
|
|
|
|
], |
|
|
|
|
"lin_color": features[3][i].value[0].valueIns+features[3][i].value[1].valueIns+features[3][i].value[2].valueIns+features[3][i].value[3].valueIns, |
|
|
|
|
"Corr_pick": Math.round(Object.values(corrGlob4)[i+1]['0'] * 100), |
|
|
|
|
"MI_pick": colorsScaleNodes4([MIVar4[i]].map(normalize(MIMin4, MIMax4))[0]) |
|
|
|
|
"MI_pick": colorsScaleNodes4(MIVar4[i]) |
|
|
|
|
}) |
|
|
|
|
featuresQuad5.push({"name": features[4][i].key, |
|
|
|
|
"children": [ |
|
|
|
|
{"name": features[4][i].value[0].keyIns, "lin_color": features[4][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+0]), "MI_pick":colorsScaleNodes5([this.overallDataTransfMI[4][i*4+0]].map(normalize(MIMin5, MIMax5))[0])}, |
|
|
|
|
{"name": features[4][i].value[1].keyIns, "lin_color": features[4][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+1]), "MI_pick":colorsScaleNodes5([this.overallDataTransfMI[4][i*4+1]].map(normalize(MIMin5, MIMax5))[0])}, |
|
|
|
|
{"name": features[4][i].value[2].keyIns, "lin_color": features[4][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+2]), "MI_pick":colorsScaleNodes5([this.overallDataTransfMI[4][i*4+2]].map(normalize(MIMin5, MIMax5))[0])}, |
|
|
|
|
{"name": features[4][i].value[3].keyIns, "lin_color": features[4][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+3]), "MI_pick":colorsScaleNodes5([this.overallDataTransfMI[4][i*4+3]].map(normalize(MIMin5, MIMax5))[0])}, |
|
|
|
|
{"name": features[4][i].value[0].keyIns, "lin_color": features[4][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+0]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+0])}, |
|
|
|
|
{"name": features[4][i].value[1].keyIns, "lin_color": features[4][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+1]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+1])}, |
|
|
|
|
{"name": features[4][i].value[2].keyIns, "lin_color": features[4][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+2]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+2])}, |
|
|
|
|
{"name": features[4][i].value[3].keyIns, "lin_color": features[4][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+3]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+3])}, |
|
|
|
|
], |
|
|
|
|
"lin_color": features[4][i].value[0].valueIns+features[4][i].value[1].valueIns+features[4][i].value[2].valueIns+features[4][i].value[3].valueIns, |
|
|
|
|
"Corr_pick": Math.round(Object.values(corrGlob5)[i+1]['0'] * 100), |
|
|
|
|
"MI_pick": colorsScaleNodes5([MIVar5[i]].map(normalize(MIMin5, MIMax5))[0]) |
|
|
|
|
"MI_pick": colorsScaleNodes5(MIVar5[i]) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -414,7 +408,7 @@ export default { |
|
|
|
|
.data(nodes, function(d) { |
|
|
|
|
return d.id || (d.id = ++counter); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Enter any new nodes at the parent's previous position |
|
|
|
|
var nodeEnter = node.enter().insert('g', ':first-child') |
|
|
|
|
.attr('class', 'node') |
|
|
|
@ -584,22 +578,21 @@ export default { |
|
|
|
|
var pie = d3v5.pie().sort(null).value(function (d) { |
|
|
|
|
return d.value; |
|
|
|
|
}); |
|
|
|
|
// FIX ROTATION AND FIX COLORS! |
|
|
|
|
|
|
|
|
|
var g = d3v5.select('#overCirc'+index).selectAll('g').data(pieData).enter() |
|
|
|
|
.append('g') |
|
|
|
|
.attr('transform', function(d, i) { |
|
|
|
|
return 'rotate(270)' |
|
|
|
|
return 'rotate(270)' |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
g.selectAll('path').data(function (d) { |
|
|
|
|
console.log(d) |
|
|
|
|
return pie(d); |
|
|
|
|
}).enter().append('path') |
|
|
|
|
.attr('d', function (d) { |
|
|
|
|
return d.data.arc(d); |
|
|
|
|
}).attr('fill', function (d, i) { |
|
|
|
|
|
|
|
|
|
if (i == 0) { |
|
|
|
|
console.log(d.data.object.name) |
|
|
|
|
return d.data.object.MI_pick |
|
|
|
|
} else { |
|
|
|
|
return '#D3D3D3' |
|
|
|
@ -846,6 +839,7 @@ export default { |
|
|
|
|
sendSliceID = 4 |
|
|
|
|
rootID = 1 |
|
|
|
|
} |
|
|
|
|
EventBus.$emit('flagSpace', true) |
|
|
|
|
EventBus.$emit('keepRootFun', rootID) |
|
|
|
|
EventBus.$emit('updateSlice', sendSliceID) |
|
|
|
|
} |
|
|
|
|