[Connect|Trunk]

Properties files: add new properties
	statisticsFrameNewAPIURL;
	useNewStatistisTool:boolean;
Stats component: use new map created from CommunityCharts class methods
	add a call to community service to get community name



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56148 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-06-21 08:56:52 +00:00
parent 53b95f324b
commit 2388e45c9c
6 changed files with 263 additions and 327 deletions

View File

@ -8,6 +8,8 @@
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
"statisticsFrameNewAPIURL": "",
"useNewStatistisTool":false,
"claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/",
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
"searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources",

View File

@ -15,7 +15,7 @@ const routes: Routes = [
{ path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
// { path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},

View File

@ -381,7 +381,7 @@
<li *ngIf="isEntityEnabled('software')" class="uk-padding">
<div *ngIf="show=='overview'">
<div *ngIf="statistics !=null && activeTab == 'software'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'publication', entityName:
<ng-container *ngTemplateOutlet="stats; context: { entity: 'software', entityName:
'software' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
allowedEntities: statistics.allowedEntitiesMode['showInDashboard'],
allowedCharts:statistics.allowedChartsMode['showInDashboard'], showChartTitle: statistics.chartTitlesMode['showInDashboard'],
@ -415,14 +415,14 @@
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"></ng-container>
</div>
<results-comp [results]=publicationResults [total]=publicationTotal resultType="publication"
<results-comp [results]=publicationResults [total]=publicationTotal resultType="other"
[community]=community [params]=params [showLoading]="showLoading"
[properties]="properties"
class=""></results-comp>
</div>
<div *ngIf="show!='overview'">
<ng-container *ngTemplateOutlet="stats; context: { entity: 'orp', entityName:
'publications' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
'other products' , statisticsSum:statistics.statisticsSum, statisticsDisplay:statistics.statisticsDisplay,
allowedEntities: statistics.allowedEntitiesMode['showInMonitor'],
allowedCharts:statistics.allowedChartsMode['showInMonitor'], showChartTitle: statistics.chartTitlesMode['showInMonitor'],
chartsInfoMap:statistics.chartsInfoMap, showIn:'showInMonitor'}"></ng-container>

View File

@ -113,23 +113,23 @@
<div class="uk-grid">
<div *ngIf="statisticsDisplay.entities[entity].charts.map['timeline'] &&
statisticsDisplay.entities[entity].charts.map['timeline'][currentMode] &&
chartsUrlMap[entity + 'Timeline'] &&
chartsInfoMap[entity + 'Timeline'] &&
(displayedTimeline == (entity + 'Timeline'))">
<iframe [src]=displayedTimelineUrl width="1000" height="450"></iframe>
</div>
<div *ngIf="statisticsDisplay.entities[entity].charts.map['graph'] &&
statisticsDisplay.entities[entity].charts.map['graph'][currentMode] &&
chartsUrlMap[entity + 'Graph'] &&
chartsInfoMap[entity + 'Graph'] &&
(displayedGraph == (entity + 'Graph'))">
<iframe [src]=displayedGraphUrl width="1000" height="450"></iframe>
</div>
</div>
<hr *ngIf="(statisticsDisplay.entities[entity].charts.map['timeline'] &&
statisticsDisplay.entities[entity].charts.map['timeline'][currentMode] &&
chartsUrlMap[entity + 'Timeline'] &&
chartsInfoMap[entity + 'Timeline'] &&
(displayedTimeline == (entity + 'Timeline'))) || (statisticsDisplay.entities[entity].charts.map['graph'] &&
statisticsDisplay.entities[entity].charts.map['graph'][currentMode] &&
chartsUrlMap[entity + 'Graph'] &&
chartsInfoMap[entity + 'Graph'] &&
(displayedGraph == (entity + 'Graph')))">
<div *ngIf="statisticsDisplay.entities[entity].charts.map['projectColumn'][currentMode] ||
@ -142,21 +142,21 @@
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect: '#projectChartTabs'">
<li *ngIf=" statisticsDisplay.entities[entity].charts.map['projectColumn'] &&
statisticsDisplay.entities[entity].charts.map['projectColumn'][currentMode] &&
chartsUrlMap[entity + 'Projectcolumn']"
chartsInfoMap[entity + 'Projectcolumn']"
(click)="changeDisplayedProjectChart(entity + 'Projectcolumn')">
<a href="#">Columns</a>
</li>
<li *ngIf=" statisticsDisplay.entities[entity].charts.map['projectPie'] &&
statisticsDisplay.entities[entity].charts.map['projectPie'][currentMode] &&
chartsUrlMap[entity + 'Projectpie']"
chartsInfoMap[entity + 'Projectpie']"
(click)="changeDisplayedProjectChart(entity + 'Projectpie')">
<a href="#">Pie</a>
</li>
<li *ngIf=" statisticsDisplay.entities[entity].charts.map['projectTable'] &&
statisticsDisplay.entities[entity].charts.map['projectTable'][currentMode] &&
chartsUrlMap[entity + 'Projecttable']"
chartsInfoMap[entity + 'Projecttable']"
(click)="changeDisplayedProjectChart(entity + 'Projecttable')">
<a href="#">Table</a>

View File

@ -1,381 +1,313 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Location, TitleCasePipe} from '@angular/common';
import {Title, Meta} from '@angular/platform-browser';
import {DomSanitizer} from '@angular/platform-browser';
import {Component, Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Location, TitleCasePipe} from '@angular/common';
import {Title, Meta} from '@angular/platform-browser';
import {DomSanitizer} from '@angular/platform-browser';
import "rxjs/add/observable/zip";
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import {StatisticsService} from '../utils/services/statistics.service';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import {StatisticsService} from '../utils/services/statistics.service';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
import {availableCharts, availableEntitiesMap, StatisticsDisplay,
StatisticsSummary
import {
availableCharts, availableEntitiesMap, StatisticsDisplay,
StatisticsSummary
} from "../openaireLibrary/connect/statistics/statisticsEntities";
import {PiwikHelper} from '../utils/piwikHelper';
import {CommunityCharts} from "../openaireLibrary/connect/statistics/communityCharts";
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
@Component({
selector: 'statistics',
templateUrl: 'statistics.component.html',
selector: 'statistics',
templateUrl: 'statistics.component.html',
})
export class StatisticsComponent {
public piwiksub: any;
public pageTitle = "OpenAIRE";
properties:EnvProperties;
properties: EnvProperties;
@Input() communityId = null;
@Input() currentMode = 'showInMonitor';
communityInfo: any = null;
entitiesList: string[] = [];
entitiesMap: Map<string, string> = availableEntitiesMap;
chartCatsList: string[] = availableCharts;
allowedCharts: Map<string, string[]> = new Map<string, string[]>();
allowedEntities: string[] = [];
allowedChartsMode = {showInMonitor: new Map<string, string[]>(), showInDashboard: new Map<string, string[]>()};
allowedEntitiesMode = {showInMonitor: [], showInDashboard: []};
@Input() currentMode = 'showInMonitor';
communityInfo: any = null;
entitiesList: string[] = [];
entitiesMap: Map<string,string> = availableEntitiesMap;
chartCatsList: string[] = availableCharts;
allowedCharts: Map<string,string[]> = new Map<string,string[]>();
allowedEntities: string[] = [];
allowedChartsMode = {showInMonitor:new Map<string,string[]>(), showInDashboard:new Map<string,string[]>()};
allowedEntitiesMode = {showInMonitor:[], showInDashboard:[]};
statisticsSum: StatisticsSummary =null;
statisticsDisplay: StatisticsDisplay = null;
chartsUrlMap: {};
chartTitlesMode = {showInMonitor:{}, showInDashboard:{}};
statisticsSum: StatisticsSummary = null;
statisticsDisplay: StatisticsDisplay = null;
chartTitlesMode = {showInMonitor: {}, showInDashboard: {}};
chartsInfoMap: {};
displayedTimeline: string;
displayedTimelineUrl: string;
displayedGraph: string;
displayedGraphUrl: string;
displayedProjectChart: string;
displayedProjectChartUrl: string;
displayedEntity: string;
public errorCodes:ErrorCodes = new ErrorCodes();
status = null;
constructor (
private route: ActivatedRoute,
private _router: Router,
private location: Location,
private _meta: Meta,
private _title: Title,
private _piwikService:PiwikService,
private _statisticsService: StatisticsService,
private _configService: ConfigurationService,
private titleCase: TitleCasePipe,
private sanitizer: DomSanitizer) {
displayedTimeline: string;
displayedTimelineUrl: string;
displayedGraph: string;
displayedGraphUrl: string;
displayedProjectChart: string;
displayedProjectChartUrl: string;
displayedEntity: string;
public errorCodes: ErrorCodes = new ErrorCodes();
status = null;
communityName = null;
constructor(
private route: ActivatedRoute,
private _router: Router,
private location: Location,
private _meta: Meta,
private _title: Title,
private _piwikService: PiwikService,
private _statisticsService: StatisticsService,
private _configService: ConfigurationService,
private titleCase: TitleCasePipe,
private _communityService: CommunityService,
private sanitizer: DomSanitizer) {
}
public ngOnInit() {
if(this.currentMode == "showInMonitor"){
if (this.currentMode == "showInMonitor") {
var description = "open access, research, scientific publication, European Commission, EC, FP7, ERC, Horizon 2020, H2020, search, projects ";
var title = "Monitor";
this._title.setTitle(title);
this._meta.updateTag({content:description},"name='description'");
this._meta.updateTag({content:description},"property='og:description'");
this._meta.updateTag({content:title},"property='og:title'");
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'");
}
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
var url = data.envSpecific.baseLink+this._router.url;
this._meta.updateTag({content:url},"property='og:url'");
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
var url = data.envSpecific.baseLink + this._router.url;
this._meta.updateTag({content: url}, "property='og:url'");
this.route.queryParams.subscribe(
communityId => {
this.communityId = communityId['communityId'];
if(!this.communityId){
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
}
if(this.currentMode == "showInMonitor" && this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, "Monitor "+ this.communityId, PiwikHelper.siteIDs[this.communityId]).subscribe();
}
// console.log(" Stats! "+ this.properties.statisticsAPIURL);
this.createStatisticsObjects();
});
this.route.queryParams.subscribe(
communityId => {
this.communityId = communityId['communityId'];
if (!this.communityId) {
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
}
if (this.currentMode == "showInMonitor" && this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, "Monitor " + this.communityId, PiwikHelper.siteIDs[this.communityId]).subscribe();
}
this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
community => {
if (typeof document !== 'undefined') {
HelperFunctions.scroll();
}
this.communityName = community.shortTitle;
this.createStatisticsObjects();
});
// console.log(" Stats! "+ this.properties.statisticsAPIURL);
});
});
}
public ngOnDestroy() {
if(this.piwiksub){
if (this.piwiksub) {
this.piwiksub.unsubscribe();
}
}
getCamelCaseString(inputString: string) {
return this.titleCase.transform(inputString);
}
getCamelCaseString(inputString: string) {
return this.titleCase.transform(inputString);
}
createStatisticsObjects() {
// console.log(" Stats! "+ this.properties.statisticsAPIURL);
this.status = this.errorCodes.LOADING;
this._statisticsService.getCommunityStatistics(this.properties,this.communityId).subscribe (
res => {
this.statisticsSum = res;
if(res["other"]){ //hack because in stats API the entity name is "other" while in admin API is "orp". This component uses also "orp" name
this.statisticsSum["orp"]=res["other"];
}
this.getDisplayOptions();
},
error => {
//console.log(error);
this.handleError("Error getting community statistics for community with id: "+this.communityId, error);
this.status = this.errorCodes.ERROR;
});
}
createStatisticsObjects() {
// console.log(" Stats! "+ this.properties.statisticsAPIURL);
this.status = this.errorCodes.LOADING;
this._statisticsService.getCommunityStatistics(this.properties, this.communityId).subscribe(
res => {
this.statisticsSum = res;
if (res["other"]) { //hack because in stats API the entity name is "other" while in admin API is "orp". This component uses also "orp" name
this.statisticsSum["orp"] = res["other"];
}
this.getDisplayOptions();
},
error => {
//console.log(error);
this.handleError("Error getting community statistics for community with id: " + this.communityId, error);
this.status = this.errorCodes.ERROR;
});
}
getDisplayOptions() {
this._statisticsService.getCommunityAdminStatisticsChoices(this.properties,this.communityId)
.subscribe(
res => {
this.statisticsDisplay = res;
this.createChartUrlMap();
this.getCommunityInfo();
this.status = this.errorCodes.DONE;
getDisplayOptions() {
this._statisticsService.getCommunityAdminStatisticsChoices(this.properties, this.communityId)
.subscribe(
res => {
this.statisticsDisplay = res;
this.createChartUrlMap();
this.getCommunityInfo();
this.status = this.errorCodes.DONE;
},
error => {
//console.log(error);
this.handleError("Error getting community statistics choices by administrators for community with id: "+this.communityId, error);
this.status = this.errorCodes.ERROR;
}
);
}
getCommunityInfo() {
// console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
this._configService.getCommunityInformation(this.properties, this.communityId).subscribe(
res => {
this.communityInfo = res;
/*for(let i=0; i<this.communityInfo.entities.length; i++){
if (this.communityInfo.entities[i]["isEnabled"] ) {
this.entitiesList.push(this.communityInfo.entities[i]['pid']);
}
}
console.log(this.entitiesList);*/
},
error => {
//console.log(error)
this.handleError("Error getting community with id: "+this.communityId, error);
},
() => this.initializeDisplayedCharts()
},
error => {
//console.log(error);
this.handleError("Error getting community statistics choices by administrators for community with id: " + this.communityId, error);
this.status = this.errorCodes.ERROR;
}
);
}
}
initializeDisplayedCharts() {
let firstEntity: string;
this.entitiesList = Array.from( this.entitiesMap.keys() );
this.allowedChartsMode[this.currentMode]= this.allowedCharts;
this.allowedEntitiesMode[this.currentMode]=this.allowedEntities;
let titles= [];
// console.log('this.entitiesList is',this.entitiesList);
// console.log(`my current mode is: ${this.currentMode}`);
for (let entity of this.entitiesList) {
if (this.statisticsDisplay.entities[entity] && this.statisticsSum[entity].total && this.communityInfo.entities.filter(x => x['pid'] == entity && x['isEnabled']===true).length ) {
this.allowedChartsMode.showInDashboard[entity]=[];
this.allowedChartsMode.showInMonitor[entity]=[];
for (let chart of this.chartCatsList){
if (this.statisticsSum[entity].total &&
this.statisticsDisplay.entities[entity].charts.map[chart] &&
this.statisticsDisplay.entities[entity].charts.map[chart]["showInDashboard"] &&
this.chartsUrlMap[entity + this.getCamelCaseString(chart)]) {
this.allowedChartsMode.showInDashboard[entity].push(entity + this.getCamelCaseString(chart));
if(titles.indexOf("dashboard"+ this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title)==-1){
titles.push("dashboard"+this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title);
this.chartTitlesMode.showInDashboard[entity + this.getCamelCaseString(chart)]=true;
}else{
this.chartTitlesMode.showInDashboard[entity + this.getCamelCaseString(chart)]=false;
}
getCommunityInfo() {
// console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
this._configService.getCommunityInformation(this.properties, this.communityId).subscribe(
res => {
this.communityInfo = res;
/*for(let i=0; i<this.communityInfo.entities.length; i++){
// console.log(`added ${entity} - ${chart} to allowedCharts`);
}
if (this.statisticsSum[entity].total &&
this.statisticsDisplay.entities[entity].charts.map[chart] &&
this.statisticsDisplay.entities[entity].charts.map[chart]["showInMonitor"] &&
this.chartsUrlMap[entity + this.getCamelCaseString(chart)]) {
this.allowedChartsMode.showInMonitor[entity].push(entity + this.getCamelCaseString(chart));
if(titles.indexOf("monitor"+this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title)==-1){
titles.push("monitor"+this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title);
this.chartTitlesMode.showInMonitor[entity + this.getCamelCaseString(chart)]=true;
}else{
this.chartTitlesMode.showInMonitor[entity + this.getCamelCaseString(chart)]=false;
}
// console.log(`added ${entity} - ${chart} to allowedCharts`);
}
}
if (this.allowedChartsMode.showInMonitor[entity].length) {
// console.log(`added ${entity} to allowedEntities`);
this.allowedEntitiesMode.showInMonitor.push(entity);
if (!firstEntity){
firstEntity = entity;
this.onChangeEntity(entity);
}
}
if (this.allowedChartsMode.showInDashboard[entity].length) {
// console.log(`added ${entity} to allowedEntities`);
this.allowedEntitiesMode.showInDashboard.push(entity);
if (!firstEntity){
firstEntity = entity;
this.onChangeEntity(entity);
}
}
if (this.communityInfo.entities[i]["isEnabled"] ) {
this.entitiesList.push(this.communityInfo.entities[i]['pid']);
}
}
console.log(this.chartTitlesMode)
}
console.log(this.entitiesList);*/
},
error => {
//console.log(error)
this.handleError("Error getting community with id: " + this.communityId, error);
},
() => this.initializeDisplayedCharts()
);
}
createChartUrlMap() {
/*this.chartsUrlMap = {
publicationTimeline : this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&persistent=false&data=com=query&data={"query":"comTimelinePubs","comId":"${this.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":["Publications"],"fieldsheaders":["publications"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Publications through the years","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
publicationGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAPubs","comId":"${this.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":"Publications by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=70%&h=80%`),
publicationProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":["publications"],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Publications per project","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
publicationProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":[""],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Publications per project","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
publicationProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":["Publications"],"fieldsheaders":["Publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`),
datasetTimeline: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineData","comId":"${this.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":["Datasets"],"fieldsheaders":["datasets"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Research data through the years","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
datasetGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAData","comId":"${this.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":"Research data by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=70%&h=70%`),
datasetProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectData","comId":"${this.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":["Datasets"],"fieldsheaders":["datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Research data per project","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
datasetProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectData","comId":"${this.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":[""],"fieldsheaders":["datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Research data per project","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
datasetProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectData","comId":"${this.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":["Datasets"],"fieldsheaders":["Datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`),
softwareTimeline: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineSoft","comId":"${this.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":["Software"],"fieldsheaders":["software"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Software through the years","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
softwareGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOASoft","comId":"${this.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":"Software by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=70%&h=70%`),
softwareProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":["Software"],"fieldsheaders":["software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Software per project","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
softwareProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":[""],"fieldsheaders":["software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Software per project","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
softwareProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":["Software"],"fieldsheaders":["Software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`),
initializeDisplayedCharts() {
let firstEntity: string;
this.entitiesList = Array.from(this.entitiesMap.keys());
orpTimeline: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Other Research products through the years","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
orpGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAOther","comId":"${this.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":"Other Research products by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=70%&h=70%`),
orpProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Other Research products per project","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
orpProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectOther","comId":"${this.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":[""],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Other Research products per project","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
orpProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`)
};*/
this.allowedChartsMode[this.currentMode] = this.allowedCharts;
this.allowedEntitiesMode[this.currentMode] = this.allowedEntities;
let titles = [];
// console.log('this.entitiesList is',this.entitiesList);
// console.log(`my current mode is: ${this.currentMode}`);
for (let entity of this.entitiesList) {
if (this.statisticsDisplay.entities[entity] && this.statisticsSum[entity].total && this.communityInfo.entities.filter(x => x['pid'] == entity && x['isEnabled'] === true).length) {
this.allowedChartsMode.showInDashboard[entity] = [];
this.allowedChartsMode.showInMonitor[entity] = [];
for (let chart of this.chartCatsList) {
if (this.statisticsSum[entity].total &&
this.statisticsDisplay.entities[entity].charts.map[chart] &&
this.statisticsDisplay.entities[entity].charts.map[chart]["showInDashboard"] &&
this.chartsInfoMap[entity + this.getCamelCaseString(chart)].url) {
this.allowedChartsMode.showInDashboard[entity].push(entity + this.getCamelCaseString(chart));
if (titles.indexOf("dashboard" + this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title) == -1) {
titles.push("dashboard" + this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title);
this.chartTitlesMode.showInDashboard[entity + this.getCamelCaseString(chart)] = true;
} else {
this.chartTitlesMode.showInDashboard[entity + this.getCamelCaseString(chart)] = false;
}
this.chartsInfoMap = {
publicationTimeline : {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&persistent=false&data=com=query&data={"query":"comTimelinePubs","comId":"${this.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":["Publications"],"fieldsheaders":["publications"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`), title:"How many publications are there per year?"},
publicationGraph: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAPubs","comId":"${this.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=70%&h=80%`), title:"What access rights do the publications have?",},
publicationProjectcolumn: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":["publications"],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"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 publications are there per project?",},
publicationProjectpie: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":[""],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`), title:"How many publications are there per project?",},
publicationProjecttable: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":["Publications"],"fieldsheaders":["Publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`), title:"How many publications are there per project?",},
datasetTimeline: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineData","comId":"${this.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":["Datasets"],"fieldsheaders":["datasets"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`), title:"How many research data are there per year?"},
datasetGraph: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAData","comId":"${this.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=70%&h=70%`), title:"What access rights do the research data have?"},
datasetProjectcolumn: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectData","comId":"${this.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":["Datasets"],"fieldsheaders":["datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"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 research data are there per project?"},
datasetProjectpie: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectData","comId":"${this.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":[""],"fieldsheaders":["datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Research data per project","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`), title:"How many research data are there per project?"},
datasetProjecttable: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectData","comId":"${this.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":["Datasets"],"fieldsheaders":["Datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`), title:"How many research data are there per project?"},
softwareTimeline: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineSoft","comId":"${this.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":["Software"],"fieldsheaders":["software"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`), title:"How many software are there per year?"},
softwareGraph: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOASoft","comId":"${this.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=70%&h=70%`), title:"What access rights do the software have?"},
softwareProjectcolumn: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":["Software"],"fieldsheaders":["software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"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 software are there per project?"},
softwareProjectpie: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":[""],"fieldsheaders":["software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`), title:"How many software are there per project?"},
softwareProjecttable: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":["Software"],"fieldsheaders":["Software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`), title:"How many software are there per project?"},
orpTimeline: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`), title:"How many other products are there per year?"},
orpGraph: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAOther","comId":"${this.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=70%&h=70%`), title:"What access rights do the other products have?"},
orpProjectcolumn: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"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 other products are there per project?"},
orpProjectpie: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectOther","comId":"${this.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":[""],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`), title:"How many other products are there per project?"},
orpProjecttable: {url: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`), title:"How many other products are there per project?"}
};
this.chartsUrlMap = {
publicationTimeline : this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&persistent=false&data=com=query&data={"query":"comTimelinePubs","comId":"${this.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":["Publications"],"fieldsheaders":["publications"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
publicationGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAPubs","comId":"${this.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=70%&h=80%`),
publicationProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":["publications"],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
publicationProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":[""],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
publicationProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectPubs","comId":"${this.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":["Publications"],"fieldsheaders":["Publications"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`),
datasetTimeline: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineData","comId":"${this.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":["Datasets"],"fieldsheaders":["datasets"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
datasetGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAData","comId":"${this.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=70%&h=70%`),
datasetProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectData","comId":"${this.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":["Datasets"],"fieldsheaders":["datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
datasetProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectData","comId":"${this.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":[""],"fieldsheaders":["datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"Research data per project","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
datasetProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectData","comId":"${this.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":["Datasets"],"fieldsheaders":["Datasets"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`),
softwareTimeline: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineSoft","comId":"${this.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":["Software"],"fieldsheaders":["software"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
softwareGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOASoft","comId":"${this.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=70%&h=70%`),
softwareProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":["Software"],"fieldsheaders":["software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
softwareProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":[""],"fieldsheaders":["software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
softwareProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectSoft","comId":"${this.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":["Software"],"fieldsheaders":["Software"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`),
orpTimeline: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comTimelineOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"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":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%`),
orpGraph: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comOAOther","comId":"${this.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=70%&h=70%`),
orpProjectcolumn: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=70%&h=90%`),
orpProjectpie: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}chart.php?com=query&data={"query":"comProjectOther","comId":"${this.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":[""],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=91%&h=90%`),
orpProjecttable: this.sanitizer.bypassSecurityTrustResourceUrl(`${this.properties.statisticsFrameAPIURL}gtable.php?com=query&data={"query":"comProjectOther","comId":"${this.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":["Other Research products"],"fieldsheaders":["Other Research products"],"in":[],"filters":[{"name":"year","max":"2013","min":"2007","to":-1},{"name":"result_projects-project-funding_lvl0","values":["FP7"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funding_lvl2","values":["ERC"],"to":"-1"}],"having":[],"incfilters":[],"inchaving":[],"title":"","subtitle":"","xaxistitle":"Project"}&w=90%&h=83%`)
};
}
onChangeEntity (entity: string) {
this.displayedEntity = entity;
// console.log(`displayed entity is ${entity}`);
// console.log(`statisticsSum[${entity}].total is ${this.statisticsSum[entity].total}`);
if (this.statisticsSum[entity].total &&
this.allowedEntities.filter(x => x == entity).length ) {
// console.log(`found ${entity} in allowedEntities`);
this.displayedTimeline = `${entity}Timeline`;
this.displayedTimelineUrl = this.chartsUrlMap[this.displayedTimeline];
// console.log(`displayed Timeline is: ${this.displayedTimeline}`);
this.displayedGraph = `${entity}Graph`;
this.displayedGraphUrl = this.chartsUrlMap[this.displayedGraph];
// console.log(`displayed Graph is: ${this.displayedGraph}`);
if (this.allowedCharts[entity]) {
let firstProjectChart = this.allowedCharts[entity].filter( x => x.includes(entity+'Project') );
if (firstProjectChart[0]) {
this.changeDisplayedProjectChart(firstProjectChart[0]);
} else {
this.displayedProjectChart = '';
this.displayedProjectChartUrl = '';
// console.log(`displayed ProjectChart is: ${this.displayedProjectChart}`);
}
// console.log(`added ${entity} - ${chart} to allowedCharts`);
}
} else {
this.displayedTimeline = '';
this.displayedTimelineUrl = '';
// console.log(`displayed Timeline is: ${this.displayedTimeline}`);
this.displayedGraph = '';
this.displayedGraphUrl = '';
// console.log(`displayed Graph is: ${this.displayedGraph}`);
if (this.statisticsSum[entity].total &&
this.statisticsDisplay.entities[entity].charts.map[chart] &&
this.statisticsDisplay.entities[entity].charts.map[chart]["showInMonitor"] &&
this.chartsInfoMap[entity + this.getCamelCaseString(chart)].url) {
this.allowedChartsMode.showInMonitor[entity].push(entity + this.getCamelCaseString(chart));
if (titles.indexOf("monitor" + this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title) == -1) {
titles.push("monitor" + this.chartsInfoMap[entity + this.getCamelCaseString(chart)].title);
this.chartTitlesMode.showInMonitor[entity + this.getCamelCaseString(chart)] = true;
} else {
this.chartTitlesMode.showInMonitor[entity + this.getCamelCaseString(chart)] = false;
}
// console.log(`added ${entity} - ${chart} to allowedCharts`);
}
}
if (this.allowedChartsMode.showInMonitor[entity].length) {
// console.log(`added ${entity} to allowedEntities`);
this.allowedEntitiesMode.showInMonitor.push(entity);
if (!firstEntity) {
firstEntity = entity;
this.onChangeEntity(entity);
}
}
if (this.allowedChartsMode.showInDashboard[entity].length) {
// console.log(`added ${entity} to allowedEntities`);
this.allowedEntitiesMode.showInDashboard.push(entity);
if (!firstEntity) {
firstEntity = entity;
this.onChangeEntity(entity);
}
}
}
}
changeDisplayedProjectChart(chartName: string) {
this.displayedProjectChart = chartName;
this.displayedProjectChartUrl = this.chartsUrlMap[this.displayedProjectChart];
// console.log(`displayed ProjectChart is: ${this.displayedProjectChart}`);
}
}
private handleError(message: string, error) {
console.error("Statistics (Monitor) Page: "+message, error);
createChartUrlMap() {
let communityCharts: CommunityCharts = new CommunityCharts(this.sanitizer);
this.chartsInfoMap = communityCharts.getChartsForCommunity(this.communityId, this.communityName, this.properties);
}
onChangeEntity(entity: string) {
this.displayedEntity = entity;
// console.log(`displayed entity is ${entity}`);
// console.log(`statisticsSum[${entity}].total is ${this.statisticsSum[entity].total}`);
if (this.statisticsSum[entity].total &&
this.allowedEntities.filter(x => x == entity).length) {
// console.log(`found ${entity} in allowedEntities`);
this.displayedTimeline = `${entity}Timeline`;
this.displayedTimelineUrl = this.chartsInfoMap[this.displayedTimeline].url;
// console.log(`displayed Timeline is: ${this.displayedTimeline}`);
this.displayedGraph = `${entity}Graph`;
this.displayedGraphUrl = this.chartsInfoMap[this.displayedGraph].url;
// console.log(`displayed Graph is: ${this.displayedGraph}`);
if (this.allowedCharts[entity]) {
let firstProjectChart = this.allowedCharts[entity].filter(x => x.includes(entity + 'Project'));
if (firstProjectChart[0]) {
this.changeDisplayedProjectChart(firstProjectChart[0]);
} else {
this.displayedProjectChart = '';
this.displayedProjectChartUrl = '';
// console.log(`displayed ProjectChart is: ${this.displayedProjectChart}`);
}
}
} else {
this.displayedTimeline = '';
this.displayedTimelineUrl = '';
// console.log(`displayed Timeline is: ${this.displayedTimeline}`);
this.displayedGraph = '';
this.displayedGraphUrl = '';
// console.log(`displayed Graph is: ${this.displayedGraph}`);
}
}
changeDisplayedProjectChart(chartName: string) {
this.displayedProjectChart = chartName;
this.displayedProjectChartUrl = this.chartsInfoMap[this.displayedProjectChart].url;
// console.log(`displayed ProjectChart is: ${this.displayedProjectChart}`);
}
private handleError(message: string, error) {
console.error("Statistics (Monitor) Page: " + message, error);
}
}
@Component({
selector: 'statistics-for-dashboard',
template:''
// templateUrl: 'statistics-for-dashboard.component.html',
selector: 'statistics-for-dashboard',
template: ''
// templateUrl: 'statistics-for-dashboard.component.html',
})
export class StatisticsForDashboardComponent extends StatisticsComponent {
ngOnInit() {
super.ngOnInit();
}
ngOnInit() {
super.ngOnInit();
}
}

View File

@ -8,6 +8,8 @@
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
"statisticsFrameNewAPIURL": "http://marilyn.athenarc.gr:8080/stats-api/",
"useNewStatistisTool":false,
"claimsAPIURL" : "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
"searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources",