1. Fixed a bug for an edge case in coauthorsip vis
This commit is contained in:
parent
d3af6d949e
commit
ddae9bb311
1 changed files with 9 additions and 8 deletions
|
@ -193,14 +193,17 @@ public class VisualizationCodeGenerator {
|
|||
for (int publicationYear = minPubYearConsidered; publicationYear <= currentYear; publicationYear++) {
|
||||
|
||||
String stringPublishedYear = String.valueOf(publicationYear);
|
||||
Integer currentUniqueCoAuthors = yearToUniqueCoauthors.get(stringPublishedYear).size();
|
||||
|
||||
if (currentUniqueCoAuthors == null) {
|
||||
currentUniqueCoAuthors = 0;
|
||||
Set<Node> currentCoAuthors = yearToUniqueCoauthors.get(stringPublishedYear);
|
||||
|
||||
Integer currentUniqueCoAuthors = null;
|
||||
|
||||
if (currentCoAuthors != null) {
|
||||
currentUniqueCoAuthors = currentCoAuthors.size();
|
||||
allCoAuthorsWithKnownAuthorshipYears.addAll(currentCoAuthors);
|
||||
} else {
|
||||
allCoAuthorsWithKnownAuthorshipYears.addAll(yearToUniqueCoauthors.get(stringPublishedYear));
|
||||
currentUniqueCoAuthors = 0;
|
||||
}
|
||||
|
||||
|
||||
visualizationCode.append("data.setValue("
|
||||
+ uniqueCoAuthorCounter
|
||||
+ ", 0, '"
|
||||
|
@ -212,8 +215,6 @@ public class VisualizationCodeGenerator {
|
|||
+ ", 1, "
|
||||
+ currentUniqueCoAuthors
|
||||
+ ");\n");
|
||||
|
||||
|
||||
uniqueCoAuthorCounter++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue