diff --git a/src/app/monitor/monitor.component.html b/src/app/monitor/monitor.component.html
index 93845c8..380a9ab 100644
--- a/src/app/monitor/monitor.component.html
+++ b/src/app/monitor/monitor.component.html
@@ -231,8 +231,7 @@
- If any of the filters cannot be
- applied to a chart, it will appear faded.
+ If your filter selection cannot be applied to a chart, that chart will appear grayed-out.
-
0){
+ return this.queryParams["co-funded"] && this.queryParams["co-funded"]=="co-funded-results";
+ }
+ return false;
}
clearPeriodFilter(){
if(this.periodFilter.selectedFromValue || this.periodFilter.selectedToValue){
@@ -350,7 +364,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
this.activeSubCategory.numbers.forEach((section, i) => {
section.indicators.forEach((number, j) => {
if (number.isActive && this.isPublicOrIsMember(number.isPublic)) {
- let url =this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, number.indicatorPaths[0], this.getfl0(), this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue);
+ let url =this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, number.indicatorPaths[0], this.getfl0(), this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue, this.getCoFunded());
const pair = JSON.stringify([number.indicatorPaths[0].source, url]);
const indexes = urls.get(pair) ? urls.get(pair) : [];
indexes.push([i, j]);
@@ -387,7 +401,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
public getUrlByStakeHolder(indicatorPath: IndicatorPath) {
return this.sanitizer.bypassSecurityTrustResourceUrl(
- this.statisticsService.getChartUrl(indicatorPath.source, this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, indicatorPath, this.getfl0(), this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue)));
+ this.statisticsService.getChartUrl(indicatorPath.source, this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, indicatorPath, this.getfl0(), this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue, this.getCoFunded())));
}
public setActiveChart(i: number, j: number, type: string) {
diff --git a/src/app/utils/indicator-utils.ts b/src/app/utils/indicator-utils.ts
index cbe7070..be61f6c 100644
--- a/src/app/utils/indicator-utils.ts
+++ b/src/app/utils/indicator-utils.ts
@@ -296,7 +296,7 @@ export class IndicatorUtils {
}
return indicatorPath.url + encodeURIComponent(replacedUrl);
}
- public getFullUrlWithFilters(stakeholder:Stakeholder, indicatorPath: IndicatorPath, fundingL0: string = null, startYear: string = null, endYear: string = null, isNumber:boolean=false): string {
+ public getFullUrlWithFilters(stakeholder:Stakeholder, indicatorPath: IndicatorPath, fundingL0: string = null, startYear: string = null, endYear: string = null, coFunded:boolean=false): string {
indicatorPath.filtersApplied = 0;
let replacedUrl = indicatorPath.chartObject?indicatorPath.chartObject:indicatorPath.url;
if (indicatorPath.parameters) {
@@ -342,6 +342,13 @@ export class IndicatorUtils {
indicatorPath.filtersApplied += filterResults.filtersApplied;
}
}
+ if (coFunded ) {
+ if(indicatorPath.source == "stats-tool" && indicatorPath.chartObject) {
+ let filterResults = this.addFilter(replacedUrl, 'co-funded', endYear);
+ replacedUrl = filterResults.url;
+ indicatorPath.filtersApplied += filterResults.filtersApplied;
+ }
+ }
//For numbers
if (replacedUrl.indexOf(ChartHelper.prefix + 'index_id' + ChartHelper.suffix) != -1) {