diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java index d239824d..220cbfb9 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java @@ -71,7 +71,13 @@ public class CoAuthorshipVisCodeGenerator { SparklineData sparklineData = new SparklineData(); int numOfYearsToBeRendered = 0; - int currentYear = Calendar.getInstance().get(Calendar.YEAR); + + /* + * It was decided that to prevent downward curve that happens if there are no publications + * in the current year seems a bit harsh, so we consider only publications from the last 10 + * complete years. + * */ + int currentYear = Calendar.getInstance().get(Calendar.YEAR) - 1; int shortSparkMinYear = currentYear - VisConstants.MINIMUM_YEARS_CONSIDERED_FOR_SPARKLINE + 1; diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIVisCodeGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIVisCodeGenerator.java index 50dddfb9..a3a3a51c 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIVisCodeGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIVisCodeGenerator.java @@ -78,7 +78,13 @@ public class CoPIVisCodeGenerator { SparklineData sparklineData = new SparklineData(); int numOfYearsToBeRendered = 0; - int currentYear = Calendar.getInstance().get(Calendar.YEAR); + + /* + * It was decided that to prevent downward curve that happens if there are no publications + * in the current year seems a bit harsh, so we consider only publications from the last 10 + * complete years. + * */ + int currentYear = Calendar.getInstance().get(Calendar.YEAR) - 1; int shortSparkMinYear = currentYear - VisConstants.MINIMUM_YEARS_CONSIDERED_FOR_SPARKLINE + 1; diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountVisCodeGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountVisCodeGenerator.java index a874655c..bc05ef0e 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountVisCodeGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountVisCodeGenerator.java @@ -72,7 +72,13 @@ public class PersonGrantCountVisCodeGenerator { sparklineData.setYearToActivityCount(yearToGrantCount); int numOfYearsToBeRendered = 0; - int currentYear = Calendar.getInstance().get(Calendar.YEAR); + + /* + * It was decided that to prevent downward curve that happens if there are no publications + * in the current year seems a bit harsh, so we consider only publications from the last 10 + * complete years. + * */ + int currentYear = Calendar.getInstance().get(Calendar.YEAR) - 1; int shortSparkMinYear = currentYear - VisConstants.MINIMUM_YEARS_CONSIDERED_FOR_SPARKLINE + 1; diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/personpubcount/PersonPublicationCountVisCodeGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/personpubcount/PersonPublicationCountVisCodeGenerator.java index 5d9f0c5f..760b16ed 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/personpubcount/PersonPublicationCountVisCodeGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/personpubcount/PersonPublicationCountVisCodeGenerator.java @@ -74,7 +74,13 @@ public class PersonPublicationCountVisCodeGenerator { int numOfYearsToBeRendered = 0; - int currentYear = Calendar.getInstance().get(Calendar.YEAR); + + /* + * It was decided that to prevent downward curve that happens if there are no publications + * in the current year seems a bit harsh, so we consider only publications from the last 10 + * complete years. + * */ + int currentYear = Calendar.getInstance().get(Calendar.YEAR) - 1; int shortSparkMinYear = currentYear - VisConstants.MINIMUM_YEARS_CONSIDERED_FOR_SPARKLINE + 1;