Revision 58913
Added by Stefania Martziou almost 4 years ago
continent-overview.component.ts | ||
---|---|---|
5 | 5 |
import { DataHandlerService } from '../../services/data-handler.service'; |
6 | 6 |
import { EuropeData } from '../../domain/overview-map-data'; |
7 | 7 |
import {environment} from '../../../environments/environment'; |
8 |
import {TreemapHighchartsData} from '../../domain/treemap-highcharts-data'; |
|
9 |
import {Tree} from '@angular/router/src/utils/tree'; |
|
8 | 10 |
|
9 | 11 |
@Component({ |
10 | 12 |
selector: 'app-continent-overview', |
... | ... | |
37 | 39 |
otherByDatasourceChartURL: SafeResourceUrl; |
38 | 40 |
otherByOrganizationChartURL: SafeResourceUrl; |
39 | 41 |
|
42 |
publicationsByFunderData: TreemapHighchartsData[]; |
|
43 |
datasetsByFunderData: TreemapHighchartsData[]; |
|
44 |
softwareByFunderData: TreemapHighchartsData[]; |
|
45 |
otherByFunderData: TreemapHighchartsData[]; |
|
46 |
|
|
40 | 47 |
constructor(private dataService: DataService, |
41 | 48 |
private dataHandlerService: DataHandlerService, |
42 | 49 |
private route: ActivatedRoute, |
... | ... | |
73 | 80 |
this.otherByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + `%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22other%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22new.oso.results.bycountry%22%2C%22parameters%22%3A%5B%22other%22%5D%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22OA%20Other%20research%20products%20by%20country%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22other%20research%20products%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22country%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Afalse%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`); |
74 | 81 |
this.otherByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + `%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22other%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22new.oso.results.bydatasource%22%2C%22parameters%22%3A%5B%22other%22%5D%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22OA%20Other%20research%20products%20by%20datasource%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22other%20research%20products%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22country%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Afalse%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`); |
75 | 82 |
this.otherByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + `%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22other%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22new.oso.results.byorganization%22%2C%22parameters%22%3A%5B%22other%22%5D%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22OA%20Other%20research%20products%20by%20organization%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22other%20research%20products%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22organization%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Afalse%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`); |
83 |
|
|
84 |
this.dataService.getFundersResultsByType('publication').subscribe( |
|
85 |
rawData => { |
|
86 |
this.publicationsByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData); |
|
87 |
}, error => { |
|
88 |
console.log(error); |
|
89 |
} |
|
90 |
); |
|
91 |
|
|
92 |
this.dataService.getFundersResultsByType('dataset').subscribe( |
|
93 |
rawData => { |
|
94 |
this.datasetsByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData); |
|
95 |
}, error => { |
|
96 |
console.log(error); |
|
97 |
} |
|
98 |
); |
|
99 |
|
|
100 |
this.dataService.getFundersResultsByType('software').subscribe( |
|
101 |
rawData => { |
|
102 |
this.softwareByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData); |
|
103 |
}, error => { |
|
104 |
console.log(error); |
|
105 |
} |
|
106 |
); |
|
107 |
|
|
108 |
this.dataService.getFundersResultsByType('other').subscribe( |
|
109 |
rawData => { |
|
110 |
this.otherByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData); |
|
111 |
}, error => { |
|
112 |
console.log(error); |
|
113 |
} |
|
114 |
); |
|
76 | 115 |
} |
77 | 116 |
|
78 | 117 |
getHeight(percentage: number) { |
Also available in: Unified diff
Added treemaps in the home page and in the overview section of the europe page