diff --git a/connect/statistics/communityCharts.ts b/connect/statistics/communityCharts.ts index ace74e88..8a90005f 100644 --- a/connect/statistics/communityCharts.ts +++ b/connect/statistics/communityCharts.ts @@ -69,7 +69,7 @@ export class CommunityCharts { let chartsInfoMap = {}; for (let type of this.types) { chartsInfoMap[type + 'Timeline'] = { - url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart?json=' + StringUtils.URIEncode('{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + this.results[type].name + '","type":"column","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + this.results[type].type + '.year","type":">","values":["2000"]}],"op":"AND"}],"entity":"' + this.results[type].type + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"' + this.results[type].name + '"}},"xAxis":{"title":{"text":"Year"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}')), + url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart?json=' + StringUtils.URIEncode('{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + this.results[type].name + '","type":"column","query":{"name":"rcd.timeline","parameters":["'+communityId+'","' + this.results[type].type + '"]}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"' + this.results[type].name + '"}},"xAxis":{"title":{"text":"Year"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}')), title: StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per year" }; chartsInfoMap[type + 'Graph'] = {