|
|
|
@ -102,7 +102,7 @@ const Diagram = { |
|
|
|
|
return goalsAgainst[teamId]; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
build: (data, eventIndex, metaMatrix, chordMatrix) => { |
|
|
|
|
build: (data, eventIndex, matrix) => { |
|
|
|
|
const svg = d3.select("svg"), |
|
|
|
|
width = +svg.attr("width"), |
|
|
|
|
height = +svg.attr("height"), |
|
|
|
@ -112,14 +112,15 @@ const Diagram = { |
|
|
|
|
|
|
|
|
|
const chords = d3.chord() |
|
|
|
|
.padAngle(0.05) |
|
|
|
|
.call(null, chordMatrix); |
|
|
|
|
.call(null, matrix); |
|
|
|
|
|
|
|
|
|
const sortedChords = Sorter.sort(chords, 0, chords.groups.length - 1, |
|
|
|
|
const sortedChords = chords; |
|
|
|
|
// const sortedChords = Sorter.sort(chords, 0, chords.groups.length - 1,
|
|
|
|
|
// Diagram.getCountryName.bind(null, data, eventIndex),
|
|
|
|
|
// Diagram.getGoalsFor.bind(null, data, eventIndex),
|
|
|
|
|
// Diagram.getGoalsAgainst.bind(null, data, eventIndex),
|
|
|
|
|
Diagram.getPopulation.bind(null, data, eventIndex), |
|
|
|
|
Diagram.swapGroups.bind(null, data, eventIndex)); |
|
|
|
|
// Diagram.getPopulation.bind(null, data, eventIndex),
|
|
|
|
|
// Diagram.swapGroups.bind(null, data, eventIndex));
|
|
|
|
|
|
|
|
|
|
const arc = d3.arc() |
|
|
|
|
.innerRadius(innerRadius) |
|
|
|
@ -196,9 +197,9 @@ const Diagram = { |
|
|
|
|
.text(function(d) { |
|
|
|
|
// STRANGE EXTENDED TIME CHILE-BRAZIL - FIX BY HAND? IS BECAUE se1 IS SCORE __GOING INTO__ EXTENDED TIME
|
|
|
|
|
|
|
|
|
|
const teamId = data.tourneys[eventIndex].teams[d.index]; |
|
|
|
|
const country = data.countries[data.teams[teamId]]; |
|
|
|
|
return data.countries[data.teams[teamId]].n + ' ' + country.p; |
|
|
|
|
const team = data.tourneys[eventIndex].teams[d.index]; |
|
|
|
|
const country = data.countries[team.cId]; |
|
|
|
|
return data.countries[team.cId] + ' ' + team.p; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|