added pubgraph
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51167 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
0bb3c51f51
commit
d6afc0d37e
|
@ -16,7 +16,7 @@
|
|||
<div>
|
||||
<div class="uk-text-uppercase uk-text-bold uk-heading-divider">
|
||||
<h2>Publications statistics</h2>
|
||||
<div class="uk-text-small">
|
||||
<div *ngIf="statistics.publications.total" class="uk-text-small">
|
||||
<span>{{statistics.publications.total}} publications from {{statistics.total_projects}} projects.</span><br>
|
||||
<span>{{statistics.publications.open_access}} are OA</span>
|
||||
<span *ngIf="statistics.publications.restricted && statistics.publications.restricted > 0">,
|
||||
|
@ -28,8 +28,26 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="charts.timelines.publications.load && statistics.publications.total > 0">
|
||||
<i-frame [url]=charts.timelines.publications.url width="1000" height="450"></i-frame>
|
||||
<div *ngIf="statistics.publications.total">
|
||||
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect: '#pubTimelines'">
|
||||
<li (click)="charts.timelines.publications.load = true"
|
||||
(toggle)="toggleLoadChart('timelines','publications')">
|
||||
<a href="#">Timeline</a></li>
|
||||
<li (click)="charts['graphs']['pubGraph']['load'] = true"
|
||||
(close)="charts.graphs.pubGraph.load = false"><a href="#">Graph</a></li>
|
||||
</ul>
|
||||
<ul id="pudTimelines" class="uk-switcher uk-margin">
|
||||
<li>
|
||||
<div *ngIf="charts.timelines.publications.load">
|
||||
<i-frame [url]=charts.timelines.publications.url width="1000" height="450"></i-frame>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div *ngIf="charts.graphs.pubGraph.load">
|
||||
<i-frame [url]=charts.graphs.pubGraph.url width="1000" height="450"></i-frame>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div *ngIf="statistics.publications.total == 0" class="uk-alert uk-alert-primary">
|
||||
No publications available
|
||||
|
|
|
@ -92,25 +92,27 @@ export class StatisticsComponent {
|
|||
}
|
||||
private createCharts(){
|
||||
this.charts = {
|
||||
graphs: {
|
||||
pubGraph:
|
||||
{url: 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=50%&h=83%',
|
||||
load:false},
|
||||
dataGraph:
|
||||
{url: 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":"Datasets by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=500&h=600',
|
||||
load: false},
|
||||
softwareGraph:
|
||||
{url: 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=500&h=600',
|
||||
load:false}
|
||||
},
|
||||
timelines: {
|
||||
publications:
|
||||
{url: 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":"Timeline of publications through the years","subtitle":"","xaxistitle":"Year"}&w=70%&h=83%',
|
||||
load:true},
|
||||
pubGraph:
|
||||
{utl: 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":"'+ this.communityId +' publications by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=500&h=600',
|
||||
load:false},
|
||||
datasets:
|
||||
{url: 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":["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":"Research data through the years","subtitle":"","xaxistitle":"Year"}&w=90%&h=83%',
|
||||
load:false},
|
||||
dataGraph:
|
||||
{url: 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":"'+ this.communityId +' datasets by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=500&h=600',
|
||||
load: false},
|
||||
software:
|
||||
{url: 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":["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":"Software through the years","subtitle":"","xaxistitle":"Year"}&w=90%&h=83%',
|
||||
load:false},
|
||||
softwareGraph:
|
||||
{url: 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":"'+ this.communityId +' software by access mode","subtitle":"","xaxistitle":"","nulls":true}&w=500&h=600',
|
||||
load:false}
|
||||
},
|
||||
projectPublications: {
|
||||
columns:
|
||||
|
@ -147,4 +149,9 @@ export class StatisticsComponent {
|
|||
}
|
||||
}
|
||||
|
||||
toggleLoadChart(property: string, subprop: string) {
|
||||
this.charts[property][subprop]['load'] = !this.charts[property][subprop]['load'];
|
||||
console.log(`changed to ${this.charts[property][subprop]['load']}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue