Revision 57732
Added by Stefania Martziou over 4 years ago
modules/open-science-observatory-ui/trunk/src/app/pages/countrypage/country-page.component.html | ||
---|---|---|
3 | 3 |
|
4 | 4 |
<div class="uk-grid uk-grid-small"> |
5 | 5 |
|
6 |
<div class="uk-width-large-4-5 uk-width-medium-3-4">
|
|
6 |
<div class="uk-width-4-5">
|
|
7 | 7 |
|
8 |
<div class="uk-container uk-container-expand uk-margin-medium-top"> |
|
9 |
<div class="uk-text-right"> |
|
10 |
<button class="md-btn md-btn-primary"><i class="fas fa-code uk-margin-small-right"></i>Embed</button> |
|
11 |
<button class="md-btn md-btn-primary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Data catalogues</button> |
|
12 |
<button class="md-btn md-btn-primary uk-margin-left"><i class="fas fa-file-pdf uk-margin-small-right"></i>PDF</button> |
|
13 |
</div> |
|
14 |
</div> |
|
8 | 15 |
|
16 |
<div class="uk-container uk-container-expand uk-margin-top"> |
|
17 |
<!--Overview cards--> |
|
18 |
<div class="uk-width-1-1 indicatorCards"> |
|
19 |
<div class="uk-grid uk-grid-small uk-grid-width-small-1-2 uk-grid-width-medium-1-3 uk-grid-width-large-1-5 uk-margin-top uk-grid-match" data-uk-grid-margin=""> |
|
20 |
<div class="uk-row-first"> |
|
21 |
<div class="md-card"> |
|
22 |
<div class="md-card-content"> |
|
23 |
<div class="uk-margin-top"> |
|
24 |
<div class="uk-float-right uk-margin-small-right"> |
|
25 |
<span class="peity_visitors peity_data" style="display: none;">5,3,9,6,5,9,7</span> |
|
26 |
<svg class="peity" height="28" width="48"><rect data-value="5" fill="#5086BA" x="1.3714285714285717" y="12.444444444444443" width="4.114285714285715" height="15.555555555555557"></rect><rect data-value="3" fill="#5086BA" x="8.228571428571428" y="18.666666666666668" width="4.114285714285716" height="9.333333333333332"></rect><rect data-value="9" fill="#5086BA" x="15.085714285714287" y="0" width="4.1142857142857086" height="28"></rect><rect data-value="6" fill="#5086BA" x="21.942857142857147" y="9.333333333333336" width="4.114285714285707" height="18.666666666666664"></rect><rect data-value="5" fill="#5086BA" x="28.800000000000004" y="12.444444444444443" width="4.114285714285707" height="15.555555555555557"></rect><rect data-value="9" fill="#5086BA" x="35.65714285714286" y="0" width="4.114285714285707" height="28"></rect><rect data-value="7" fill="#5086BA" x="42.51428571428572" y="6.222222222222221" width="4.114285714285707" height="21.77777777777778"></rect></svg> |
|
27 |
</div> |
|
28 |
<h2 class="uk-margin-remove"> |
|
29 |
<span class="number">18,165</span> |
|
30 |
<!--<span *ngIf="overviewData.overview.publications?.oa" class="number">{{overviewData.overview.publications.oa | number}}</span>--> |
|
31 |
<!--<span *ngIf="!overviewData.overview.publications || !overviewData.overview.publications.oa" class="number">--</span>--> |
|
32 |
</h2> |
|
33 |
</div> |
|
34 |
<div class="uk-margin-top"> |
|
35 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
|
36 |
<span class="">Number of OA publications</span> |
|
37 |
</div> |
|
38 |
<div class="uk-margin-top"> |
|
39 |
<span class="number">30%</span> are OA |
|
40 |
</div> |
|
41 |
<!--<div *ngIf="overviewData.overview.publications?.percentage" class="uk-margin-top">--> |
|
42 |
<!--<span class="number">{{overviewData.overview.publications.percentage | number}}%</span> are OA--> |
|
43 |
<!--</div>--> |
|
44 |
</div> |
|
45 |
</div> |
|
46 |
</div> |
|
47 |
<div class=""> |
|
48 |
<div class="md-card"> |
|
49 |
<div class="md-card-content"> |
|
50 |
<div class="uk-margin-top"> |
|
51 |
<div class="uk-float-right uk-margin-small-right"> |
|
52 |
<span class="peity_sale peity_data" style="display: none;">5,3,9,6,5,9,7,3,5,2</span> |
|
53 |
<svg class="peity" height="28" width="64"><polygon fill="#44653D" points="0 27.5 0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5 64 27.5"></polygon><polyline fill="none" points="0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5" stroke="#44653D" stroke-width="1" stroke-linecap="square"></polyline></svg> |
|
54 |
</div> |
|
55 |
<h2 class="uk-margin-remove"> |
|
56 |
<span class="number">12,812</span> |
|
57 |
<!--<span *ngIf="overviewData.overview.datasets?.oa" class="number">{{overviewData.overview.datasets.oa | number}}</span>--> |
|
58 |
<!--<span *ngIf="!overviewData.overview.datasets || !overviewData.overview.datasets.oa" class="number">--</span>--> |
|
59 |
</h2> |
|
60 |
</div> |
|
61 |
<div class="uk-margin-top"> |
|
62 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
|
63 |
<span class="">Number of OA datasets</span> |
|
64 |
</div> |
|
65 |
<div class="uk-margin-top"> |
|
66 |
<span class="number">30%</span> are OA |
|
67 |
</div> |
|
68 |
<!--<div *ngIf="overviewData.overview.datasets?.percentage" class="uk-margin-top">--> |
|
69 |
<!--<span class="number">{{overviewData.overview.datasets.percentage | number}}%</span> are OA--> |
|
70 |
<!--</div>--> |
|
71 |
</div> |
|
72 |
</div> |
|
73 |
</div> |
|
74 |
<div class=""> |
|
75 |
<div class="md-card"> |
|
76 |
<div class="md-card-content"> |
|
77 |
<div class="uk-margin-top"> |
|
78 |
<div class="uk-float-right uk-margin-small-right"> |
|
79 |
<span class="peity_orders peity_data" style="display: none;">64/100</span> |
|
80 |
<svg class="peity" height="24" width="24"><path d="M 12 0 A 12 12 0 1 1 2.7538410866905263 19.649087876984275 L 7.376920543345263 15.824543938492138 A 6 6 0 1 0 12 6" data-value="64" fill="#A33C3C"></path><path d="M 2.7538410866905263 19.649087876984275 A 12 12 0 0 1 11.999999999999998 0 L 11.999999999999998 6 A 6 6 0 0 0 7.376920543345263 15.824543938492138" data-value="36" fill="#eee"></path></svg> |
|
81 |
</div> |
|
82 |
<h2 class="uk-margin-remove"> |
|
83 |
<span class="number">512</span> |
|
84 |
<!--<span *ngIf="overviewData.overview.repositories?.oa" class="number">{{overviewData.overview.repositories.oa | number}}</span>--> |
|
85 |
<!--<span *ngIf="!overviewData.overview.repositories || !overviewData.overview.repositories.oa" class="number">--</span>--> |
|
86 |
</h2> |
|
87 |
</div> |
|
88 |
<div class="uk-margin-top"> |
|
89 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
|
90 |
<span class="">Number of OA repositories</span> |
|
91 |
</div> |
|
92 |
<!--<div *ngIf="overviewData.overview.repositories?.percentage" class="uk-margin-top">--> |
|
93 |
<!--<span class="number">{{overviewData.overview.repositories.percentage | number}}%</span> are OA--> |
|
94 |
<!--</div>--> |
|
95 |
</div> |
|
96 |
</div> |
|
97 |
</div> |
|
98 |
<div class=""> |
|
99 |
<div class="md-card"> |
|
100 |
<div class="md-card-content"> |
|
101 |
<div class="uk-margin-top"> |
|
102 |
<div class="uk-float-right uk-margin-small-right"> |
|
103 |
<span class="peity_sale peity_data" style="display: none;">5,3,9,6,5,9,7,3,5,2</span> |
|
104 |
<svg class="peity" height="28" width="64"><polygon fill="#7056AF" points="0 27.5 0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5 64 27.5"></polygon><polyline fill="none" points="0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5" stroke="#7056AF" stroke-width="1" stroke-linecap="square"></polyline></svg> |
|
105 |
</div> |
|
106 |
<h2 class="uk-margin-remove"> |
|
107 |
<span class="number">1356</span> |
|
108 |
<!--<span *ngIf="overviewData.overview.journals?.oa" class="number">{{overviewData.overview.journals.oa | number}}</span>--> |
|
109 |
<!--<span *ngIf="!overviewData.overview.journals || !overviewData.overview.journals.oa" class="number">--</span>--> |
|
110 |
</h2> |
|
111 |
</div> |
|
112 |
<div class="uk-margin-top"> |
|
113 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
|
114 |
<span class="">Number of OA journals</span> |
|
115 |
</div> |
|
116 |
<!--<div *ngIf="overviewData.overview.journals?.percentage" class="uk-margin-top">--> |
|
117 |
<!--<span class="number">{{overviewData.overview.journals.percentage | number}}%</span> are OA--> |
|
118 |
<!--</div>--> |
|
119 |
</div> |
|
120 |
</div> |
|
121 |
</div> |
|
122 |
<div class=""> |
|
123 |
<div class="md-card"> |
|
124 |
<div class="md-card-content"> |
|
125 |
<div class="uk-margin-top"> |
|
126 |
<div class="uk-float-right uk-margin-small-right"> |
|
127 |
<span class="peity_visitors peity_data" style="display: none;">5,3,9,6,5,9,7</span> |
|
128 |
<svg class="peity" height="28" width="48"><rect data-value="5" fill="#A26C0A" x="1.3714285714285717" y="12.444444444444443" width="4.114285714285715" height="15.555555555555557"></rect><rect data-value="3" fill="#A26C0A" x="8.228571428571428" y="18.666666666666668" width="4.114285714285716" height="9.333333333333332"></rect><rect data-value="9" fill="#A26C0A" x="15.085714285714287" y="0" width="4.1142857142857086" height="28"></rect><rect data-value="6" fill="#A26C0A" x="21.942857142857147" y="9.333333333333336" width="4.114285714285707" height="18.666666666666664"></rect><rect data-value="5" fill="#A26C0A" x="28.800000000000004" y="12.444444444444443" width="4.114285714285707" height="15.555555555555557"></rect><rect data-value="9" fill="#A26C0A" x="35.65714285714286" y="0" width="4.114285714285707" height="28"></rect><rect data-value="7" fill="#A26C0A" x="42.51428571428572" y="6.222222222222221" width="4.114285714285707" height="21.77777777777778"></rect></svg> |
|
129 |
</div> |
|
130 |
<h2 class="uk-margin-remove"> |
|
131 |
<span class="number">798</span> |
|
132 |
<!--<span *ngIf="overviewData.overview.policies?.oa" class="number">{{overviewData.overview.policies.oa | number}}</span>--> |
|
133 |
<!--<span *ngIf="!overviewData.overview.policies || !overviewData.overview.policies.oa" class="number">--</span>--> |
|
134 |
</h2> |
|
135 |
</div> |
|
136 |
<div class="uk-margin-top"> |
|
137 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
|
138 |
<span class="">Number of organizations with OA policies</span> |
|
139 |
</div> |
|
140 |
<!--<div *ngIf="overviewData.overview.policies?.percentage" class="uk-margin-top">--> |
|
141 |
<!--<span class="number">{{overviewData.overview.policies.percentage | number}}%</span> are OA--> |
|
142 |
<!--</div>--> |
|
143 |
</div> |
|
144 |
</div> |
|
145 |
</div> |
|
146 |
</div> |
|
147 |
</div> |
|
148 |
</div> |
|
9 | 149 |
|
10 | 150 |
|
11 | 151 |
</div> |
12 | 152 |
|
13 |
<div class="uk-width-large-1-5 uk-width-medium-1-4">
|
|
153 |
<div class="uk-width-1-5 uk-padding-remove">
|
|
14 | 154 |
<div id="sidebar_main" class="md-card dark-blue-box infoBox uk-sticky" uk-height-viewport="offset-bottom: 0"> |
15 | 155 |
<div class="md-card-content"> |
16 | 156 |
<h3 class="uk-text-center">{{countryName | uppercase}}</h3> |
17 | 157 |
|
18 | 158 |
<div> |
19 |
<!--<app-map-overview></app-map-overview>--> |
|
20 | 159 |
<app-country-map [country]="countryName"></app-country-map> |
21 | 160 |
</div> |
22 | 161 |
|
23 |
<div>This tool allows you to:</div> |
|
24 |
<ul> |
|
25 |
<li> |
|
26 |
better understand the European Open Data landscape |
|
27 |
</li> |
|
28 |
<li> |
|
29 |
find data catalogues and datasets analyse and visualise available metadata |
|
30 |
</li> |
|
31 |
<li> |
|
32 |
find data catalogues and datasets analyse and visualise available metadata |
|
33 |
</li> |
|
34 |
<li> |
|
35 |
access the raw data |
|
36 |
</li> |
|
37 |
</ul> |
|
162 |
<div class="numbers"> |
|
163 |
<div class="uk-margin-medium-top"> |
|
164 |
<div class="number">18,165</div> |
|
165 |
<div class="uk-margin-top">R&D expenditure</div> |
|
166 |
</div> |
|
167 |
<div class="uk-margin-medium-top"> |
|
168 |
<div class="number">327</div> |
|
169 |
<div class="uk-margin-top">funding organizations</div> |
|
170 |
</div> |
|
171 |
<div class="uk-margin-medium-top"> |
|
172 |
<div class="number">18,165</div> |
|
173 |
<div class="uk-margin-top">organizations funded by the European commission since 2013</div> |
|
174 |
</div> |
|
175 |
</div> |
|
176 |
|
|
177 |
<hr class="greyBoldDivider uk-margin-medium-top uk-margin-medium-bottom"> |
|
178 |
|
|
38 | 179 |
<div class="uk-text-center uk-margin-medium-top"> |
39 |
<button class="md-btn md-btn-primary">Learn More</button> |
|
180 |
|
|
181 |
<div class="uk-text-center uk-margin-medium-bottom"> |
|
182 |
<span class="openaire-symbol-wrapper"> |
|
183 |
<img class="" src="https://www.openaire.eu/images/OpenAIRE_branding/Symbol.png" height="30px" width="30px"> |
|
184 |
</span> |
|
185 |
</div> |
|
186 |
<a class="uk-link" href="{{linkToCountryInOpenAIRE}}" target="_blank">Country page in <strong>OpenAIRE</strong><i class="fas fa-long-arrow-alt-right uk-margin-left"></i></a> |
|
40 | 187 |
</div> |
41 | 188 |
</div> |
42 | 189 |
</div> |
modules/open-science-observatory-ui/trunk/src/app/pages/countrypage/country-page.component.ts | ||
---|---|---|
14 | 14 |
|
15 | 15 |
countryName: string; |
16 | 16 |
|
17 |
linkToCountryInOpenAIRE: string; |
|
18 |
|
|
17 | 19 |
// overviewData: OverviewData; |
18 | 20 |
|
19 | 21 |
// countrySelectedName: string = null; |
... | ... | |
24 | 26 |
ngOnInit(): void { |
25 | 27 |
|
26 | 28 |
this.countryName = this.route.snapshot.paramMap.get('countryName'); |
29 |
this.linkToCountryInOpenAIRE = 'https://www.openaire.eu/item/' + this.countryName.replace(' ', '-'); |
|
27 | 30 |
console.log('Country name: ', this.countryName); |
28 | 31 |
// this.dataService.getCountryData('').subscribe( |
29 | 32 |
// overviewData => { |
modules/open-science-observatory-ui/trunk/src/app/pages/countrypage/country-map.component.ts | ||
---|---|---|
60 | 60 |
map: mapWorld, |
61 | 61 |
events: { |
62 | 62 |
load: function() { |
63 |
// this.series[0].data = this.series[0].data.map((el) => { |
|
64 |
// if (countryCodes.includes(el['hc-key'])) { |
|
65 |
// el.color = 'rgba(139,151,167,0.6)'; |
|
66 |
// return el; |
|
67 |
// } |
|
68 |
// return el; |
|
69 |
// }); |
|
70 |
// this.update({ |
|
71 |
// series: [{ |
|
72 |
// data: this.series[0].data as Highcharts.SeriesMapbubbleDataOptions, |
|
73 |
// } as Highcharts.SeriesMapbubbleOptions] |
|
74 |
// }); |
|
75 |
// // this.mapZoom(0.24, 4518.24, -8188.36); |
|
76 |
// this.mapZoom(0.2, this.get('Germany')['x'], this.get('Germany')['y']); |
|
77 |
}, |
|
78 |
// click: event => { |
|
79 |
// if (event.target.hasOwnProperty('point')) { |
|
80 |
// console.log(event.target['point']['name']); |
|
81 |
// // this.countrySelected(event.target['point']['name']); |
|
82 |
// } |
|
83 |
// } |
|
63 |
this.series[0].data = this.series[0].data.map((el) => { |
|
64 |
if ((el.name === countryName)) { |
|
65 |
el.color = 'rgba(139,151,167,0.6)'; |
|
66 |
return el; |
|
67 |
} |
|
68 |
return el; |
|
69 |
}); |
|
70 |
this.update({ |
|
71 |
series: [{ |
|
72 |
data: this.series[0].data as Highcharts.SeriesMapbubbleDataOptions, |
|
73 |
} as Highcharts.SeriesMapbubbleOptions] |
|
74 |
}); |
|
75 |
let x, y; |
|
76 |
for (let i = 0; i < mapCountryData.length; i++) { |
|
77 |
if (mapCountryData[i].hasOwnProperty('name')) { |
|
78 |
if (mapCountryData[i]['name'] === countryName) { |
|
79 |
console.log(mapCountryData[i]); |
|
80 |
if (mapCountryData[i].hasOwnProperty('_midX')) { |
|
81 |
x = mapCountryData[i]['_midX']; |
|
82 |
} |
|
83 |
if (mapCountryData[i].hasOwnProperty('_midY')) { |
|
84 |
y = mapCountryData[i]['_midY']; |
|
85 |
} |
|
86 |
break; |
|
87 |
} |
|
88 |
} |
|
89 |
} |
|
90 |
this.mapZoom(0.1, x, y); |
|
91 |
} |
|
84 | 92 |
} |
85 | 93 |
}, |
86 | 94 |
title: { |
87 |
text: 'Highmaps basic demo'
|
|
95 |
text: '' |
|
88 | 96 |
}, |
89 |
// subtitle: { |
|
90 |
// text: 'Source map: <a href="http://code.highcharts.com/mapdata/custom/world.js">World, Miller projection, medium resolution</a>' |
|
91 |
// }, |
|
92 |
// mapNavigation: { |
|
93 |
// enabled: true, |
|
94 |
// buttonOptions: { |
|
95 |
// alignTo: 'spacingBox' |
|
96 |
// } |
|
97 |
// }, |
|
98 | 97 |
legend: { |
99 | 98 |
enabled: false |
100 | 99 |
}, |
... | ... | |
102 | 101 |
min: 0 |
103 | 102 |
}, |
104 | 103 |
series: [{ |
105 |
name: 'Countries', |
|
106 |
borderColor: '#fff', |
|
107 |
negativeColor: 'rgba(139,151,167,0.2)', |
|
108 |
enableMouseTracking: false, |
|
109 |
type: 'map' |
|
110 |
}, { |
|
104 |
// name: 'Countries',
|
|
105 |
// borderColor: '#fff',
|
|
106 |
// negativeColor: 'rgba(139,151,167,0.2)',
|
|
107 |
// enableMouseTracking: false,
|
|
108 |
// type: 'map'
|
|
109 |
// }, {
|
|
111 | 110 |
name: 'Random data', |
112 | 111 |
type: 'map', |
113 |
joinBy: ['name', 'country'], |
|
112 |
// joinBy: ['name', 'country'],
|
|
114 | 113 |
data : mapCountryData, |
115 | 114 |
// data: [ |
116 | 115 |
// ['is', 1], |
modules/open-science-observatory-ui/trunk/src/app/pages/home/gauge-chart.component.html | ||
---|---|---|
1 |
<div> |
|
2 |
<highcharts-chart #chart [Highcharts]="Highcharts" |
|
3 |
[options]="gaugeChartOptions" [(update)]="update" |
|
4 |
style="width: 100%; height: 100px; display: block;"> |
|
5 |
</highcharts-chart> |
|
6 |
</div> |
|
7 |
|
modules/open-science-observatory-ui/trunk/src/app/pages/home/home.component.html | ||
---|---|---|
4 | 4 |
|
5 | 5 |
<div class="uk-grid uk-grid-small uk-margin-bottom uk-grid-match" uk-height-viewport="offset-bottom: 25"> |
6 | 6 |
|
7 |
<div class="uk-width-large-4-5 uk-width-medium-3-4">
|
|
7 |
<div class="uk-width-4-5">
|
|
8 | 8 |
|
9 | 9 |
<!--Map Container--> |
10 | 10 |
<app-map-overview *ngIf="overviewData?.countries" (emitSelectedCountry)="countrySelected($event)"></app-map-overview> |
... | ... | |
13 | 13 |
|
14 | 14 |
</div> |
15 | 15 |
|
16 |
<div class="uk-width-large-1-5 uk-width-medium-1-4">
|
|
16 |
<div class="uk-width-1-5">
|
|
17 | 17 |
<div class="md-card dark-blue-box infoBox"> |
18 | 18 |
<div *ngIf="!countrySelectedName" class="md-card-content"> |
19 | 19 |
<h3 class="uk-text-center">OPENAIRE MONITOR OBSERVATORY</h3> |
... | ... | |
40 | 40 |
<h3 class="uk-text-center"><a class="backToOriginalInfoBox uk-float-left" (click)="deselectCountry()"><i class="fas fa-angle-left"></i></a>{{countrySelectedName | uppercase}}</h3> |
41 | 41 |
<div class="numbers"> |
42 | 42 |
<div class="uk-margin-medium-top"> |
43 |
<div class="number">18,165</div> |
|
43 |
<div class="number"> |
|
44 |
<ng-container *ngIf="countrySelectedOverview.repositories?.oa !=null">{{countrySelectedOverview.repositories.oa | number}}</ng-container> |
|
45 |
<ng-container *ngIf="countrySelectedOverview.repositories===null || countrySelectedOverview.repositories.oa===null">--</ng-container> |
|
46 |
</div> |
|
47 |
<div class="uk-margin-top">number of OA repositories</div> |
|
48 |
</div> |
|
49 |
<div class="uk-margin-medium-top"> |
|
50 |
<div class="number"> |
|
51 |
<ng-container *ngIf="countrySelectedOverview.journals?.oa !=null">{{countrySelectedOverview.journals.oa | number}}</ng-container> |
|
52 |
<ng-container *ngIf="countrySelectedOverview.journals===null || countrySelectedOverview.journals.oa===null">--</ng-container> |
|
53 |
</div> |
|
44 | 54 |
<div class="uk-margin-top">number of OA journals</div> |
45 | 55 |
</div> |
46 | 56 |
<div class="uk-margin-medium-top"> |
47 |
<div class="number">327</div> |
|
48 |
<div class="uk-margin-top">number of providers</div> |
|
57 |
<div class="number"> |
|
58 |
<ng-container *ngIf="countrySelectedOverview.policies?.oa !=null">{{countrySelectedOverview.policies.oa | number}}</ng-container> |
|
59 |
<ng-container *ngIf="countrySelectedOverview.policies===null || countrySelectedOverview.policies.oa===null">--</ng-container> |
|
60 |
</div> |
|
61 |
<div class="uk-margin-top">number of organizations with OA policies</div> |
|
49 | 62 |
</div> |
50 | 63 |
</div> |
51 | 64 |
<hr class="greyBoldDivider uk-margin-medium-top uk-margin-medium-bottom"> |
52 | 65 |
<div class="graphs"> |
53 | 66 |
<div class="uk-grid"> |
54 | 67 |
<div class="uk-width-1-2"> |
55 |
<div class="epc_chart" data-percent="65" data-bar-color="#009688"> |
|
56 |
<span class="epc_chart_text"><span class="countUpMe">65</span>%</span> |
|
57 |
<canvas height="220" width="220" style="height: 110px; width: 110px;"></canvas> |
|
58 |
</div> |
|
59 |
<div class="uk-text-center">Open Licences</div> |
|
68 |
<ng-container *ngIf="countrySelectedOverview.publications?.percentage !=null"> |
|
69 |
<app-gauge-chart [chartData]="countrySelectedOverview.publications.percentage" [color]="'#5086BA'"></app-gauge-chart> |
|
70 |
</ng-container> |
|
71 |
<ng-container *ngIf="countrySelectedOverview.publications===null || countrySelectedOverview.publications.percentage===null"> |
|
72 |
<app-gauge-chart [chartData]="0" [color]="'#5086BA'"></app-gauge-chart> |
|
73 |
</ng-container> |
|
74 |
<!--<div class="epc_chart" data-percent="65" data-bar-color="#009688">--> |
|
75 |
<!--<span class="epc_chart_text"><span class="countUpMe">65</span>%</span>--> |
|
76 |
<!--<canvas height="220" width="220" style="height: 110px; width: 110px;"></canvas>--> |
|
77 |
<!--</div>--> |
|
78 |
<div class="uk-text-center">OA publications</div> |
|
60 | 79 |
</div> |
61 | 80 |
<div class="uk-width-1-2"> |
62 |
<div class="epc_chart" data-percent="43" data-bar-color="#009688"> |
|
63 |
<span class="epc_chart_text"><span class="countUpMe">43</span>%</span> |
|
64 |
<canvas height="220" width="220" style="height: 110px; width: 110px;"></canvas> |
|
65 |
</div> |
|
66 |
<div class="uk-text-center">Restricted</div> |
|
81 |
<ng-container *ngIf="countrySelectedOverview.datasets?.percentage !=null"> |
|
82 |
<app-gauge-chart [chartData]="countrySelectedOverview.datasets.percentage" [color]="'#44653D'"></app-gauge-chart> |
|
83 |
</ng-container> |
|
84 |
<ng-container *ngIf="countrySelectedOverview.datasets===null || countrySelectedOverview.datasets.percentage===null"> |
|
85 |
<app-gauge-chart [chartData]="0" [color]="'#44653D'"></app-gauge-chart> |
|
86 |
</ng-container> |
|
87 |
<!--<div class="epc_chart" data-percent="43" data-bar-color="#009688">--> |
|
88 |
<!--<span class="epc_chart_text"><span class="countUpMe">43</span>%</span>--> |
|
89 |
<!--<canvas height="220" width="220" style="height: 110px; width: 110px;"></canvas>--> |
|
90 |
<!--</div>--> |
|
91 |
<div class="uk-text-center">OA datasets</div> |
|
67 | 92 |
</div> |
68 | 93 |
</div> |
69 | 94 |
</div> |
... | ... | |
154 | 179 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
155 | 180 |
<span class="">Number of OA repositories</span> |
156 | 181 |
</div> |
157 |
<div *ngIf="overviewData.overview.repositories?.percentage" class="uk-margin-top">
|
|
158 |
<span class="number">{{overviewData.overview.repositories.percentage | number}}%</span> are OA
|
|
159 |
</div>
|
|
182 |
<!--<div *ngIf="overviewData.overview.repositories?.percentage" class="uk-margin-top">-->
|
|
183 |
<!--<span class="number">{{overviewData.overview.repositories.percentage | number}}%</span> are OA-->
|
|
184 |
<!--</div>-->
|
|
160 | 185 |
</div> |
161 | 186 |
</div> |
162 | 187 |
</div> |
... | ... | |
177 | 202 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
178 | 203 |
<span class="">Number of OA journals</span> |
179 | 204 |
</div> |
180 |
<div *ngIf="overviewData.overview.journals?.percentage" class="uk-margin-top">
|
|
181 |
<span class="number">{{overviewData.overview.journals.percentage | number}}%</span> are OA
|
|
182 |
</div>
|
|
205 |
<!--<div *ngIf="overviewData.overview.journals?.percentage" class="uk-margin-top">-->
|
|
206 |
<!--<span class="number">{{overviewData.overview.journals.percentage | number}}%</span> are OA-->
|
|
207 |
<!--</div>-->
|
|
183 | 208 |
</div> |
184 | 209 |
</div> |
185 | 210 |
</div> |
... | ... | |
198 | 223 |
</div> |
199 | 224 |
<div class="uk-margin-top"> |
200 | 225 |
<!--<span class="uk-text-muted uk-text-small">Number of OA publications</span>--> |
201 |
<span class="">Number of OA policies</span> |
|
226 |
<span class="">Number of organizations with OA policies</span>
|
|
202 | 227 |
</div> |
203 |
<div *ngIf="overviewData.overview.policies?.percentage" class="uk-margin-top">
|
|
204 |
<span class="number">{{overviewData.overview.policies.percentage | number}}%</span> are OA
|
|
205 |
</div>
|
|
228 |
<!--<div *ngIf="overviewData.overview.policies?.percentage" class="uk-margin-top">-->
|
|
229 |
<!--<span class="number">{{overviewData.overview.policies.percentage | number}}%</span> are OA-->
|
|
230 |
<!--</div>-->
|
|
206 | 231 |
</div> |
207 | 232 |
</div> |
208 | 233 |
</div> |
modules/open-science-observatory-ui/trunk/src/app/pages/home/gauge-chart.component.ts | ||
---|---|---|
1 |
import {Component, Input, OnChanges, OnInit, SimpleChanges, ViewEncapsulation} from '@angular/core'; |
|
2 |
|
|
3 |
import * as Highcharts from 'highcharts'; |
|
4 |
import HighchartsMore from 'highcharts/highcharts-more.src.js'; |
|
5 |
import solidGauge from 'highcharts/modules/solid-gauge.js'; |
|
6 |
|
|
7 |
HighchartsMore(Highcharts); |
|
8 |
solidGauge(Highcharts); |
|
9 |
|
|
10 |
@Component({ |
|
11 |
selector: 'app-gauge-chart', |
|
12 |
templateUrl: './gauge-chart.component.html', |
|
13 |
// styleUrls: ['./top-menu.component.css'], |
|
14 |
encapsulation: ViewEncapsulation.None |
|
15 |
}) |
|
16 |
|
|
17 |
export class GaugeChartComponent implements OnInit, OnChanges { |
|
18 |
|
|
19 |
@Input() chartData: number; |
|
20 |
@Input() color: string; |
|
21 |
|
|
22 |
public chartValue = 25; |
|
23 |
|
|
24 |
public update = false; |
|
25 |
|
|
26 |
Highcharts: typeof Highcharts = Highcharts; |
|
27 |
|
|
28 |
// gaugeChartOptions: Highcharts.Options; |
|
29 |
|
|
30 |
public gaugeChartOptions = { |
|
31 |
chart: { |
|
32 |
type: 'solidgauge' |
|
33 |
}, |
|
34 |
|
|
35 |
title: { |
|
36 |
text: '' |
|
37 |
}, |
|
38 |
|
|
39 |
pane: { |
|
40 |
center: ['50%', '85%'], |
|
41 |
size: '140%', |
|
42 |
startAngle: -90, |
|
43 |
endAngle: 90, |
|
44 |
background: { |
|
45 |
backgroundColor: '#fff', |
|
46 |
innerRadius: '60%', |
|
47 |
outerRadius: '100%', |
|
48 |
shape: 'arc' |
|
49 |
} |
|
50 |
}, |
|
51 |
|
|
52 |
tooltip: { |
|
53 |
enabled: true |
|
54 |
}, |
|
55 |
|
|
56 |
credits: { |
|
57 |
enabled: false |
|
58 |
}, |
|
59 |
|
|
60 |
yAxis: { |
|
61 |
stops: [[0.1, '#DF5353'], [0.5, '#DDDF0D'], [0.9, '#55BF3B']], |
|
62 |
min: 0, |
|
63 |
max: 100, |
|
64 |
lineWidth: 0, |
|
65 |
// tickAmount: 6, |
|
66 |
// labels: { |
|
67 |
// y: 16 |
|
68 |
// } |
|
69 |
}, |
|
70 |
|
|
71 |
plotOptions: { |
|
72 |
solidgauge: { |
|
73 |
dataLabels: { |
|
74 |
y: 5, |
|
75 |
borderWidth: 0, |
|
76 |
useHTML: true |
|
77 |
} |
|
78 |
} |
|
79 |
}, |
|
80 |
|
|
81 |
series: [ |
|
82 |
{ |
|
83 |
name: 'Speed', |
|
84 |
data: [this.chartValue], |
|
85 |
dataLabels: { |
|
86 |
allowOverlap: true, |
|
87 |
format: |
|
88 |
'<div style="text-align:center"><span style="font-size:20px;color:black' + |
|
89 |
'">{y:.0f}%</span><br/>' + |
|
90 |
'<span style="font-size:12px;color:silver"> </span></div>' |
|
91 |
} |
|
92 |
} |
|
93 |
] |
|
94 |
}; |
|
95 |
|
|
96 |
constructor() {} |
|
97 |
|
|
98 |
private updateChart(value) { |
|
99 |
this.chartValue = value; |
|
100 |
|
|
101 |
// first try - working without transition |
|
102 |
// this.gaugeChartOptions.title.text = value; |
|
103 |
this.gaugeChartOptions.series['0'].data[0] = value; |
|
104 |
// this.gaugeChartOptions.series['0'].update(); |
|
105 |
this.update = true; |
|
106 |
} |
|
107 |
|
|
108 |
ngOnInit(): void { |
|
109 |
// console.log('onInit'); |
|
110 |
this.updateChart(this.chartData); |
|
111 |
} |
|
112 |
|
|
113 |
ngOnChanges(changes: SimpleChanges): void { |
|
114 |
// console.log('onChanges'); |
|
115 |
// console.log('Chart data: ', this.chartData); |
|
116 |
this.updateChart(this.chartData); |
|
117 |
} |
|
118 |
|
|
119 |
} |
modules/open-science-observatory-ui/trunk/src/app/pages/home/home.component.ts | ||
---|---|---|
1 | 1 |
import { Component, DoCheck, OnInit, ViewEncapsulation } from '@angular/core'; |
2 | 2 |
import { DataService } from '../../services/data.service'; |
3 |
import { OverviewData } from '../../domain/overview-data'; |
|
3 |
import { CountryOverview, OverviewData } from '../../domain/overview-data';
|
|
4 | 4 |
|
5 | 5 |
@Component({ |
6 | 6 |
selector: 'app-home', |
... | ... | |
14 | 14 |
overviewData: OverviewData; |
15 | 15 |
|
16 | 16 |
countrySelectedName: string = null; |
17 |
countrySelectedOverview: CountryOverview = null; |
|
17 | 18 |
|
18 | 19 |
constructor(private dataService: DataService) { } |
19 | 20 |
|
... | ... | |
29 | 30 |
} |
30 | 31 |
|
31 | 32 |
countrySelected(countryName: string) { |
32 |
console.log('Country selected: ', countryName); |
|
33 |
// console.log('Country selected: ', countryName);
|
|
33 | 34 |
this.countrySelectedName = countryName; |
35 |
this.countrySelectedOverview = this.overviewData.countries.filter(x => x.country === this.countrySelectedName)[0]; |
|
36 |
// console.log('Country selected overview: ', this.countrySelectedOverview); |
|
34 | 37 |
} |
35 | 38 |
|
36 | 39 |
deselectCountry() { |
37 | 40 |
this.countrySelectedName = null; |
41 |
this.countrySelectedOverview = null; |
|
38 | 42 |
} |
39 | 43 |
} |
modules/open-science-observatory-ui/trunk/src/app/app.module.ts | ||
---|---|---|
12 | 12 |
import { CountriesMapOverviewComponent } from './pages/home/countries-map-overview.component'; |
13 | 13 |
import { CountryPageComponent } from './pages/countrypage/country-page.component'; |
14 | 14 |
import { CountryMapComponent } from './pages/countrypage/country-map.component'; |
15 |
import { GaugeChartComponent } from './pages/home/gauge-chart.component'; |
|
15 | 16 |
|
16 | 17 |
@NgModule({ |
17 | 18 |
declarations: [ |
... | ... | |
21 | 22 |
DataViewComponent, |
22 | 23 |
CountriesMapOverviewComponent, |
23 | 24 |
CountryPageComponent, |
24 |
CountryMapComponent |
|
25 |
CountryMapComponent, |
|
26 |
GaugeChartComponent |
|
25 | 27 |
], |
26 | 28 |
imports: [ |
27 | 29 |
BrowserModule, |
modules/open-science-observatory-ui/trunk/src/assets/css/os-observatory-custom.css | ||
---|---|---|
16 | 16 |
max-width: none; |
17 | 17 |
} |
18 | 18 |
|
19 |
.uk-container-center { |
|
20 |
margin-left: auto; |
|
21 |
margin-right: auto; |
|
22 |
} |
|
23 |
|
|
19 | 24 |
#sect-overview, #sect-tabs { |
20 | 25 |
padding: 20px 0; |
21 | 26 |
} |
... | ... | |
79 | 84 |
color: #fff; |
80 | 85 |
} |
81 | 86 |
|
87 |
.dark-blue-box a, .dark-blue-box a:hover, .dark-blue-box a:focus { |
|
88 |
color: #fff; |
|
89 |
} |
|
90 |
|
|
91 |
.openaire-symbol-wrapper { |
|
92 |
background-color: #fff; |
|
93 |
border-radius: 50%; |
|
94 |
padding: 12px 10px 17px 13px; |
|
95 |
} |
|
96 |
|
|
97 |
|
|
82 | 98 |
.infoBox { |
83 | 99 |
font-weight: 300; |
84 | 100 |
font-size: 15px; |
modules/open-science-observatory-ui/trunk/src/index.html | ||
---|---|---|
15 | 15 |
|
16 | 16 |
<!-- uikit --> |
17 | 17 |
<link rel="stylesheet" href="assets/css/uikit.almost-flat.min.css" media="all"> |
18 |
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.2.0/css/uikit.css" />--> |
|
18 |
<!-- UIkit CSS --> |
|
19 |
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.2.3/dist/css/uikit.min.css" />--> |
|
19 | 20 |
|
20 | 21 |
<!-- altair landing page --> |
21 | 22 |
<link rel="stylesheet" href="assets/css/main.css" media="all"> |
Also available in: Unified diff
Functionality for the country box in the home page