@agorapulse/ui-charts-map 2.5.0 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agorapulse-ui-charts-map-13.0.2.tgz +0 -0
- package/agorapulse-ui-charts-map.d.ts +1 -0
- package/{esm2015/agorapulse-ui-charts-map.js → esm2020/agorapulse-ui-charts-map.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/esm2020/src/lib/agorapulse-ui-charts-map.module.mjs +31 -0
- package/{esm2015/src/lib/chart-colors.js → esm2020/src/lib/chart-colors.mjs} +0 -0
- package/{esm2015/src/lib/chart-map/chart-map-options.model.js → esm2020/src/lib/chart-map/chart-map-options.model.mjs} +0 -0
- package/esm2020/src/lib/chart-map/chart-map.component.mjs +53 -0
- package/{esm2015/src/lib/chart-options.js → esm2020/src/lib/chart-options.mjs} +0 -0
- package/fesm2015/{agorapulse-ui-charts-map.js → agorapulse-ui-charts-map.mjs} +42 -29
- package/fesm2015/agorapulse-ui-charts-map.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-charts-map.mjs +456 -0
- package/fesm2020/agorapulse-ui-charts-map.mjs.map +1 -0
- package/package.json +25 -13
- package/src/lib/agorapulse-ui-charts-map.module.d.ts +7 -0
- package/src/lib/chart-map/chart-map.component.d.ts +3 -0
- package/agorapulse-ui-charts-map-2.5.0.tgz +0 -0
- package/agorapulse-ui-charts-map.metadata.json +0 -1
- package/bundles/agorapulse-ui-charts-map.umd.js +0 -785
- package/bundles/agorapulse-ui-charts-map.umd.js.map +0 -1
- package/esm2015/src/lib/agorapulse-ui-charts-map.module.js +0 -22
- package/esm2015/src/lib/chart-map/chart-map.component.js +0 -48
- package/fesm2015/agorapulse-ui-charts-map.js.map +0 -1
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ViewChild, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { HighchartsChartModule } from 'highcharts-angular';
|
|
5
|
+
import { mapChart } from 'highcharts/highmaps';
|
|
6
|
+
import geojson from '@highcharts/map-collection/custom/world-highres2.geo.json';
|
|
7
|
+
import { dateFormat } from 'highcharts';
|
|
8
|
+
|
|
9
|
+
var ChartColor;
|
|
10
|
+
(function (ChartColor) {
|
|
11
|
+
ChartColor[ChartColor["Grey"] = 0] = "Grey";
|
|
12
|
+
ChartColor[ChartColor["Orange"] = 1] = "Orange";
|
|
13
|
+
ChartColor[ChartColor["SoftBlue"] = 2] = "SoftBlue";
|
|
14
|
+
ChartColor[ChartColor["ElectricBlue"] = 3] = "ElectricBlue";
|
|
15
|
+
ChartColor[ChartColor["Purple"] = 4] = "Purple";
|
|
16
|
+
ChartColor[ChartColor["Green"] = 5] = "Green";
|
|
17
|
+
})(ChartColor || (ChartColor = {}));
|
|
18
|
+
class ChartColors {
|
|
19
|
+
static getChartColors(color) {
|
|
20
|
+
switch (color) {
|
|
21
|
+
case ChartColor.Orange:
|
|
22
|
+
return this.ORANGE_COLORS;
|
|
23
|
+
case ChartColor.SoftBlue:
|
|
24
|
+
return this.SOFT_BLUE_COLORS;
|
|
25
|
+
case ChartColor.ElectricBlue:
|
|
26
|
+
return this.ELECTRIC_BLUE_COLORS;
|
|
27
|
+
case ChartColor.Purple:
|
|
28
|
+
return this.PURPLE_COLORS;
|
|
29
|
+
case ChartColor.Green:
|
|
30
|
+
return this.GREEN_COLORS;
|
|
31
|
+
default:
|
|
32
|
+
return this.GREY_COLORS;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
static getColors(seriesCount, color) {
|
|
36
|
+
let colors = this.getChartColors(color);
|
|
37
|
+
switch (seriesCount) {
|
|
38
|
+
case 1:
|
|
39
|
+
return [colors[100]];
|
|
40
|
+
case 2:
|
|
41
|
+
return [colors[40], colors[100]];
|
|
42
|
+
case 3:
|
|
43
|
+
return [colors[20], colors[60], colors[100]];
|
|
44
|
+
case 4:
|
|
45
|
+
return [colors[20], colors[40], colors[60], colors[100]];
|
|
46
|
+
case 5:
|
|
47
|
+
return [colors[10], colors[20], colors[40], colors[60], colors[100]];
|
|
48
|
+
default:
|
|
49
|
+
return [colors[20], colors[40], colors[60], colors[100]];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
ChartColors.SOFT_BLUE_COLORS = {
|
|
54
|
+
'10': '#EFF5FC',
|
|
55
|
+
'20': '#DFEDFA',
|
|
56
|
+
'40': '#C0DBF4',
|
|
57
|
+
'60': '#A0C8EF',
|
|
58
|
+
'85': '#78B1E8',
|
|
59
|
+
'100': '#61A4E4'
|
|
60
|
+
};
|
|
61
|
+
ChartColors.ELECTRIC_BLUE_COLORS = {
|
|
62
|
+
'10': '#e8f4ff',
|
|
63
|
+
'20': '#d1e8ff',
|
|
64
|
+
'40': '#a2d1ff',
|
|
65
|
+
'60': '#74bbfe',
|
|
66
|
+
'85': '#3a9efe',
|
|
67
|
+
'100': '#178dfe'
|
|
68
|
+
};
|
|
69
|
+
ChartColors.ORANGE_COLORS = {
|
|
70
|
+
'10': '#FFEFE9',
|
|
71
|
+
'20': '#FFE1D4',
|
|
72
|
+
'40': '#FFC2A8',
|
|
73
|
+
'60': '#FFA47D',
|
|
74
|
+
'85': '#FF7E46',
|
|
75
|
+
'100': '#FF6726'
|
|
76
|
+
};
|
|
77
|
+
ChartColors.GREEN_COLORS = {
|
|
78
|
+
'10': '#ECF7ED',
|
|
79
|
+
'20': '#DAF1DD',
|
|
80
|
+
'40': '#B5E3BB',
|
|
81
|
+
'60': '#8FD498',
|
|
82
|
+
'85': '#61C26D',
|
|
83
|
+
'100': '#45B854'
|
|
84
|
+
};
|
|
85
|
+
ChartColors.PURPLE_COLORS = {
|
|
86
|
+
'10': '#EFEDF8',
|
|
87
|
+
'20': '#E0DDF2',
|
|
88
|
+
'40': '#C1BBE6',
|
|
89
|
+
'60': '#A398D9',
|
|
90
|
+
'85': '#7C6DC9',
|
|
91
|
+
'100': '#6554C0'
|
|
92
|
+
};
|
|
93
|
+
ChartColors.GREY_COLORS = {
|
|
94
|
+
'10': '#EAECEF',
|
|
95
|
+
'20': '#D6DAE0',
|
|
96
|
+
'40': '#AEB5C1',
|
|
97
|
+
'60': '#858FA1',
|
|
98
|
+
'85': '#5D6A82',
|
|
99
|
+
'100': '#344563'
|
|
100
|
+
};
|
|
101
|
+
ChartColors.BLACK_COLOR = '#000000';
|
|
102
|
+
ChartColors.LIMIT_COLOR = '#E81313';
|
|
103
|
+
ChartColors.WHITE_COLOR = '#FFFFFF';
|
|
104
|
+
|
|
105
|
+
class ChartOptions {
|
|
106
|
+
static build(options) {
|
|
107
|
+
return mergeDeep(ChartOptions.DEFAULT_OPTIONS, options);
|
|
108
|
+
}
|
|
109
|
+
static configure(series, options, color, labelDateFormat) {
|
|
110
|
+
// Configure axis
|
|
111
|
+
options.xAxis = mergeDeep({
|
|
112
|
+
labels: {
|
|
113
|
+
formatter: function () {
|
|
114
|
+
return dateFormat(labelDateFormat ? labelDateFormat : '%m/%d', this.value);
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
//minTickInterval: 24 * 60 * 60 * 1000 // One day
|
|
118
|
+
}, options.xAxis);
|
|
119
|
+
// Configure series
|
|
120
|
+
if (series && series.length) {
|
|
121
|
+
options.series = series;
|
|
122
|
+
options.legend.enabled = series.length >= 2;
|
|
123
|
+
options.colors = ChartColors.getColors(series.length, color);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
ChartOptions.DEFAULT_DATE_FORMAT = '%A, %b %e, %Y';
|
|
128
|
+
ChartOptions.DEFAULT_OPTIONS = {
|
|
129
|
+
/*lang: {
|
|
130
|
+
decimalPoint: (manager && manager.locale !== 'en') ? ',' : '.',
|
|
131
|
+
resetZoom: resetZoomLabel,
|
|
132
|
+
resetZoomTitle: resetZoomHtmlTitle,
|
|
133
|
+
shortMonths: [
|
|
134
|
+
shortJanuary, shortFebruary, shortMarch, shortApril, shortMay, shortJune,
|
|
135
|
+
shortJuly, shortAugust, shortSeptember, shortOctober, shortNovember, shortDecember
|
|
136
|
+
],
|
|
137
|
+
thousandsSep: (manager && manager.locale !== 'en') ? ' ' : ',',
|
|
138
|
+
weekdays: this.weekDays,
|
|
139
|
+
zoomIn: zoomInHtmlTitle,
|
|
140
|
+
zoomOut: zoomOutHtmlTitle
|
|
141
|
+
},*/
|
|
142
|
+
chart: {
|
|
143
|
+
spacingRight: 20,
|
|
144
|
+
zoomType: 'xy',
|
|
145
|
+
panning: {
|
|
146
|
+
enabled: true
|
|
147
|
+
},
|
|
148
|
+
panKey: 'shift',
|
|
149
|
+
style: {
|
|
150
|
+
fontFamily: 'Averta, \'Open Sans\', Helvetica, sans-serif'
|
|
151
|
+
},
|
|
152
|
+
resetZoomButton: {
|
|
153
|
+
theme: {
|
|
154
|
+
fill: ChartColors.WHITE_COLOR,
|
|
155
|
+
r: 4,
|
|
156
|
+
style: {
|
|
157
|
+
color: ChartColors.GREY_COLORS[100],
|
|
158
|
+
fontSize: '12px'
|
|
159
|
+
},
|
|
160
|
+
states: {
|
|
161
|
+
hover: {
|
|
162
|
+
fill: ChartColors.GREY_COLORS[5]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
colorAxis: {
|
|
169
|
+
labels: {
|
|
170
|
+
style: {
|
|
171
|
+
color: ChartColors.GREY_COLORS[60]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
credits: {
|
|
176
|
+
enabled: false
|
|
177
|
+
},
|
|
178
|
+
legend: {
|
|
179
|
+
borderWidth: 0,
|
|
180
|
+
itemStyle: {
|
|
181
|
+
color: ChartColors.GREY_COLORS[60],
|
|
182
|
+
fontSize: '14px',
|
|
183
|
+
fontWeight: 'normal'
|
|
184
|
+
},
|
|
185
|
+
itemHoverStyle: {
|
|
186
|
+
color: ChartColors.GREY_COLORS[100],
|
|
187
|
+
fontWeight: 'bold'
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
plotOptions: {
|
|
191
|
+
series: {
|
|
192
|
+
states: {
|
|
193
|
+
hover: {
|
|
194
|
+
brightness: 0
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
connectNulls: true,
|
|
198
|
+
lineWidth: 4
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
navigation: {
|
|
202
|
+
buttonOptions: {
|
|
203
|
+
y: 0
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
title: {
|
|
207
|
+
text: null
|
|
208
|
+
},
|
|
209
|
+
tooltip: {
|
|
210
|
+
backgroundColor: ChartColors.WHITE_COLOR,
|
|
211
|
+
borderRadius: 4,
|
|
212
|
+
borderWidth: 0,
|
|
213
|
+
dateTimeLabelFormats: {
|
|
214
|
+
day: ChartOptions.DEFAULT_DATE_FORMAT,
|
|
215
|
+
week: ChartOptions.DEFAULT_DATE_FORMAT
|
|
216
|
+
},
|
|
217
|
+
shadow: {
|
|
218
|
+
color: ChartColors.BLACK_COLOR,
|
|
219
|
+
offsetX: 0,
|
|
220
|
+
offsetY: 2,
|
|
221
|
+
opacity: 0.02,
|
|
222
|
+
width: 6
|
|
223
|
+
},
|
|
224
|
+
split: false,
|
|
225
|
+
shared: true,
|
|
226
|
+
useHTML: true,
|
|
227
|
+
headerFormat: `<div style="border-bottom: 1px solid ${ChartColors.GREY_COLORS[10]}; padding: 0 8px 7px">`
|
|
228
|
+
+ `<span style="font-size: 12px; color: ${ChartColors.GREY_COLORS[60]}">{point.key}</span></div>`,
|
|
229
|
+
pointFormat: `<div style="font-size: 14px; color: ${ChartColors.GREY_COLORS[100]}; margin: 6px 8px 0 8px;">`
|
|
230
|
+
+ '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y}</b></div>'
|
|
231
|
+
},
|
|
232
|
+
xAxis: {
|
|
233
|
+
gridLineColor: ChartColors.GREY_COLORS[10],
|
|
234
|
+
lineColor: ChartColors.GREY_COLORS[10],
|
|
235
|
+
tickColor: ChartColors.GREY_COLORS[10],
|
|
236
|
+
gridLineWidth: 1,
|
|
237
|
+
title: {
|
|
238
|
+
text: null
|
|
239
|
+
},
|
|
240
|
+
labels: {
|
|
241
|
+
style: {
|
|
242
|
+
color: ChartColors.GREY_COLORS[40],
|
|
243
|
+
fontSize: '12px'
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
yAxis: {
|
|
248
|
+
allowDecimals: false,
|
|
249
|
+
gridLineColor: ChartColors.GREY_COLORS[10],
|
|
250
|
+
lineColor: ChartColors.GREY_COLORS[10],
|
|
251
|
+
gridLineWidth: 1,
|
|
252
|
+
title: {
|
|
253
|
+
text: null
|
|
254
|
+
},
|
|
255
|
+
labels: {
|
|
256
|
+
style: {
|
|
257
|
+
color: ChartColors.GREY_COLORS[40],
|
|
258
|
+
fontSize: '12px'
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
function isObject(item) {
|
|
264
|
+
return (item && typeof item === 'object' && !Array.isArray(item));
|
|
265
|
+
}
|
|
266
|
+
function mergeDeep(target, source) {
|
|
267
|
+
let output = deepCopy(target);
|
|
268
|
+
if (isObject(target) && isObject(source)) {
|
|
269
|
+
Object.keys(source).forEach(key => {
|
|
270
|
+
if (isObject(source[key])) {
|
|
271
|
+
if (!(key in target))
|
|
272
|
+
Object.assign(output, { [key]: source[key] });
|
|
273
|
+
else
|
|
274
|
+
output[key] = mergeDeep(target[key], source[key]);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
Object.assign(output, { [key]: source[key] });
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
return output;
|
|
282
|
+
}
|
|
283
|
+
function deepCopy(source) {
|
|
284
|
+
if (typeof source !== "object" || source === null) {
|
|
285
|
+
return source; // Return the value if source is not an object
|
|
286
|
+
}
|
|
287
|
+
// Create an array or object to hold the values
|
|
288
|
+
const newObject = Array.isArray(source) ? [] : {};
|
|
289
|
+
for (let key in source) {
|
|
290
|
+
if (source.hasOwnProperty(key)) {
|
|
291
|
+
// Recursively (deep) copy for nested objects, including arrays
|
|
292
|
+
newObject[key] = deepCopy(source[key]);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return newObject;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
class ChartMapOptions extends ChartOptions {
|
|
299
|
+
static build(options) {
|
|
300
|
+
const defaultMapOptions = {
|
|
301
|
+
chart: {
|
|
302
|
+
height: 450,
|
|
303
|
+
map: geojson
|
|
304
|
+
},
|
|
305
|
+
colorAxis: {
|
|
306
|
+
allowDecimals: false,
|
|
307
|
+
gridLineWidth: 2,
|
|
308
|
+
gridLineColor: ChartColors.WHITE_COLOR,
|
|
309
|
+
min: 0,
|
|
310
|
+
tickAmount: 6,
|
|
311
|
+
labels: {
|
|
312
|
+
style: {
|
|
313
|
+
fontSize: '12px'
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
minColor: ChartColors.SOFT_BLUE_COLORS[20],
|
|
317
|
+
maxColor: ChartColors.SOFT_BLUE_COLORS[100]
|
|
318
|
+
},
|
|
319
|
+
legend: {
|
|
320
|
+
align: 'left',
|
|
321
|
+
floating: true,
|
|
322
|
+
},
|
|
323
|
+
mapNavigation: {
|
|
324
|
+
enabled: true,
|
|
325
|
+
enableMouseWheelZoom: false,
|
|
326
|
+
buttonOptions: {
|
|
327
|
+
verticalAlign: 'middle',
|
|
328
|
+
style: {
|
|
329
|
+
color: ChartColors.GREY_COLORS[100],
|
|
330
|
+
fontSize: '16px',
|
|
331
|
+
fontWeight: 'normal',
|
|
332
|
+
},
|
|
333
|
+
theme: {
|
|
334
|
+
fill: ChartColors.WHITE_COLOR,
|
|
335
|
+
r: 4,
|
|
336
|
+
states: {
|
|
337
|
+
hover: {
|
|
338
|
+
fill: ChartColors.GREY_COLORS[5],
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
plotOptions: {
|
|
345
|
+
map: {
|
|
346
|
+
borderColor: ChartColors.WHITE_COLOR,
|
|
347
|
+
borderWidth: 0.5,
|
|
348
|
+
nullColor: '#e2e2ea'
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
tooltip: {
|
|
352
|
+
headerFormat: '',
|
|
353
|
+
pointFormat: '<div style="border-bottom: 1px solid #eaecef; padding: 0 8px 7px">'
|
|
354
|
+
+ '<span style="font-size: 12px; color: #858fa1">{point.translatedName}</span></div>'
|
|
355
|
+
+ '<div style="font-size: 14px; color: #344563; margin: 6px 8px 0 8px;">'
|
|
356
|
+
+ '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.value}</b></div>'
|
|
357
|
+
},
|
|
358
|
+
xAxis: {
|
|
359
|
+
crosshair: true
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
return super.build(mergeDeep(defaultMapOptions, options));
|
|
363
|
+
}
|
|
364
|
+
static configureMap(series, options, color, labelDateFormat) {
|
|
365
|
+
super.configure(series, options, color, labelDateFormat);
|
|
366
|
+
const colors = ChartColors.getChartColors(color);
|
|
367
|
+
options.legend.enabled = true;
|
|
368
|
+
options.colorAxis.minColor = colors[20];
|
|
369
|
+
options.colorAxis.maxColor = colors[100];
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
class ChartMapComponent {
|
|
374
|
+
constructor() {
|
|
375
|
+
this.chartOptions = {}; // https://api.highcharts.com/highcharts/
|
|
376
|
+
this.color = ChartColor.ElectricBlue;
|
|
377
|
+
this.lastWidth = 0;
|
|
378
|
+
}
|
|
379
|
+
ngOnChanges(changes) {
|
|
380
|
+
if ((changes.series && !changes.series.firstChange) || (changes.color && !changes.color.firstChange)) {
|
|
381
|
+
this.initChart();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
ngAfterViewChecked() {
|
|
385
|
+
if (this.chartRef && this.chartRef.nativeElement.clientWidth != this.lastWidth) {
|
|
386
|
+
this.lastWidth = this.chartRef.nativeElement.clientWidth;
|
|
387
|
+
if (this.chart) {
|
|
388
|
+
this.chart.reflow();
|
|
389
|
+
}
|
|
390
|
+
else if (this.series && this.series.length) {
|
|
391
|
+
this.initChart();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
initChart() {
|
|
396
|
+
if (this.series) {
|
|
397
|
+
this.chartOptions = ChartMapOptions.build(this.chartOptions);
|
|
398
|
+
ChartMapOptions.configureMap(this.series, this.chartOptions, this.color, this.labelDateFormat);
|
|
399
|
+
mapChart(this.chartRef.nativeElement, this.chartOptions);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/** @nocollapse */ /** @nocollapse */ ChartMapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChartMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
404
|
+
/** @nocollapse */ /** @nocollapse */ ChartMapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ChartMapComponent, selector: "ap-chart-map", inputs: { chartOptions: "chartOptions", color: "color", labelDateFormat: "labelDateFormat", series: "series" }, viewQueries: [{ propertyName: "chartRef", first: true, predicate: ["chart"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #chart></div>\n" });
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChartMapComponent, decorators: [{
|
|
406
|
+
type: Component,
|
|
407
|
+
args: [{ selector: 'ap-chart-map', template: "<div #chart></div>\n" }]
|
|
408
|
+
}], propDecorators: { chartRef: [{
|
|
409
|
+
type: ViewChild,
|
|
410
|
+
args: ['chart']
|
|
411
|
+
}], chartOptions: [{
|
|
412
|
+
type: Input
|
|
413
|
+
}], color: [{
|
|
414
|
+
type: Input
|
|
415
|
+
}], labelDateFormat: [{
|
|
416
|
+
type: Input
|
|
417
|
+
}], series: [{
|
|
418
|
+
type: Input
|
|
419
|
+
}] } });
|
|
420
|
+
|
|
421
|
+
class AgorapulseUiChartsMapModule {
|
|
422
|
+
}
|
|
423
|
+
/** @nocollapse */ /** @nocollapse */ AgorapulseUiChartsMapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AgorapulseUiChartsMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
424
|
+
/** @nocollapse */ /** @nocollapse */ AgorapulseUiChartsMapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AgorapulseUiChartsMapModule, declarations: [ChartMapComponent], imports: [CommonModule,
|
|
425
|
+
HighchartsChartModule], exports: [ChartMapComponent] });
|
|
426
|
+
/** @nocollapse */ /** @nocollapse */ AgorapulseUiChartsMapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AgorapulseUiChartsMapModule, providers: [], imports: [[
|
|
427
|
+
CommonModule,
|
|
428
|
+
HighchartsChartModule,
|
|
429
|
+
]] });
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AgorapulseUiChartsMapModule, decorators: [{
|
|
431
|
+
type: NgModule,
|
|
432
|
+
args: [{
|
|
433
|
+
declarations: [
|
|
434
|
+
ChartMapComponent
|
|
435
|
+
],
|
|
436
|
+
imports: [
|
|
437
|
+
CommonModule,
|
|
438
|
+
HighchartsChartModule,
|
|
439
|
+
],
|
|
440
|
+
exports: [
|
|
441
|
+
ChartMapComponent
|
|
442
|
+
],
|
|
443
|
+
providers: []
|
|
444
|
+
}]
|
|
445
|
+
}] });
|
|
446
|
+
|
|
447
|
+
/*
|
|
448
|
+
* Public API Surface of ui-charts-map
|
|
449
|
+
*/
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Generated bundle index. Do not edit.
|
|
453
|
+
*/
|
|
454
|
+
|
|
455
|
+
export { AgorapulseUiChartsMapModule, ChartMapComponent };
|
|
456
|
+
//# sourceMappingURL=agorapulse-ui-charts-map.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-charts-map.mjs","sources":["../../../libs/ui-charts-map/src/lib/chart-colors.ts","../../../libs/ui-charts-map/src/lib/chart-options.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map-options.model.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map.component.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map.component.html","../../../libs/ui-charts-map/src/lib/agorapulse-ui-charts-map.module.ts","../../../libs/ui-charts-map/index.ts","../../../libs/ui-charts-map/agorapulse-ui-charts-map.ts"],"sourcesContent":["export enum ChartColor {\n Grey,\n Orange,\n SoftBlue,\n ElectricBlue,\n Purple,\n Green,\n}\n\nexport class ChartColors {\n\n static readonly SOFT_BLUE_COLORS = {\n '10': '#EFF5FC',\n '20': '#DFEDFA',\n '40': '#C0DBF4',\n '60': '#A0C8EF',\n '85': '#78B1E8',\n '100': '#61A4E4'\n };\n static readonly ELECTRIC_BLUE_COLORS = {\n '10': '#e8f4ff',\n '20': '#d1e8ff',\n '40': '#a2d1ff',\n '60': '#74bbfe',\n '85': '#3a9efe',\n '100': '#178dfe'\n };\n static readonly ORANGE_COLORS = {\n '10': '#FFEFE9',\n '20': '#FFE1D4',\n '40': '#FFC2A8',\n '60': '#FFA47D',\n '85': '#FF7E46',\n '100': '#FF6726'\n };\n static readonly GREEN_COLORS = {\n '10': '#ECF7ED',\n '20': '#DAF1DD',\n '40': '#B5E3BB',\n '60': '#8FD498',\n '85': '#61C26D',\n '100': '#45B854'\n };\n static readonly PURPLE_COLORS = {\n '10': '#EFEDF8',\n '20': '#E0DDF2',\n '40': '#C1BBE6',\n '60': '#A398D9',\n '85': '#7C6DC9',\n '100': '#6554C0'\n };\n static readonly GREY_COLORS = {\n '10': '#EAECEF',\n '20': '#D6DAE0',\n '40': '#AEB5C1',\n '60': '#858FA1',\n '85': '#5D6A82',\n '100': '#344563'\n };\n\n static readonly BLACK_COLOR: string = '#000000';\n static readonly LIMIT_COLOR: string = '#E81313';\n static readonly WHITE_COLOR: string = '#FFFFFF';\n\n static getChartColors(color: ChartColor): { [shade: string]: string } {\n switch (color) {\n case ChartColor.Orange:\n return this.ORANGE_COLORS;\n case ChartColor.SoftBlue:\n return this.SOFT_BLUE_COLORS;\n case ChartColor.ElectricBlue:\n return this.ELECTRIC_BLUE_COLORS;\n case ChartColor.Purple:\n return this.PURPLE_COLORS;\n case ChartColor.Green:\n return this.GREEN_COLORS;\n default:\n return this.GREY_COLORS;\n }\n }\n\n static getColors(seriesCount: number, color: ChartColor): string[] {\n let colors = this.getChartColors(color);\n switch (seriesCount) {\n case 1:\n return [colors[100]];\n case 2:\n return [colors[40], colors[100]];\n case 3:\n return [colors[20], colors[60], colors[100]];\n case 4:\n return [colors[20], colors[40], colors[60], colors[100]];\n case 5:\n return [colors[10], colors[20], colors[40], colors[60], colors[100]];\n default:\n return [colors[20], colors[40], colors[60], colors[100]];\n }\n }\n}\n","import {dateFormat, Options, SeriesOptionsType} from 'highcharts';\nimport {ChartColor, ChartColors} from './chart-colors';\n\nexport class ChartOptions {\n\n static readonly DEFAULT_DATE_FORMAT: string = '%A, %b %e, %Y';\n static readonly DEFAULT_OPTIONS: Options = {\n /*lang: {\n decimalPoint: (manager && manager.locale !== 'en') ? ',' : '.',\n resetZoom: resetZoomLabel,\n resetZoomTitle: resetZoomHtmlTitle,\n shortMonths: [\n shortJanuary, shortFebruary, shortMarch, shortApril, shortMay, shortJune,\n shortJuly, shortAugust, shortSeptember, shortOctober, shortNovember, shortDecember\n ],\n thousandsSep: (manager && manager.locale !== 'en') ? ' ' : ',',\n weekdays: this.weekDays,\n zoomIn: zoomInHtmlTitle,\n zoomOut: zoomOutHtmlTitle\n },*/\n chart: {\n spacingRight: 20,\n zoomType: 'xy',\n panning: {\n enabled: true\n },\n panKey: 'shift',\n style: {\n fontFamily: 'Averta, \\'Open Sans\\', Helvetica, sans-serif'\n },\n resetZoomButton: {\n theme: {\n fill: ChartColors.WHITE_COLOR,\n r: 4,\n style: {\n color: ChartColors.GREY_COLORS[100],\n fontSize: '12px'\n },\n states: {\n hover: {\n fill: ChartColors.GREY_COLORS[5]\n }\n }\n }\n }\n },\n colorAxis: {\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[60]\n }\n }\n },\n credits: {\n enabled: false\n },\n legend: {\n borderWidth: 0,\n itemStyle: {\n color: ChartColors.GREY_COLORS[60],\n fontSize: '14px',\n fontWeight: 'normal'\n },\n itemHoverStyle: {\n color: ChartColors.GREY_COLORS[100],\n fontWeight: 'bold'\n }\n },\n plotOptions: {\n series: {\n states: {\n hover: {\n brightness: 0\n }\n },\n connectNulls: true,\n lineWidth: 4\n }\n },\n navigation: {\n buttonOptions: {\n y: 0\n }\n },\n title: {\n text: null\n },\n tooltip: {\n backgroundColor: ChartColors.WHITE_COLOR,\n borderRadius: 4,\n borderWidth: 0,\n dateTimeLabelFormats: {\n day: ChartOptions.DEFAULT_DATE_FORMAT,\n week: ChartOptions.DEFAULT_DATE_FORMAT\n },\n shadow: {\n color: ChartColors.BLACK_COLOR,\n offsetX: 0,\n offsetY: 2,\n opacity: 0.02,\n width: 6\n },\n split: false,\n shared: true,\n useHTML: true,\n headerFormat: `<div style=\"border-bottom: 1px solid ${ChartColors.GREY_COLORS[10]}; padding: 0 8px 7px\">`\n + `<span style=\"font-size: 12px; color: ${ChartColors.GREY_COLORS[60]}\">{point.key}</span></div>`,\n pointFormat: `<div style=\"font-size: 14px; color: ${ChartColors.GREY_COLORS[100]}; margin: 6px 8px 0 8px;\">`\n + '<span style=\"color:{point.color}\">\\u25CF</span> {series.name}: <b>{point.y}</b></div>'\n },\n xAxis: {\n gridLineColor: ChartColors.GREY_COLORS[10],\n lineColor: ChartColors.GREY_COLORS[10],\n tickColor: ChartColors.GREY_COLORS[10],\n gridLineWidth: 1,\n title: {\n text: null\n },\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[40],\n fontSize: '12px'\n }\n }\n },\n yAxis: {\n allowDecimals: false,\n gridLineColor: ChartColors.GREY_COLORS[10],\n lineColor: ChartColors.GREY_COLORS[10],\n gridLineWidth: 1,\n title: {\n text: null\n },\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[40],\n fontSize: '12px'\n }\n }\n }\n };\n\n static build(options: Options): Options {\n return mergeDeep(ChartOptions.DEFAULT_OPTIONS, options);\n }\n\n static configure(series: SeriesOptionsType[],\n options: Options,\n color: ChartColor,\n labelDateFormat?: string) {\n // Configure axis\n options.xAxis = mergeDeep({\n labels: {\n formatter: function () {\n return dateFormat(labelDateFormat ? labelDateFormat : '%m/%d', this.value);\n }\n },\n //minTickInterval: 24 * 60 * 60 * 1000 // One day\n }, options.xAxis);\n // Configure series\n if (series && series.length) {\n options.series = series;\n options.legend.enabled = series.length >= 2;\n options.colors = ChartColors.getColors(series.length, color);\n }\n }\n}\n\nexport function isObject(item) {\n return (item && typeof item === 'object' && !Array.isArray(item));\n}\n\nexport function mergeDeep(target, source) {\n let output = deepCopy(target);\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach(key => {\n if (isObject(source[key])) {\n if (!(key in target))\n Object.assign(output, {[key]: source[key]});\n else\n output[key] = mergeDeep(target[key], source[key]);\n } else {\n Object.assign(output, {[key]: source[key]});\n }\n });\n }\n return output;\n}\n\nfunction deepCopy(source) {\n if (typeof source !== \"object\" || source === null) {\n return source // Return the value if source is not an object\n }\n // Create an array or object to hold the values\n const newObject = Array.isArray(source) ? [] : {}\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n // Recursively (deep) copy for nested objects, including arrays\n newObject[key] = deepCopy(source[key])\n }\n }\n return newObject\n}\n","import * as Highcharts from 'highcharts';\nimport {ColorAxisOptions, Options, SeriesOptionsType} from 'highcharts';\nimport geojson from '@highcharts/map-collection/custom/world-highres2.geo.json';\n\nimport {ChartColor, ChartColors} from '../chart-colors';\nimport {ChartOptions, mergeDeep} from '../chart-options';\n\nexport class ChartMapOptions extends ChartOptions {\n\n static build(options: Highcharts.Options): Highcharts.Options {\n const defaultMapOptions: Highcharts.Options = {\n chart: {\n height: 450,\n map: geojson\n },\n colorAxis: {\n allowDecimals: false,\n gridLineWidth: 2,\n gridLineColor: ChartColors.WHITE_COLOR,\n min: 0,\n tickAmount: 6,\n labels: {\n style: {\n fontSize: '12px'\n }\n },\n minColor: ChartColors.SOFT_BLUE_COLORS[20],\n maxColor: ChartColors.SOFT_BLUE_COLORS[100]\n },\n legend: {\n align: 'left',\n floating: true,\n },\n mapNavigation: {\n enabled: true,\n enableMouseWheelZoom: false,\n buttonOptions: {\n verticalAlign: 'middle',\n style: {\n color: ChartColors.GREY_COLORS[100],\n fontSize: '16px',\n fontWeight: 'normal',\n },\n theme: {\n fill: ChartColors.WHITE_COLOR,\n r: 4,\n states: {\n hover: {\n fill: ChartColors.GREY_COLORS[5],\n }\n }\n },\n }\n },\n plotOptions: {\n map: {\n borderColor: ChartColors.WHITE_COLOR,\n borderWidth: 0.5,\n nullColor: '#e2e2ea'\n }\n },\n tooltip: {\n headerFormat: '',\n pointFormat: '<div style=\"border-bottom: 1px solid #eaecef; padding: 0 8px 7px\">'\n + '<span style=\"font-size: 12px; color: #858fa1\">{point.translatedName}</span></div>'\n + '<div style=\"font-size: 14px; color: #344563; margin: 6px 8px 0 8px;\">'\n + '<span style=\"color:{point.color}\">\\u25CF</span> {series.name}: <b>{point.value}</b></div>'\n },\n xAxis: {\n crosshair: true\n }\n };\n return super.build(mergeDeep(defaultMapOptions, options));\n }\n\n static configureMap(series: SeriesOptionsType[],\n options: Options,\n color: ChartColor,\n labelDateFormat?: string) {\n super.configure(series, options, color, labelDateFormat);\n const colors = ChartColors.getChartColors(color);\n options.legend.enabled = true;\n (options.colorAxis as ColorAxisOptions).minColor = colors[20];\n (options.colorAxis as ColorAxisOptions).maxColor = colors[100];\n }\n}\n","import {AfterViewChecked, Component, ElementRef, Input, OnChanges, SimpleChanges, ViewChild} from '@angular/core';\nimport {mapChart, Options, SeriesMapOptions} from 'highcharts/highmaps';\nimport {ChartColor} from '../chart-colors';\nimport {ChartMapOptions} from './chart-map-options.model';\n\n\n@Component({\n selector: 'ap-chart-map',\n templateUrl: './chart-map.component.html',\n})\nexport class ChartMapComponent implements AfterViewChecked, OnChanges {\n\n @ViewChild('chart') chartRef: ElementRef;\n\n @Input() chartOptions: Options = {}; // https://api.highcharts.com/highcharts/\n @Input() color: ChartColor = ChartColor.ElectricBlue;\n @Input() labelDateFormat: string;\n @Input() series: SeriesMapOptions[];\n\n private chart;\n private lastWidth = 0;\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes.series && !changes.series.firstChange) || (changes.color && !changes.color.firstChange)) {\n this.initChart();\n }\n }\n\n ngAfterViewChecked() {\n if (this.chartRef && this.chartRef.nativeElement.clientWidth != this.lastWidth) {\n this.lastWidth = this.chartRef.nativeElement.clientWidth;\n if (this.chart) {\n this.chart.reflow();\n } else if (this.series && this.series.length) {\n this.initChart();\n }\n }\n }\n\n private initChart() {\n if (this.series) {\n this.chartOptions = ChartMapOptions.build(this.chartOptions);\n ChartMapOptions.configureMap(this.series, this.chartOptions, this.color, this.labelDateFormat);\n mapChart(this.chartRef.nativeElement, this.chartOptions);\n }\n }\n\n}\n","<div #chart></div>\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {HighchartsChartModule} from 'highcharts-angular';\n\nimport {ChartMapComponent} from './chart-map/chart-map.component';\n\n@NgModule({\n declarations: [\n ChartMapComponent\n ],\n imports: [\n CommonModule,\n HighchartsChartModule,\n ],\n exports: [\n ChartMapComponent\n ],\n providers: [\n ]\n})\nexport class AgorapulseUiChartsMapModule {\n}\n","/*\n * Public API Surface of ui-charts-map\n */\n\nexport {AgorapulseUiChartsMapModule} from './src/lib/agorapulse-ui-charts-map.module';\nexport {ChartMapComponent} from './src/lib/chart-map/chart-map.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IAClB,2CAAI,CAAA;IACJ,+CAAM,CAAA;IACN,mDAAQ,CAAA;IACR,2DAAY,CAAA;IACZ,+CAAM,CAAA;IACN,6CAAK,CAAA;AACT,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;MAEY,WAAW;IAuDpB,OAAO,cAAc,CAAC,KAAiB;QACnC,QAAQ,KAAK;YACT,KAAK,UAAU,CAAC,MAAM;gBAClB,OAAO,IAAI,CAAC,aAAa,CAAC;YAC9B,KAAK,UAAU,CAAC,QAAQ;gBACpB,OAAO,IAAI,CAAC,gBAAgB,CAAC;YACjC,KAAK,UAAU,CAAC,YAAY;gBACxB,OAAO,IAAI,CAAC,oBAAoB,CAAC;YACrC,KAAK,UAAU,CAAC,MAAM;gBAClB,OAAO,IAAI,CAAC,aAAa,CAAC;YAC9B,KAAK,UAAU,CAAC,KAAK;gBACjB,OAAO,IAAI,CAAC,YAAY,CAAC;YAC7B;gBACI,OAAO,IAAI,CAAC,WAAW,CAAC;SAC/B;KACJ;IAED,OAAO,SAAS,CAAC,WAAmB,EAAE,KAAiB;QACnD,IAAI,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACxC,QAAQ,WAAW;YACf,KAAK,CAAC;gBACF,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YACzB,KAAK,CAAC;gBACF,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YACrC,KAAK,CAAC;gBACF,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE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,qBAAqB;SACxB;2FAOQ,2BAA2B;kBAdvC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,iBAAiB;qBACpB;oBACD,OAAO,EAAE;wBACL,YAAY;wBACZ,qBAAqB;qBACxB;oBACD,OAAO,EAAE;wBACL,iBAAiB;qBACpB;oBACD,SAAS,EAAE,EACV;iBACJ;;;ACnBD;;;;ACAA;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agorapulse/ui-charts-map",
|
|
3
3
|
"description": "Agorapulse UI Charts Map Components Library",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "13.0.2",
|
|
5
5
|
"author": "Benoit Hediard",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -12,22 +12,34 @@
|
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/agorapulse/design",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@angular/common": "^
|
|
16
|
-
"@angular/core": "^
|
|
17
|
-
"@angular/material": "^
|
|
18
|
-
"highcharts": "^9.
|
|
15
|
+
"@angular/common": "^13.2.3",
|
|
16
|
+
"@angular/core": "^13.2.3",
|
|
17
|
+
"@angular/material": "^13.2.3",
|
|
18
|
+
"highcharts": "^9.3.3",
|
|
19
19
|
"@highcharts/map-collection": "^1.1.3",
|
|
20
|
-
"highcharts-angular": "^
|
|
20
|
+
"highcharts-angular": "^3.0.0"
|
|
21
21
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"fesm2015": "fesm2015/agorapulse-ui-charts-map.
|
|
22
|
+
"module": "fesm2015/agorapulse-ui-charts-map.mjs",
|
|
23
|
+
"es2020": "fesm2020/agorapulse-ui-charts-map.mjs",
|
|
24
|
+
"esm2020": "esm2020/agorapulse-ui-charts-map.mjs",
|
|
25
|
+
"fesm2020": "fesm2020/agorapulse-ui-charts-map.mjs",
|
|
26
|
+
"fesm2015": "fesm2015/agorapulse-ui-charts-map.mjs",
|
|
27
27
|
"typings": "agorapulse-ui-charts-map.d.ts",
|
|
28
|
-
"
|
|
28
|
+
"exports": {
|
|
29
|
+
"./package.json": {
|
|
30
|
+
"default": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./agorapulse-ui-charts-map.d.ts",
|
|
34
|
+
"esm2020": "./esm2020/agorapulse-ui-charts-map.mjs",
|
|
35
|
+
"es2020": "./fesm2020/agorapulse-ui-charts-map.mjs",
|
|
36
|
+
"es2015": "./fesm2015/agorapulse-ui-charts-map.mjs",
|
|
37
|
+
"node": "./fesm2015/agorapulse-ui-charts-map.mjs",
|
|
38
|
+
"default": "./fesm2020/agorapulse-ui-charts-map.mjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
29
41
|
"sideEffects": false,
|
|
30
42
|
"dependencies": {
|
|
31
|
-
"tslib": "^2.
|
|
43
|
+
"tslib": "^2.3.0"
|
|
32
44
|
}
|
|
33
45
|
}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./chart-map/chart-map.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "highcharts-angular";
|
|
1
5
|
export declare class AgorapulseUiChartsMapModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AgorapulseUiChartsMapModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AgorapulseUiChartsMapModule, [typeof i1.ChartMapComponent], [typeof i2.CommonModule, typeof i3.HighchartsChartModule], [typeof i1.ChartMapComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AgorapulseUiChartsMapModule>;
|
|
2
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AfterViewChecked, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Options, SeriesMapOptions } from 'highcharts/highmaps';
|
|
3
3
|
import { ChartColor } from '../chart-colors';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ChartMapComponent implements AfterViewChecked, OnChanges {
|
|
5
6
|
chartRef: ElementRef;
|
|
6
7
|
chartOptions: Options;
|
|
@@ -12,4 +13,6 @@ export declare class ChartMapComponent implements AfterViewChecked, OnChanges {
|
|
|
12
13
|
ngOnChanges(changes: SimpleChanges): void;
|
|
13
14
|
ngAfterViewChecked(): void;
|
|
14
15
|
private initChart;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartMapComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartMapComponent, "ap-chart-map", never, { "chartOptions": "chartOptions"; "color": "color"; "labelDateFormat": "labelDateFormat"; "series": "series"; }, {}, never, never>;
|
|
15
18
|
}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"AgorapulseUiChartsMapModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ChartMapComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":11,"character":8},{"__symbolic":"reference","module":"highcharts-angular","name":"HighchartsChartModule","line":12,"character":8}],"exports":[{"__symbolic":"reference","name":"ChartMapComponent"}],"providers":[]}]}],"members":{}},"ChartMapComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"ap-chart-map","template":"<div #chart></div>\n"}]}],"members":{"chartRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":12,"character":5},"arguments":["chart"]}]}],"chartOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":5}}]}],"color":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":5}}]}],"labelDateFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":5}}]}],"series":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngAfterViewChecked":[{"__symbolic":"method"}],"initChart":[{"__symbolic":"method"}]}}},"origins":{"AgorapulseUiChartsMapModule":"./src/lib/agorapulse-ui-charts-map.module","ChartMapComponent":"./src/lib/chart-map/chart-map.component"},"importAs":"@agorapulse/ui-charts-map"}
|