diff --git a/src/app/utils/indicator-utils.ts b/src/app/utils/indicator-utils.ts index a74880f..114155c 100644 --- a/src/app/utils/indicator-utils.ts +++ b/src/app/utils/indicator-utils.ts @@ -323,9 +323,13 @@ export class IndicatorUtils { let replacedValue = indicatorPath.parameters[key]; if (startYear && key == "start_year") { replacedValue = (replacedValue < startYear) ? startYear : replacedValue; + //if there is a parameter that is filtered and the value of the parameter changes, count the filter as applied + indicatorPath.filtersApplied++; } if (endYear && key == "end_year") { replacedValue = (replacedValue > endYear) ? endYear : replacedValue; + //if there is a parameter that is filtered and the value of the parameter changes, count the filter as applied + indicatorPath.filtersApplied++; } if (key == "index_id") { replacedValue = stakeholder.index_id; @@ -336,10 +340,7 @@ export class IndicatorUtils { if (key == "index_shortName") { replacedValue = stakeholder.index_shortName.toLowerCase(); } - //if there is a parameter that is filtered and the value of the parameter changes, count the filter as applied - if(replacedValue !=indicatorPath.parameters[key]){ - indicatorPath.filtersApplied++; - } + replacedUrl = replacedUrl.split(ChartHelper.prefix + key + ChartHelper.suffix).join(replacedValue) }); }