[Library|Trunk]

CommunityCharts: update chart titles




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58670 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-05-11 15:17:19 +00:00
parent 88f04e314f
commit fa94d9fc45
1 changed files with 18 additions and 18 deletions

View File

@ -32,28 +32,28 @@ export class CommunityCharts {
this.results[type].chartId + '","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis",' + this.results[type].chartId + '","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis",' +
'"xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[{"f":0,"text":"Yearly"}],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},' '"xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[{"f":0,"text":"Yearly"}],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},'
+ '{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=90%&h=80%'), + '{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=90%&h=80%'),
title: "How many " + this.results[type].name.toLowerCase() + " are there per year?" title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per year"
}; };
chartsInfoMap[type + 'Graph'] = { chartsInfoMap[type + 'Graph'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart.php?com=query&data={"query":"comOA' + this.results[type].chartId + '","comId":"' + communityId + url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart.php?com=query&data={"query":"comOA' + this.results[type].chartId + '","comId":"' + communityId +
'","table":"result","fields":[{"fld":"number","agg":"count","type":"pie","yaxis":1,"c":false}],"xaxis":{"name":"bestlicense","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"order":"d","yaxisheaders":[""],"fieldsheaders":[""],"in":[],"filters":[],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"","nulls":true}&w=80%&h=80%'), '","table":"result","fields":[{"fld":"number","agg":"count","type":"pie","yaxis":1,"c":false}],"xaxis":{"name":"bestlicense","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"order":"d","yaxisheaders":[""],"fieldsheaders":[""],"in":[],"filters":[],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"","nulls":true}&w=80%&h=80%'),
title: "What access rights do the " + this.results[type].name.toLowerCase() + " have?" title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " access rights"
}; };
chartsInfoMap[type + 'Projectcolumn'] = { chartsInfoMap[type + 'Projectcolumn'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart.php?com=query&data={"query":"comProject' + this.results[type].chartId + url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart.php?com=query&data={"query":"comProject' + this.results[type].chartId +
'","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"bar","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=80%'), '","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"bar","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=80%'),
title: "How many " + this.results[type].name.toLowerCase() + " are there per project?", title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per project",
}; };
chartsInfoMap[type + 'Projectpie'] = { chartsInfoMap[type + 'Projectpie'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart.php?com=query&data={"query":"comProject' + this.results[type].chartId + url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart.php?com=query&data={"query":"comProject' + this.results[type].chartId +
'","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"pie","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=85%&h=90%'), '","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"pie","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=85%&h=90%'),
title: "How many " + this.results[type].name.toLowerCase() + " are there per project?", title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per project",
}, },
chartsInfoMap[type + 'Projecttable'] = { chartsInfoMap[type + 'Projecttable'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'gtable.php?com=query&data={"query":"comProject' + this.results[type].chartId + url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'gtable.php?com=query&data={"query":"comProject' + this.results[type].chartId +
'","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"bar","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%'), '","comId":"' + communityId + '","table":"result","fields":[{"fld":"number","agg":"count","type":"bar","yaxis":1,"c":false}],"xaxis":{"name":"year","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"yaxisheaders":["' + this.results[type].name + '"],"fieldsheaders":["' + this.results[type].name + '"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["' + this.results[type].type + '"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%'),
title: "How many " + this.results[type].name.toLowerCase() + " are there per project?", title: " " + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per project",
}; };
if (communityId == "egi") { if (communityId == "egi") {
@ -69,34 +69,34 @@ export class CommunityCharts {
let chartsInfoMap = {}; let chartsInfoMap = {};
for (let type of this.types) { for (let type of this.types) {
chartsInfoMap[type + 'Timeline'] = { chartsInfoMap[type + 'Timeline'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart?json=' + StringUtils.URIEncode('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","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":{"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"}}}')),
title: "How many " + this.results[type].name.toLowerCase() + " are there per year?" title: StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per year"
}; };
chartsInfoMap[type + 'Graph'] = { chartsInfoMap[type + 'Graph'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart?json=' + StringUtils.URIEncode('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"pie","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.access mode","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"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":{}},"xAxis":{"title":{}},"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":"pie","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.access mode","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"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":{}},"xAxis":{"title":{}},"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"}}}')),
title: "What access rights do the " + this.results[type].name.toLowerCase() + " have?" title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " access right"
}; };
chartsInfoMap[type + 'Projectcolumn'] = { chartsInfoMap[type + 'Projectcolumn'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart?json=' + StringUtils.URIEncode('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.project.acronym","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"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":{}},"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":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.project.acronym","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"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":{}},"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"}}}')),
title: "How many " + this.results[type].name.toLowerCase() + " are there per project?", title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase())+ " per project",
}; };
chartsInfoMap[type + 'Projectpie'] = { chartsInfoMap[type + 'Projectpie'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart?json=' + StringUtils.URIEncode('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"pie","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.project.acronym","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"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":{}},"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":"pie","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.project.acronym","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"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":{}},"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"}}}')),
title: "How many " + this.results[type].name.toLowerCase() + " are there per project?", title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per project",
}, },
chartsInfoMap[type + 'Projecttable'] = { chartsInfoMap[type + 'Projecttable'] = {
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'table?json=' + StringUtils.URIEncode('{"library":"GoogleCharts","tableDescription":{"queriesInfo":[{"name":"Data","type":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.project.acronym","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}}],"columns":[],"options":{"hAxis":{},"vAxis":{},"chartArea":{},"series":[],"exporting":true,"pageSize":30,"isStacked":"false"}}}')), url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'table?json=' + StringUtils.URIEncode('{"library":"GoogleCharts","tableDescription":{"queriesInfo":[{"name":"' + this.results[type].name + '","type":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.project.acronym","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}}],"columns":[],"options":{"hAxis":{},"vAxis":{},"chartArea":{},"series":[],"exporting":true,"pageSize":30,"isStacked":"false"}}}')),
title: "How many " + this.results[type].name.toLowerCase() + " are there per project?", title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per project",
}; };
//TODO check again //TODO check again
if (communityId == "egi") { if (communityId == "egi") {
chartsInfoMap[type + 'VOcolumn'] ={ chartsInfoMap[type + 'VOcolumn'] ={
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'chart?json=' + StringUtils.URIEncode('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.concept.name","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.name","type":"=","values":["EGI virtual organizations"]}],"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":{},"subtitle":{},"yAxis":{"title":{"text":"' + this.results[type].name + '"}},"xAxis":{"title":{"text":"Projects"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"vertical"},"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":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.concept.name","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["' + communityName + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.name","type":"=","values":["EGI virtual organizations"]}],"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":{},"subtitle":{},"yAxis":{"title":{"text":"' + this.results[type].name + '"}},"xAxis":{"title":{"text":"Projects"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"vertical"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}')),
title: "How many " + this.results[type].name.toLowerCase() + " are there per EGI virtual organization?", title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per EGI virtual organization",
}; };
chartsInfoMap[type + 'VOtable'] ={ chartsInfoMap[type + 'VOtable'] ={
url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'table?json=' + StringUtils.URIEncode('{"library":"GoogleCharts","tableDescription":{"queriesInfo":[{"name":"Data","type":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.concept.name","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["EGI Federation"]}],"op":"AND"},{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.name","type":"=","values":["EGI virtual organizations"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}}],"columns":[],"options":{"hAxis":{},"vAxis":{},"chartArea":{},"series":[],"exporting":true,"pageSize":30,"isStacked":"false"}}}')), url: this.sanitizer.bypassSecurityTrustResourceUrl(chartsFrameAPIURL + 'table?json=' + StringUtils.URIEncode('{"library":"GoogleCharts","tableDescription":{"queriesInfo":[{"name":"Data","type":"bar","query":{"select":[{"field":"' + this.results[type].type + '","aggregate":"count"},{"field":"' + this.results[type].type + '.concept.name","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.context.name","type":"=","values":["EGI Federation"]}],"op":"AND"},{"groupFilters":[{"field":"' + this.results[type].type + '.concept.category.name","type":"=","values":["EGI virtual organizations"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}}],"columns":[],"options":{"hAxis":{},"vAxis":{},"chartArea":{},"series":[],"exporting":true,"pageSize":30,"isStacked":"false"}}}')),
title: "How many " + this.results[type].name.toLowerCase() + " are there per EGI virtual organization?", title: "" + StringUtils.capitalize(this.results[type].name.toLowerCase()) + " per EGI virtual organization",
}; };
} }