1
|
import {ChartHelper, Indicator, IndicatorPath} from "./entities/stakeholder";
|
2
|
import {Validators} from "@angular/forms";
|
3
|
|
4
|
export interface Option {
|
5
|
icon?: string,
|
6
|
iconClass?: string,
|
7
|
value: any,
|
8
|
label: string
|
9
|
}
|
10
|
|
11
|
export class IndicatorUtils {
|
12
|
|
13
|
chartTypes: Option[] = [
|
14
|
{value: 'pie', label: 'Pie'},
|
15
|
{value: 'table', label: 'Table'},
|
16
|
{value: 'line', label: 'Line'},
|
17
|
{value: 'column', label: 'Column'},
|
18
|
{value: 'bar', label: 'Bar'},
|
19
|
{value: 'other', label: 'Other'}
|
20
|
];
|
21
|
|
22
|
chartSizes: Option[] = [
|
23
|
{value: 'small', label: 'Small'},
|
24
|
{value: 'medium', label: 'Medium'},
|
25
|
{value: 'large', label: 'Large'}
|
26
|
];
|
27
|
|
28
|
isPublic: Option[] = [
|
29
|
{icon: 'public', value: true, label: 'Public'},
|
30
|
{icon: 'lock', value: false, label: 'Private'},
|
31
|
];
|
32
|
|
33
|
isActive: Option[] = [
|
34
|
{icon: 'brightness_1', iconClass: '', value: true, label: 'Active'},
|
35
|
{icon: 'brightness_1', value: false, label: 'Inactive'},
|
36
|
];
|
37
|
|
38
|
chartTypesIcons: Map<string, string> = new Map([
|
39
|
['pie', 'pie_chart'],
|
40
|
['table', 'table_chart'],
|
41
|
['line', 'show_chart'],
|
42
|
['column', 'bar_chart'],
|
43
|
['bar', 'bar_chart'],
|
44
|
['other', 'perm_media']
|
45
|
]);
|
46
|
|
47
|
chartTypesIconsClasses: Map<string, string> = new Map([
|
48
|
['bar', 'rotate-90']
|
49
|
]);
|
50
|
|
51
|
isPublicIcon: Map<boolean, string> = new Map([
|
52
|
[true, 'public'],
|
53
|
[false, 'lock']
|
54
|
]);
|
55
|
|
56
|
isActiveIcon: string = 'brightness_1';
|
57
|
|
58
|
ignoredParameters = ['funder_name'];
|
59
|
|
60
|
parametersValidators: Map<string, any> = new Map<string, any>([
|
61
|
['start_year', [Validators.required, Validators.pattern('^\\d+$')]],
|
62
|
['end_year', [Validators.required, Validators.pattern('^\\d+$')]]
|
63
|
]);
|
64
|
|
65
|
public getFullUrl(indicatorPath: IndicatorPath, fundingL0: string = null, startDate: string = null, endDate: string = null): string {
|
66
|
|
67
|
let replacedUrl = indicatorPath.chartObject;
|
68
|
if (indicatorPath.parameters) {
|
69
|
Object.keys(indicatorPath.parameters).forEach(key => {
|
70
|
let replacedValue = indicatorPath.parameters[key];
|
71
|
if (startDate && key == "start_year" && indicatorPath.filters["start_year"]) {
|
72
|
replacedValue = (replacedValue < startDate) ? startDate : replacedValue;
|
73
|
}
|
74
|
if (endDate && key == "end_year" && indicatorPath.filters["end_year"]) {
|
75
|
replacedValue = (replacedValue > endDate) ? endDate : replacedValue;
|
76
|
}
|
77
|
replacedUrl = replacedUrl.replace(ChartHelper.prefix + key + ChartHelper.suffix, replacedValue);
|
78
|
});
|
79
|
}
|
80
|
if (indicatorPath.chartObject) {
|
81
|
if (fundingL0 && indicatorPath.filters["fundingL0"]) {
|
82
|
let newJsonObject = JSON.parse(replacedUrl);
|
83
|
for (let queries of newJsonObject["chartDescription"]["queries"]) {
|
84
|
if (!queries["query"]["filters"] || queries["query"]["filters"].length == 0) {
|
85
|
queries["query"]["filters"] = [];
|
86
|
}
|
87
|
//TODO check how it works if the query already has a filter
|
88
|
queries["query"]["filters"].push(JSON.parse(indicatorPath.filters["fundingL0"].
|
89
|
replace(ChartHelper.prefix + "fundingL0" + ChartHelper.suffix, fundingL0)));
|
90
|
}
|
91
|
replacedUrl = JSON.stringify(newJsonObject);
|
92
|
}
|
93
|
}
|
94
|
return indicatorPath.url + encodeURIComponent(replacedUrl);
|
95
|
}
|
96
|
|
97
|
generateIndicatorByForm(form: any, indicatorPaths: IndicatorPath[]): Indicator {
|
98
|
let indicator: Indicator = new Indicator(form.name, form.description, 'chart',
|
99
|
form.width, form.isActive, form.isPublic, indicatorPaths);
|
100
|
indicator._id = form.id;
|
101
|
form.indicatorPaths.forEach((indicatorPath, index) => {
|
102
|
indicatorPath.parameters.forEach(parameter => {
|
103
|
indicator.indicatorPaths[index].parameters[parameter.key] = parameter.value;
|
104
|
if(parameter.key === 'type') {
|
105
|
indicator.indicatorPaths[index].type = parameter.value;
|
106
|
}
|
107
|
});
|
108
|
});
|
109
|
return indicator;
|
110
|
}
|
111
|
|
112
|
generateIndicatorByChartUrl(source: string, url: string, type: string = null): IndicatorPath {
|
113
|
let indicatorPath = new IndicatorPath("", source, "", "", []);
|
114
|
if (source === 'stats-tool') {
|
115
|
indicatorPath.url = url.split("json=")[0] + "json=";
|
116
|
indicatorPath.url = indicatorPath.url.split("/")[indicatorPath.url.split("/").length - 1];
|
117
|
indicatorPath.chartObject = decodeURIComponent(url.split("json=")[1]);
|
118
|
let chart = JSON.parse(indicatorPath.chartObject);
|
119
|
indicatorPath.type = this.extractType(chart, indicatorPath);
|
120
|
this.extractTitle(chart, indicatorPath);
|
121
|
this.extractXTitle(chart, indicatorPath);
|
122
|
this.extractYTitle(chart, indicatorPath);
|
123
|
this.extractFunder(chart, indicatorPath);
|
124
|
this.extractStartYear(chart, indicatorPath);
|
125
|
this.extractEndYear(chart, indicatorPath);
|
126
|
indicatorPath.chartObject = JSON.stringify(chart);
|
127
|
this.addResultFilters(chart, indicatorPath);
|
128
|
} else if (source === 'old') {
|
129
|
indicatorPath.url = url.split("data=")[0].split("/stats/")[1] + "data=";
|
130
|
indicatorPath.chartObject = decodeURIComponent(url.split("data=")[1].split("&")[0]);
|
131
|
let chart = JSON.parse(indicatorPath.chartObject);
|
132
|
this.extractOldToolTitle(chart, indicatorPath);
|
133
|
this.extractOldToolXTitle(chart, indicatorPath);
|
134
|
this.extractOldToolYTitle(chart, indicatorPath);
|
135
|
indicatorPath.chartObject = JSON.stringify(chart);
|
136
|
} else {
|
137
|
indicatorPath.url = url;
|
138
|
indicatorPath.type = type;
|
139
|
}
|
140
|
return indicatorPath;
|
141
|
}
|
142
|
|
143
|
private extractType(obj, indicatorPath: IndicatorPath): string {
|
144
|
let defaultTypes = ["column", "bar", "pie"];
|
145
|
let type = obj["chartDescription"]["queries"][0]["type"];
|
146
|
if (defaultTypes.indexOf(type) == -1) {
|
147
|
type = defaultTypes [0];
|
148
|
} else {
|
149
|
obj["chartDescription"]["queries"][0]["type"] = ChartHelper.prefix + "type" + ChartHelper.suffix;
|
150
|
indicatorPath.parameters['type'] = type;
|
151
|
}
|
152
|
return type;
|
153
|
}
|
154
|
|
155
|
private extractFunder(obj, indicatorPath: IndicatorPath) {
|
156
|
let funderName;
|
157
|
for (let query of obj["chartDescription"]["queries"]) {
|
158
|
if (!query["query"]["filters"]) {
|
159
|
return;
|
160
|
}
|
161
|
for (let filter of query["query"]["filters"]) {
|
162
|
if (filter["groupFilters"][0]["field"].indexOf(".funder") != -1) {
|
163
|
funderName = filter["groupFilters"][0]["values"][0];
|
164
|
filter["groupFilters"][0]["values"][0] = ChartHelper.prefix + "funder_name" + ChartHelper.suffix;
|
165
|
indicatorPath.parameters["funder_name"] = funderName;
|
166
|
}
|
167
|
}
|
168
|
}
|
169
|
}
|
170
|
|
171
|
private extractStartYear(obj, indicatorPath: IndicatorPath) {
|
172
|
let start_year;
|
173
|
for (let query of obj["chartDescription"]["queries"]) {
|
174
|
if (!query["query"]["filters"]) {
|
175
|
return;
|
176
|
}
|
177
|
for (let filter of query["query"]["filters"]) {
|
178
|
for (let gfilter of filter["groupFilters"]) {
|
179
|
if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf(">") != -1) {
|
180
|
start_year = gfilter["values"][0];
|
181
|
gfilter["values"][0] = ChartHelper.prefix + "start_year" + ChartHelper.suffix;
|
182
|
indicatorPath.parameters["start_year"] = start_year;
|
183
|
}
|
184
|
}
|
185
|
}
|
186
|
}
|
187
|
}
|
188
|
|
189
|
private extractEndYear(obj, indicatorPath: IndicatorPath) {
|
190
|
let end_year;
|
191
|
for (let query of obj["chartDescription"]["queries"]) {
|
192
|
if (!query["query"]["filters"]) {
|
193
|
return;
|
194
|
}
|
195
|
for (let filter of query["query"]["filters"]) {
|
196
|
for (let gfilter of filter["groupFilters"]) {
|
197
|
if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf("<") != -1) {
|
198
|
end_year = gfilter["values"][0];
|
199
|
gfilter["values"][0] = ChartHelper.prefix + "end_year" + ChartHelper.suffix;
|
200
|
indicatorPath.parameters["end_year"] = end_year;
|
201
|
}
|
202
|
}
|
203
|
}
|
204
|
}
|
205
|
}
|
206
|
|
207
|
private extractTitle(obj, indicatorPath: IndicatorPath) {
|
208
|
let title = "";
|
209
|
if (obj["chartDescription"]["title"]) {
|
210
|
title = obj["chartDescription"]["title"]["text"];
|
211
|
obj["chartDescription"]["title"]["text"] = ChartHelper.prefix + "title" + ChartHelper.suffix;
|
212
|
indicatorPath.parameters["title"] = title;
|
213
|
|
214
|
}
|
215
|
}
|
216
|
|
217
|
private extractXTitle(obj, indicatorPath: IndicatorPath) {
|
218
|
let title = "";
|
219
|
if (obj["chartDescription"]["xAxis"]["title"]) {
|
220
|
title = obj["chartDescription"]["xAxis"]["title"]["text"];
|
221
|
obj["chartDescription"]["xAxis"]["title"]["text"] = ChartHelper.prefix + "xAxisTitle" + ChartHelper.suffix;
|
222
|
indicatorPath.parameters["xAxisTitle"] = title;
|
223
|
}
|
224
|
}
|
225
|
|
226
|
private extractYTitle(obj, indicatorPath: IndicatorPath) {
|
227
|
let title = "";
|
228
|
if (obj["chartDescription"]["yAxis"]["title"]) {
|
229
|
title = obj["chartDescription"]["yAxis"]["title"]["text"];
|
230
|
obj["chartDescription"]["yAxis"]["title"]["text"] = ChartHelper.prefix + "yAxisTitle" + ChartHelper.suffix;
|
231
|
indicatorPath.parameters["yAxisTitle"] = title;
|
232
|
}
|
233
|
}
|
234
|
|
235
|
private addResultFilters(obj, indicatorPath: IndicatorPath) {
|
236
|
let resultTypes = ["publication", "software", "dataset", "other"];
|
237
|
let index = -1;
|
238
|
for (let query of obj["chartDescription"]["queries"]) {
|
239
|
if (!query["query"]["select"]) {
|
240
|
return;
|
241
|
}
|
242
|
for (let select of query["query"]["select"]) {
|
243
|
for (var i = 0; i < resultTypes.length; i++) {
|
244
|
if (select.field.startsWith(resultTypes[i])) {
|
245
|
index = i;
|
246
|
}
|
247
|
}
|
248
|
}
|
249
|
|
250
|
}
|
251
|
if (index != -1) {
|
252
|
indicatorPath.filters = IndicatorPath.createResultFilters(resultTypes[index]);
|
253
|
}
|
254
|
}
|
255
|
|
256
|
|
257
|
private extractOldToolTitle(obj, indicatorPath: IndicatorPath) {
|
258
|
let title = "";
|
259
|
if (obj["title"]) {
|
260
|
title = obj["title"];
|
261
|
obj["title"] = ChartHelper.prefix + "title" + ChartHelper.suffix;
|
262
|
indicatorPath.parameters["title"] = title;
|
263
|
|
264
|
}
|
265
|
}
|
266
|
|
267
|
private extractOldToolXTitle(obj, indicatorPath: IndicatorPath) {
|
268
|
let title = "";
|
269
|
if (obj["xaxistitle"]) {
|
270
|
title = obj["xaxistitle"];
|
271
|
obj["xaxistitle"] = ChartHelper.prefix + "xAxisTitle" + ChartHelper.suffix;
|
272
|
indicatorPath.parameters["xAxisTitle"] = title;
|
273
|
}
|
274
|
}
|
275
|
|
276
|
private extractOldToolYTitle(obj, indicatorPath: IndicatorPath) {
|
277
|
let title = "";
|
278
|
if (obj["fieldsheaders"]) {
|
279
|
title = obj["fieldsheaders"];
|
280
|
obj["fieldsheaders"] = ChartHelper.prefix + "yAxisTitle" + ChartHelper.suffix;
|
281
|
indicatorPath.parameters["yAxisTitle"] = title;
|
282
|
}
|
283
|
}
|
284
|
|
285
|
}
|
286
|
|
287
|
/*
|
288
|
custom query
|
289
|
http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22monitor.ec.publications.datasources%22%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%22Publication%20content%20provider%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Content%20provider%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%3Atrue%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%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%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
|
290
|
|
291
|
query with year filters:
|
292
|
http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22column%22%2C%22query%22%3A%7B%22select%22%3A%5B%7B%22field%22%3A%22publication%22%2C%22aggregate%22%3A%22count%22%7D%2C%7B%22field%22%3A%22publication.year%22%2C%22aggregate%22%3Anull%7D%5D%2C%22filters%22%3A%5B%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22publication.project.funder%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22European%20Commission%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%2C%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22publication.year%22%2C%22type%22%3A%22%3E%3D%22%2C%22values%22%3A%5B%222008%22%5D%7D%2C%7B%22field%22%3A%22publication.year%22%2C%22type%22%3A%22%3C%3D%22%2C%22values%22%3A%5B%222020%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%5D%2C%22entity%22%3A%22publication%22%2C%22profile%22%3A%22OpenAIRE%20All-inclusive%22%2C%22limit%22%3A%220%22%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%22Publications%20timeline%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Year%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%3Atrue%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%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%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
|
293
|
|
294
|
double query
|
295
|
http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22colors%22%3A%5B%22%2342a5f5%22%2C%22%2326a69a%22%2C%22%2390ed7d%22%2C%22%23607d8b%22%2C%22%2300838f%22%2C%22%23689f38%22%2C%22%23e4d354%22%2C%22%232b908f%22%2C%22%23546e7a%22%2C%22%2301579%22%5D%2C%22queries%22%3A%5B%7B%22name%22%3A%22Gold%22%2C%22color%22%3A%22%23f8b500%22%2C%22type%22%3A%22column%22%2C%22query%22%3A%7B%22select%22%3A%5B%7B%22field%22%3A%22result%22%2C%22aggregate%22%3A%22count%22%7D%2C%7B%22field%22%3A%22result.year%22%2C%22aggregate%22%3Anull%7D%5D%2C%22filters%22%3A%5B%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.project.funder%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22European%20Commission%22%5D%7D%2C%7B%22field%22%3A%22result.project.funding%20level%200%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22H2020%22%5D%7D%2C%7B%22field%22%3A%22result.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22publication%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3E%3D%22%2C%22values%22%3A%5B%222014%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3C%3D%22%2C%22values%22%3A%5B%222019%22%5D%7D%2C%7B%22field%22%3A%22result.access%20mode%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Open%20Access%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%2C%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Journal%22%5D%7D%2C%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Journal%20Aggregator%2FPublisher%22%5D%7D%5D%2C%22op%22%3A%22OR%22%7D%5D%2C%22entity%22%3A%22result%22%2C%22profile%22%3A%22OpenAIRE%20original%22%2C%22limit%22%3A%220%22%7D%7D%2C%7B%22name%22%3A%22Green%22%2C%22color%22%3A%22%23239d60%22%2C%22type%22%3A%22column%22%2C%22query%22%3A%7B%22select%22%3A%5B%7B%22field%22%3A%22result%22%2C%22aggregate%22%3A%22count%22%7D%2C%7B%22field%22%3A%22result.year%22%2C%22aggregate%22%3Anull%7D%5D%2C%22filters%22%3A%5B%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.project.funder%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22European%20Commission%22%5D%7D%2C%7B%22field%22%3A%22result.project.funding%20level%200%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22H2020%22%5D%7D%2C%7B%22field%22%3A%22result.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22publication%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3E%3D%22%2C%22values%22%3A%5B%222014%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3C%3D%22%2C%22values%22%3A%5B%222019%22%5D%7D%2C%7B%22field%22%3A%22result.access%20mode%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Open%20Access%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%2C%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Institutional%20Repository%22%5D%7D%2C%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Thematic%20Repository%22%5D%7D%5D%2C%22op%22%3A%22OR%22%7D%5D%2C%22entity%22%3A%22result%22%2C%22profile%22%3A%22OpenAIRE%20original%22%2C%22limit%22%3A%220%22%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%22H2020%20green%20and%20gold%20publications%22%7D%2C%22subtitle%22%3A%7B%22text%22%3A%22over%20time%22%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Year%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%3Atrue%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%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%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
|
296
|
|
297
|
|
298
|
//old tool
|
299
|
https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22bar%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_datasources-datasource-name%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2220%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funding_lvl0%22,%22values%22:[%22H2020%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22},{%22name%22:%22result_datasources-datasource-type%22,%22exvalues%22:[%22Publication%20Catalogue%22]}],%22having%22:[],%22xStyle%22:{%22r%22:%22-%22,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:%22-%22,%22wt%22:%22-%22},%22title%22:%22H2020%20Publications%20by%20datasource%20%28top%2020%29%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22datasource%22,%22order%22:%22d%22}&w=90%
|
300
|
*/
|