@agorapulse/ui-charts 2.2.17 → 13.0.1

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.
Files changed (52) hide show
  1. package/agorapulse-ui-charts-13.0.1.tgz +0 -0
  2. package/agorapulse-ui-charts.d.ts +1 -0
  3. package/{esm2015/agorapulse-ui-charts.js → esm2020/agorapulse-ui-charts.mjs} +0 -0
  4. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  5. package/esm2020/src/lib/agorapulse-ui-charts.module.mjs +60 -0
  6. package/esm2020/src/lib/chart-bar/chart-bar-options.model.mjs +80 -0
  7. package/esm2020/src/lib/chart-bar/chart-bar.component.mjs +58 -0
  8. package/{esm2015/src/lib/chart-colors.js → esm2020/src/lib/chart-colors.mjs} +3 -2
  9. package/esm2020/src/lib/chart-column/chart-column-options.model.mjs +104 -0
  10. package/esm2020/src/lib/chart-column/chart-column.component.mjs +59 -0
  11. package/{esm2015/src/lib/chart-heatmap/chart-heatmap-options.model.js → esm2020/src/lib/chart-heatmap/chart-heatmap-options.model.mjs} +0 -0
  12. package/esm2020/src/lib/chart-heatmap/chart-heatmap.component.mjs +55 -0
  13. package/{esm2015/src/lib/chart-metric.js → esm2020/src/lib/chart-metric.mjs} +0 -0
  14. package/esm2020/src/lib/chart-metrics-list/chart-metrics-list.component.mjs +23 -0
  15. package/{esm2015/src/lib/chart-options.js → esm2020/src/lib/chart-options.mjs} +0 -0
  16. package/esm2020/src/lib/chart-pie/chart-pie-options.model.mjs +121 -0
  17. package/esm2020/src/lib/chart-pie/chart-pie.component.mjs +56 -0
  18. package/esm2020/src/lib/chart-spline/chart-spline-options.model.mjs +24 -0
  19. package/esm2020/src/lib/chart-spline/chart-spline.component.mjs +53 -0
  20. package/{esm2015/src/lib/highchart-series.model.js → esm2020/src/lib/highchart-series.model.mjs} +0 -0
  21. package/{esm2015/src/lib/highcharts-border-radius-plugin.js → esm2020/src/lib/highcharts-border-radius-plugin.mjs} +0 -0
  22. package/fesm2015/agorapulse-ui-charts.mjs +1088 -0
  23. package/fesm2015/agorapulse-ui-charts.mjs.map +1 -0
  24. package/fesm2020/agorapulse-ui-charts.mjs +1089 -0
  25. package/fesm2020/agorapulse-ui-charts.mjs.map +1 -0
  26. package/package.json +26 -13
  27. package/src/lib/agorapulse-ui-charts.module.d.ts +13 -0
  28. package/src/lib/chart-bar/chart-bar.component.d.ts +4 -1
  29. package/src/lib/chart-colors.d.ts +1 -0
  30. package/src/lib/chart-column/chart-column.component.d.ts +4 -1
  31. package/src/lib/chart-heatmap/chart-heatmap.component.d.ts +3 -0
  32. package/src/lib/chart-metrics-list/chart-metrics-list.component.d.ts +3 -0
  33. package/src/lib/chart-pie/chart-pie.component.d.ts +3 -0
  34. package/src/lib/chart-spline/chart-spline-options.model.d.ts +1 -1
  35. package/src/lib/chart-spline/chart-spline.component.d.ts +3 -0
  36. package/agorapulse-ui-charts-2.2.17.tgz +0 -0
  37. package/agorapulse-ui-charts.metadata.json +0 -1
  38. package/bundles/agorapulse-ui-charts.umd.js +0 -1378
  39. package/bundles/agorapulse-ui-charts.umd.js.map +0 -1
  40. package/esm2015/src/lib/agorapulse-ui-charts.module.js +0 -39
  41. package/esm2015/src/lib/chart-bar/chart-bar-options.model.js +0 -77
  42. package/esm2015/src/lib/chart-bar/chart-bar.component.js +0 -52
  43. package/esm2015/src/lib/chart-column/chart-column-options.model.js +0 -103
  44. package/esm2015/src/lib/chart-column/chart-column.component.js +0 -54
  45. package/esm2015/src/lib/chart-heatmap/chart-heatmap.component.js +0 -50
  46. package/esm2015/src/lib/chart-metrics-list/chart-metrics-list.component.js +0 -21
  47. package/esm2015/src/lib/chart-pie/chart-pie-options.model.js +0 -55
  48. package/esm2015/src/lib/chart-pie/chart-pie.component.js +0 -51
  49. package/esm2015/src/lib/chart-spline/chart-spline-options.model.js +0 -24
  50. package/esm2015/src/lib/chart-spline/chart-spline.component.js +0 -54
  51. package/fesm2015/agorapulse-ui-charts.js +0 -981
  52. package/fesm2015/agorapulse-ui-charts.js.map +0 -1
@@ -1,1378 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('highcharts'), require('@angular/core'), require('@angular/common'), require('@angular/material/list'), require('highcharts-angular'), require('highcharts/highmaps')) :
3
- typeof define === 'function' && define.amd ? define('@agorapulse/ui-charts', ['exports', 'highcharts', '@angular/core', '@angular/common', '@angular/material/list', 'highcharts-angular', 'highcharts/highmaps'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.agorapulse = global.agorapulse || {}, global.agorapulse['ui-charts'] = {}), global.Highcharts, global.ng.core, global.ng.common, global.ng.material.list, global.highchartsAngular, global.highmaps));
5
- }(this, (function (exports, Highcharts, core, common, list, highchartsAngular, highmaps) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
19
- });
20
- }
21
- });
22
- }
23
- n['default'] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var Highcharts__namespace = /*#__PURE__*/_interopNamespace(Highcharts);
28
-
29
- var borderRadiusPlugin = function (H) {
30
- if (H.borderRadiusPlugininitialized) {
31
- return;
32
- }
33
- H.borderRadiusPlugininitialized = true;
34
- H.wrap(H.seriesTypes.column.prototype, 'translate', function (proceed) {
35
- var options = this.options;
36
- var topMargin = options.topMargin || 0;
37
- var bottomMargin = options.bottomMargin || 0;
38
- var borderRadiusTopLeftSettings = options.borderRadiusTopLeft;
39
- var borderRadiusTopRightSettings = options.borderRadiusTopRight;
40
- var borderRadiusBottomLeftSettings = options.borderRadiusBottomLeft;
41
- var borderRadiusBottomRightSettings = options.borderRadiusBottomRight;
42
- proceed.call(this);
43
- if (!this.points) {
44
- return;
45
- }
46
- this.points.forEach(function (point) {
47
- if (borderRadiusTopLeftSettings || borderRadiusTopRightSettings || borderRadiusBottomLeftSettings || borderRadiusBottomRightSettings) {
48
- var w = point.shapeArgs.width;
49
- var h = point.shapeArgs.height;
50
- var x = point.shapeArgs.x;
51
- var y = point.shapeArgs.y;
52
- var borderRadiusTopLeft = (borderRadiusTopLeftSettings && borderRadiusTopLeftSettings.length) ? borderRadiusTopLeftSettings[point.index] : borderRadiusTopLeftSettings || 0;
53
- var borderRadiusTopRight = (borderRadiusTopRightSettings && borderRadiusTopRightSettings.length) ? borderRadiusTopRightSettings[point.index] : borderRadiusTopRightSettings || 0;
54
- var borderRadiusBottomLeft = (borderRadiusBottomLeftSettings && borderRadiusBottomLeftSettings.length) ? borderRadiusBottomLeftSettings[point.index] : borderRadiusBottomLeftSettings || 0;
55
- var borderRadiusBottomRight = (borderRadiusBottomRightSettings && borderRadiusBottomRightSettings.length) ? borderRadiusBottomRightSettings[point.index] : borderRadiusBottomRightSettings || 0;
56
- var radiusTopLeft = H.relativeLength(borderRadiusTopLeft, w);
57
- var radiusTopRight = H.relativeLength(borderRadiusTopRight, w);
58
- var radiusBottomRight = H.relativeLength(borderRadiusBottomRight, w);
59
- var radiusBottomLeft = H.relativeLength(borderRadiusBottomLeft, w);
60
- var maxR = Math.min(w, h) / 2;
61
- radiusTopLeft = radiusTopLeft > maxR ? maxR : radiusTopLeft;
62
- radiusTopRight = radiusTopRight > maxR ? maxR : radiusTopRight;
63
- radiusBottomRight = radiusBottomRight > maxR ? maxR : radiusBottomRight;
64
- radiusBottomLeft = radiusBottomLeft > maxR ? maxR : radiusBottomLeft;
65
- point.dlBox = point.shapeArgs;
66
- point.shapeType = 'path';
67
- point.shapeArgs = {
68
- d: [
69
- 'M', x + radiusTopLeft, y + topMargin,
70
- 'L', x + w - radiusTopRight, y + topMargin,
71
- 'C', x + w - radiusTopRight / 2, y, x + w, y + radiusTopRight / 2, x + w, y + radiusTopRight,
72
- 'L', x + w, y + h - radiusBottomRight,
73
- 'C', x + w, y + h - radiusBottomRight / 2, x + w - radiusBottomRight / 2, y + h, x + w - radiusBottomRight, y + h + bottomMargin,
74
- 'L', x + radiusBottomLeft, y + h + bottomMargin,
75
- 'C', x + radiusBottomLeft / 2, y + h, x, y + h - radiusBottomLeft / 2, x, y + h - radiusBottomLeft,
76
- 'L', x, y + radiusTopLeft,
77
- 'C', x, y + radiusTopLeft / 2, x + radiusTopLeft / 2, y, x + radiusTopLeft, y,
78
- 'Z'
79
- ]
80
- };
81
- }
82
- });
83
- });
84
- };
85
-
86
- /*! *****************************************************************************
87
- Copyright (c) Microsoft Corporation.
88
-
89
- Permission to use, copy, modify, and/or distribute this software for any
90
- purpose with or without fee is hereby granted.
91
-
92
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
93
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
94
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
95
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
96
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
97
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
98
- PERFORMANCE OF THIS SOFTWARE.
99
- ***************************************************************************** */
100
- /* global Reflect, Promise */
101
- var extendStatics = function (d, b) {
102
- extendStatics = Object.setPrototypeOf ||
103
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
104
- function (d, b) { for (var p in b)
105
- if (Object.prototype.hasOwnProperty.call(b, p))
106
- d[p] = b[p]; };
107
- return extendStatics(d, b);
108
- };
109
- function __extends(d, b) {
110
- if (typeof b !== "function" && b !== null)
111
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
112
- extendStatics(d, b);
113
- function __() { this.constructor = d; }
114
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
115
- }
116
- var __assign = function () {
117
- __assign = Object.assign || function __assign(t) {
118
- for (var s, i = 1, n = arguments.length; i < n; i++) {
119
- s = arguments[i];
120
- for (var p in s)
121
- if (Object.prototype.hasOwnProperty.call(s, p))
122
- t[p] = s[p];
123
- }
124
- return t;
125
- };
126
- return __assign.apply(this, arguments);
127
- };
128
- function __rest(s, e) {
129
- var t = {};
130
- for (var p in s)
131
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
132
- t[p] = s[p];
133
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
134
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
135
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
136
- t[p[i]] = s[p[i]];
137
- }
138
- return t;
139
- }
140
- function __decorate(decorators, target, key, desc) {
141
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
142
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
143
- r = Reflect.decorate(decorators, target, key, desc);
144
- else
145
- for (var i = decorators.length - 1; i >= 0; i--)
146
- if (d = decorators[i])
147
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
148
- return c > 3 && r && Object.defineProperty(target, key, r), r;
149
- }
150
- function __param(paramIndex, decorator) {
151
- return function (target, key) { decorator(target, key, paramIndex); };
152
- }
153
- function __metadata(metadataKey, metadataValue) {
154
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
155
- return Reflect.metadata(metadataKey, metadataValue);
156
- }
157
- function __awaiter(thisArg, _arguments, P, generator) {
158
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
159
- return new (P || (P = Promise))(function (resolve, reject) {
160
- function fulfilled(value) { try {
161
- step(generator.next(value));
162
- }
163
- catch (e) {
164
- reject(e);
165
- } }
166
- function rejected(value) { try {
167
- step(generator["throw"](value));
168
- }
169
- catch (e) {
170
- reject(e);
171
- } }
172
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
173
- step((generator = generator.apply(thisArg, _arguments || [])).next());
174
- });
175
- }
176
- function __generator(thisArg, body) {
177
- var _ = { label: 0, sent: function () { if (t[0] & 1)
178
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
179
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
180
- function verb(n) { return function (v) { return step([n, v]); }; }
181
- function step(op) {
182
- if (f)
183
- throw new TypeError("Generator is already executing.");
184
- while (_)
185
- try {
186
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
187
- return t;
188
- if (y = 0, t)
189
- op = [op[0] & 2, t.value];
190
- switch (op[0]) {
191
- case 0:
192
- case 1:
193
- t = op;
194
- break;
195
- case 4:
196
- _.label++;
197
- return { value: op[1], done: false };
198
- case 5:
199
- _.label++;
200
- y = op[1];
201
- op = [0];
202
- continue;
203
- case 7:
204
- op = _.ops.pop();
205
- _.trys.pop();
206
- continue;
207
- default:
208
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
209
- _ = 0;
210
- continue;
211
- }
212
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
213
- _.label = op[1];
214
- break;
215
- }
216
- if (op[0] === 6 && _.label < t[1]) {
217
- _.label = t[1];
218
- t = op;
219
- break;
220
- }
221
- if (t && _.label < t[2]) {
222
- _.label = t[2];
223
- _.ops.push(op);
224
- break;
225
- }
226
- if (t[2])
227
- _.ops.pop();
228
- _.trys.pop();
229
- continue;
230
- }
231
- op = body.call(thisArg, _);
232
- }
233
- catch (e) {
234
- op = [6, e];
235
- y = 0;
236
- }
237
- finally {
238
- f = t = 0;
239
- }
240
- if (op[0] & 5)
241
- throw op[1];
242
- return { value: op[0] ? op[1] : void 0, done: true };
243
- }
244
- }
245
- var __createBinding = Object.create ? (function (o, m, k, k2) {
246
- if (k2 === undefined)
247
- k2 = k;
248
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
249
- }) : (function (o, m, k, k2) {
250
- if (k2 === undefined)
251
- k2 = k;
252
- o[k2] = m[k];
253
- });
254
- function __exportStar(m, o) {
255
- for (var p in m)
256
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
257
- __createBinding(o, m, p);
258
- }
259
- function __values(o) {
260
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
261
- if (m)
262
- return m.call(o);
263
- if (o && typeof o.length === "number")
264
- return {
265
- next: function () {
266
- if (o && i >= o.length)
267
- o = void 0;
268
- return { value: o && o[i++], done: !o };
269
- }
270
- };
271
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
272
- }
273
- function __read(o, n) {
274
- var m = typeof Symbol === "function" && o[Symbol.iterator];
275
- if (!m)
276
- return o;
277
- var i = m.call(o), r, ar = [], e;
278
- try {
279
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
280
- ar.push(r.value);
281
- }
282
- catch (error) {
283
- e = { error: error };
284
- }
285
- finally {
286
- try {
287
- if (r && !r.done && (m = i["return"]))
288
- m.call(i);
289
- }
290
- finally {
291
- if (e)
292
- throw e.error;
293
- }
294
- }
295
- return ar;
296
- }
297
- /** @deprecated */
298
- function __spread() {
299
- for (var ar = [], i = 0; i < arguments.length; i++)
300
- ar = ar.concat(__read(arguments[i]));
301
- return ar;
302
- }
303
- /** @deprecated */
304
- function __spreadArrays() {
305
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
306
- s += arguments[i].length;
307
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
308
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
309
- r[k] = a[j];
310
- return r;
311
- }
312
- function __spreadArray(to, from, pack) {
313
- if (pack || arguments.length === 2)
314
- for (var i = 0, l = from.length, ar; i < l; i++) {
315
- if (ar || !(i in from)) {
316
- if (!ar)
317
- ar = Array.prototype.slice.call(from, 0, i);
318
- ar[i] = from[i];
319
- }
320
- }
321
- return to.concat(ar || from);
322
- }
323
- function __await(v) {
324
- return this instanceof __await ? (this.v = v, this) : new __await(v);
325
- }
326
- function __asyncGenerator(thisArg, _arguments, generator) {
327
- if (!Symbol.asyncIterator)
328
- throw new TypeError("Symbol.asyncIterator is not defined.");
329
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
330
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
331
- function verb(n) { if (g[n])
332
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
333
- function resume(n, v) { try {
334
- step(g[n](v));
335
- }
336
- catch (e) {
337
- settle(q[0][3], e);
338
- } }
339
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
340
- function fulfill(value) { resume("next", value); }
341
- function reject(value) { resume("throw", value); }
342
- function settle(f, v) { if (f(v), q.shift(), q.length)
343
- resume(q[0][0], q[0][1]); }
344
- }
345
- function __asyncDelegator(o) {
346
- var i, p;
347
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
348
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
349
- }
350
- function __asyncValues(o) {
351
- if (!Symbol.asyncIterator)
352
- throw new TypeError("Symbol.asyncIterator is not defined.");
353
- var m = o[Symbol.asyncIterator], i;
354
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
355
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
356
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
357
- }
358
- function __makeTemplateObject(cooked, raw) {
359
- if (Object.defineProperty) {
360
- Object.defineProperty(cooked, "raw", { value: raw });
361
- }
362
- else {
363
- cooked.raw = raw;
364
- }
365
- return cooked;
366
- }
367
- ;
368
- var __setModuleDefault = Object.create ? (function (o, v) {
369
- Object.defineProperty(o, "default", { enumerable: true, value: v });
370
- }) : function (o, v) {
371
- o["default"] = v;
372
- };
373
- function __importStar(mod) {
374
- if (mod && mod.__esModule)
375
- return mod;
376
- var result = {};
377
- if (mod != null)
378
- for (var k in mod)
379
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
380
- __createBinding(result, mod, k);
381
- __setModuleDefault(result, mod);
382
- return result;
383
- }
384
- function __importDefault(mod) {
385
- return (mod && mod.__esModule) ? mod : { default: mod };
386
- }
387
- function __classPrivateFieldGet(receiver, state, kind, f) {
388
- if (kind === "a" && !f)
389
- throw new TypeError("Private accessor was defined without a getter");
390
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
391
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
392
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
393
- }
394
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
395
- if (kind === "m")
396
- throw new TypeError("Private method is not writable");
397
- if (kind === "a" && !f)
398
- throw new TypeError("Private accessor was defined without a setter");
399
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
400
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
401
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
402
- }
403
-
404
- exports.ChartColor = void 0;
405
- (function (ChartColor) {
406
- ChartColor[ChartColor["Grey"] = 0] = "Grey";
407
- ChartColor[ChartColor["Orange"] = 1] = "Orange";
408
- ChartColor[ChartColor["SoftBlue"] = 2] = "SoftBlue";
409
- ChartColor[ChartColor["ElectricBlue"] = 3] = "ElectricBlue";
410
- ChartColor[ChartColor["Purple"] = 4] = "Purple";
411
- ChartColor[ChartColor["Green"] = 5] = "Green";
412
- })(exports.ChartColor || (exports.ChartColor = {}));
413
- var ChartColors = /** @class */ (function () {
414
- function ChartColors() {
415
- }
416
- ChartColors.getChartColors = function (color) {
417
- switch (color) {
418
- case exports.ChartColor.Orange:
419
- return this.ORANGE_COLORS;
420
- case exports.ChartColor.SoftBlue:
421
- return this.SOFT_BLUE_COLORS;
422
- case exports.ChartColor.ElectricBlue:
423
- return this.ELECTRIC_BLUE_COLORS;
424
- case exports.ChartColor.Purple:
425
- return this.PURPLE_COLORS;
426
- case exports.ChartColor.Green:
427
- return this.GREEN_COLORS;
428
- default:
429
- return this.GREY_COLORS;
430
- }
431
- };
432
- ChartColors.getColors = function (seriesCount, color) {
433
- var colors = this.getChartColors(color);
434
- switch (seriesCount) {
435
- case 1:
436
- return [colors[100]];
437
- case 2:
438
- return [colors[40], colors[100]];
439
- case 3:
440
- return [colors[20], colors[60], colors[100]];
441
- case 4:
442
- return [colors[20], colors[40], colors[60], colors[100]];
443
- case 5:
444
- return [colors[10], colors[20], colors[40], colors[60], colors[100]];
445
- default:
446
- return [colors[20], colors[40], colors[60], colors[100]];
447
- }
448
- };
449
- return ChartColors;
450
- }());
451
- ChartColors.SOFT_BLUE_COLORS = {
452
- '10': '#EFF5FC',
453
- '20': '#DFEDFA',
454
- '40': '#C0DBF4',
455
- '60': '#A0C8EF',
456
- '85': '#78B1E8',
457
- '100': '#61A4E4'
458
- };
459
- ChartColors.ELECTRIC_BLUE_COLORS = {
460
- '10': '#e8f4ff',
461
- '20': '#d1e8ff',
462
- '40': '#a2d1ff',
463
- '60': '#74bbfe',
464
- '85': '#3a9efe',
465
- '100': '#178dfe'
466
- };
467
- ChartColors.ORANGE_COLORS = {
468
- '10': '#FFEFE9',
469
- '20': '#FFE1D4',
470
- '40': '#FFC2A8',
471
- '60': '#FFA47D',
472
- '85': '#FF7E46',
473
- '100': '#FF6726'
474
- };
475
- ChartColors.GREEN_COLORS = {
476
- '10': '#ECF7ED',
477
- '20': '#DAF1DD',
478
- '40': '#B5E3BB',
479
- '60': '#8FD498',
480
- '85': '#61C26D',
481
- '100': '#45B854'
482
- };
483
- ChartColors.PURPLE_COLORS = {
484
- '10': '#EFEDF8',
485
- '20': '#E0DDF2',
486
- '40': '#C1BBE6',
487
- '60': '#A398D9',
488
- '85': '#7C6DC9',
489
- '100': '#6554C0'
490
- };
491
- ChartColors.GREY_COLORS = {
492
- '10': '#EAECEF',
493
- '20': '#D6DAE0',
494
- '40': '#AEB5C1',
495
- '60': '#858FA1',
496
- '85': '#5D6A82',
497
- '100': '#344563'
498
- };
499
- ChartColors.BLACK_COLOR = '#000000';
500
- ChartColors.LIMIT_COLOR = '#E81313';
501
- ChartColors.WHITE_COLOR = '#FFFFFF';
502
-
503
- var ChartOptions = /** @class */ (function () {
504
- function ChartOptions() {
505
- }
506
- ChartOptions.build = function (options) {
507
- return mergeDeep(ChartOptions.DEFAULT_OPTIONS, options);
508
- };
509
- ChartOptions.configure = function (series, options, color, labelDateFormat) {
510
- // Configure axis
511
- options.xAxis = mergeDeep({
512
- labels: {
513
- formatter: function () {
514
- return Highcharts.dateFormat(labelDateFormat ? labelDateFormat : '%m/%d', this.value);
515
- }
516
- },
517
- //minTickInterval: 24 * 60 * 60 * 1000 // One day
518
- }, options.xAxis);
519
- // Configure series
520
- if (series && series.length) {
521
- options.series = series;
522
- options.legend.enabled = series.length >= 2;
523
- options.colors = ChartColors.getColors(series.length, color);
524
- }
525
- };
526
- return ChartOptions;
527
- }());
528
- ChartOptions.DEFAULT_DATE_FORMAT = '%A, %b %e, %Y';
529
- ChartOptions.DEFAULT_OPTIONS = {
530
- /*lang: {
531
- decimalPoint: (manager && manager.locale !== 'en') ? ',' : '.',
532
- resetZoom: resetZoomLabel,
533
- resetZoomTitle: resetZoomHtmlTitle,
534
- shortMonths: [
535
- shortJanuary, shortFebruary, shortMarch, shortApril, shortMay, shortJune,
536
- shortJuly, shortAugust, shortSeptember, shortOctober, shortNovember, shortDecember
537
- ],
538
- thousandsSep: (manager && manager.locale !== 'en') ? ' ' : ',',
539
- weekdays: this.weekDays,
540
- zoomIn: zoomInHtmlTitle,
541
- zoomOut: zoomOutHtmlTitle
542
- },*/
543
- chart: {
544
- spacingRight: 20,
545
- zoomType: 'xy',
546
- panning: {
547
- enabled: true
548
- },
549
- panKey: 'shift',
550
- style: {
551
- fontFamily: 'Averta, \'Open Sans\', Helvetica, sans-serif'
552
- },
553
- resetZoomButton: {
554
- theme: {
555
- fill: ChartColors.WHITE_COLOR,
556
- r: 4,
557
- style: {
558
- color: ChartColors.GREY_COLORS[100],
559
- fontSize: '12px'
560
- },
561
- states: {
562
- hover: {
563
- fill: ChartColors.GREY_COLORS[5]
564
- }
565
- }
566
- }
567
- }
568
- },
569
- colorAxis: {
570
- labels: {
571
- style: {
572
- color: ChartColors.GREY_COLORS[60]
573
- }
574
- }
575
- },
576
- credits: {
577
- enabled: false
578
- },
579
- legend: {
580
- borderWidth: 0,
581
- itemStyle: {
582
- color: ChartColors.GREY_COLORS[60],
583
- fontSize: '14px',
584
- fontWeight: 'normal'
585
- },
586
- itemHoverStyle: {
587
- color: ChartColors.GREY_COLORS[100],
588
- fontWeight: 'bold'
589
- }
590
- },
591
- plotOptions: {
592
- series: {
593
- states: {
594
- hover: {
595
- brightness: 0
596
- }
597
- },
598
- connectNulls: true,
599
- lineWidth: 4
600
- }
601
- },
602
- navigation: {
603
- buttonOptions: {
604
- y: 0
605
- }
606
- },
607
- title: {
608
- text: null
609
- },
610
- tooltip: {
611
- backgroundColor: ChartColors.WHITE_COLOR,
612
- borderRadius: 4,
613
- borderWidth: 0,
614
- dateTimeLabelFormats: {
615
- day: ChartOptions.DEFAULT_DATE_FORMAT,
616
- week: ChartOptions.DEFAULT_DATE_FORMAT
617
- },
618
- shadow: {
619
- color: ChartColors.BLACK_COLOR,
620
- offsetX: 0,
621
- offsetY: 2,
622
- opacity: 0.02,
623
- width: 6
624
- },
625
- split: false,
626
- shared: true,
627
- useHTML: true,
628
- headerFormat: "<div style=\"border-bottom: 1px solid " + ChartColors.GREY_COLORS[10] + "; padding: 0 8px 7px\">"
629
- + ("<span style=\"font-size: 12px; color: " + ChartColors.GREY_COLORS[60] + "\">{point.key}</span></div>"),
630
- pointFormat: "<div style=\"font-size: 14px; color: " + ChartColors.GREY_COLORS[100] + "; margin: 6px 8px 0 8px;\">"
631
- + '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y}</b></div>'
632
- },
633
- xAxis: {
634
- gridLineColor: ChartColors.GREY_COLORS[10],
635
- lineColor: ChartColors.GREY_COLORS[10],
636
- tickColor: ChartColors.GREY_COLORS[10],
637
- gridLineWidth: 1,
638
- title: {
639
- text: null
640
- },
641
- labels: {
642
- style: {
643
- color: ChartColors.GREY_COLORS[40],
644
- fontSize: '12px'
645
- }
646
- }
647
- },
648
- yAxis: {
649
- allowDecimals: false,
650
- gridLineColor: ChartColors.GREY_COLORS[10],
651
- lineColor: ChartColors.GREY_COLORS[10],
652
- gridLineWidth: 1,
653
- title: {
654
- text: null
655
- },
656
- labels: {
657
- style: {
658
- color: ChartColors.GREY_COLORS[40],
659
- fontSize: '12px'
660
- }
661
- }
662
- }
663
- };
664
- function isObject(item) {
665
- return (item && typeof item === 'object' && !Array.isArray(item));
666
- }
667
- function mergeDeep(target, source) {
668
- var output = deepCopy(target);
669
- if (isObject(target) && isObject(source)) {
670
- Object.keys(source).forEach(function (key) {
671
- var _a, _b;
672
- if (isObject(source[key])) {
673
- if (!(key in target))
674
- Object.assign(output, (_a = {}, _a[key] = source[key], _a));
675
- else
676
- output[key] = mergeDeep(target[key], source[key]);
677
- }
678
- else {
679
- Object.assign(output, (_b = {}, _b[key] = source[key], _b));
680
- }
681
- });
682
- }
683
- return output;
684
- }
685
- function deepCopy(source) {
686
- if (typeof source !== "object" || source === null) {
687
- return source; // Return the value if source is not an object
688
- }
689
- // Create an array or object to hold the values
690
- var newObject = Array.isArray(source) ? [] : {};
691
- for (var key in source) {
692
- if (source.hasOwnProperty(key)) {
693
- // Recursively (deep) copy for nested objects, including arrays
694
- newObject[key] = deepCopy(source[key]);
695
- }
696
- }
697
- return newObject;
698
- }
699
-
700
- var ChartBarOptions = /** @class */ (function (_super) {
701
- __extends(ChartBarOptions, _super);
702
- function ChartBarOptions() {
703
- return _super !== null && _super.apply(this, arguments) || this;
704
- }
705
- ChartBarOptions.build = function (options) {
706
- var seriesOptions = {
707
- borderRadiusTopLeft: 100,
708
- borderRadiusTopRight: 100,
709
- borderWidth: 0
710
- };
711
- var defaultColumnOptions = {
712
- chart: {
713
- type: 'bar'
714
- },
715
- xAxis: {
716
- categories: undefined,
717
- gridLineWidth: 0,
718
- lineWidth: 0,
719
- reversed: false,
720
- tickWidth: 0,
721
- labels: {
722
- align: 'center',
723
- formatter: function () {
724
- if (this.value && this.value.toString().length > 16) {
725
- return this.value.toString().substring(0, 15) + "...";
726
- }
727
- return this.value.toString();
728
- },
729
- style: {
730
- width: 100
731
- }
732
- },
733
- type: 'category'
734
- },
735
- yAxis: {
736
- type: 'linear',
737
- minTickInterval: 1
738
- },
739
- plotOptions: {
740
- bar: {
741
- maxPointWidth: 18,
742
- pointWidth: 20
743
- },
744
- series: seriesOptions
745
- }
746
- };
747
- return _super.build.call(this, mergeDeep(defaultColumnOptions, options));
748
- };
749
- ChartBarOptions.configureBar = function (series, categories, options, opposite, color, labelDateFormat) {
750
- ChartOptions.configure(series, options, color, labelDateFormat);
751
- if (categories && categories.length) {
752
- options.xAxis.categories = categories;
753
- }
754
- if (opposite && series.length === 2) {
755
- var negativeSerie = series[0];
756
- negativeSerie.borderRadiusBottomLeft = 100;
757
- negativeSerie.borderRadiusBottomRight = 100;
758
- negativeSerie.borderRadiusTopLeft = 0;
759
- negativeSerie.borderRadiusTopRight = 0;
760
- negativeSerie.data = negativeSerie.data.map(function (point) {
761
- if (point && isNaN(point)) {
762
- return Object.assign(Object.assign({}, point), { y: -Math.abs(point.y) });
763
- }
764
- else if (!isNaN(point)) {
765
- return -Math.abs(point);
766
- }
767
- return point;
768
- });
769
- options.plotOptions.series.stacking = 'normal';
770
- options.yAxis.labels.formatter = function () {
771
- return Math.abs(this.value) + '%';
772
- };
773
- options.tooltip.pointFormatter = function () {
774
- return "<div style=\"font-size: 14px; color: #344563; margin: 6px 8px 0 8px;\"><span style=\"color:" + this.color + ";\">\u25CF</span> " + this.series.name + ": <b>" + (Math.abs(this.y) + '%') + "</b></div>";
775
- };
776
- }
777
- };
778
- return ChartBarOptions;
779
- }(ChartOptions));
780
-
781
- var ChartBarComponent = /** @class */ (function () {
782
- function ChartBarComponent() {
783
- this.categories = [];
784
- this.chartOptions = {}; // https://api.highcharts.com/highcharts/
785
- this.color = exports.ChartColor.ElectricBlue;
786
- this.lastWidth = 0;
787
- }
788
- ChartBarComponent.prototype.ngOnChanges = function (changes) {
789
- if ((changes.series && !changes.series.firstChange) || (changes.color && !changes.color.firstChange)) {
790
- this.initChart();
791
- }
792
- };
793
- ChartBarComponent.prototype.ngAfterViewChecked = function () {
794
- if (this.chartRef && this.chartRef.nativeElement.clientWidth != this.lastWidth) {
795
- this.lastWidth = this.chartRef.nativeElement.clientWidth;
796
- if (this.chart) {
797
- this.chart.reflow();
798
- }
799
- else if (this.series && this.series.length) {
800
- this.initChart();
801
- }
802
- }
803
- };
804
- ChartBarComponent.prototype.initChart = function () {
805
- if (this.series) {
806
- this.chartOptions = ChartBarOptions.build(this.chartOptions);
807
- ChartBarOptions.configureBar(this.series, this.categories, this.chartOptions, this.opposite, this.color, this.labelDateFormat);
808
- this.chart = new Highcharts.Chart(this.chartRef.nativeElement, this.chartOptions);
809
- }
810
- };
811
- return ChartBarComponent;
812
- }());
813
- ChartBarComponent.decorators = [
814
- { type: core.Component, args: [{
815
- selector: 'ap-chart-bar',
816
- template: "<div #chart></div>\n",
817
- styles: [""]
818
- },] }
819
- ];
820
- ChartBarComponent.propDecorators = {
821
- chartRef: [{ type: core.ViewChild, args: ['chart',] }],
822
- categories: [{ type: core.Input }],
823
- chartOptions: [{ type: core.Input }],
824
- color: [{ type: core.Input }],
825
- labelDateFormat: [{ type: core.Input }],
826
- opposite: [{ type: core.Input }],
827
- series: [{ type: core.Input }]
828
- };
829
-
830
- var ChartColumnOptions = /** @class */ (function (_super) {
831
- __extends(ChartColumnOptions, _super);
832
- function ChartColumnOptions() {
833
- return _super !== null && _super.apply(this, arguments) || this;
834
- }
835
- ChartColumnOptions.buildColumn = function (options, simple) {
836
- var defaultColumnOptions = {
837
- chart: {
838
- type: 'column'
839
- },
840
- legend: {
841
- symbolHeight: 10
842
- },
843
- plotOptions: {
844
- column: {
845
- stacking: 'normal',
846
- borderWidth: 0,
847
- maxPointWidth: 20,
848
- events: {
849
- hide: function () {
850
- ChartColumnOptions.redrawWithRoundedColumns(this.chart);
851
- },
852
- show: function () {
853
- ChartColumnOptions.redrawWithRoundedColumns(this.chart);
854
- }
855
- }
856
- }
857
- },
858
- xAxis: {
859
- type: 'datetime'
860
- }
861
- };
862
- var simpleColumnOptions = {
863
- chart: {
864
- type: 'column',
865
- height: '80px'
866
- },
867
- credits: {
868
- enabled: false
869
- },
870
- plotOptions: {
871
- column: {
872
- events: {
873
- hide: function () {
874
- ChartColumnOptions.redrawWithRoundedColumns(this.chart);
875
- },
876
- show: function () {
877
- ChartColumnOptions.redrawWithRoundedColumns(this.chart);
878
- }
879
- },
880
- }
881
- },
882
- xAxis: {
883
- type: 'datetime',
884
- crosshair: true,
885
- labels: {
886
- enabled: false,
887
- formatter: function () {
888
- return Highcharts.dateFormat('%m/%d', this.value);
889
- }
890
- },
891
- lineWidth: 0,
892
- tickWidth: 0,
893
- gridLineWidth: 0
894
- },
895
- yAxis: {
896
- min: 0,
897
- labels: {
898
- enabled: false
899
- },
900
- gridLineWidth: 0
901
- }
902
- };
903
- return _super.build.call(this, mergeDeep(simple ? simpleColumnOptions : defaultColumnOptions, options));
904
- };
905
- ChartColumnOptions.redrawWithRoundedColumns = function (chart) {
906
- chart.series.map(function (serie, serieIndex, arr) {
907
- ChartColumnOptions.roundSerie(arr, serie.options, serieIndex);
908
- });
909
- chart.redraw(true);
910
- };
911
- ChartColumnOptions.roundSerie = function (series, serie, serieIndex) {
912
- var roundedOptionMap = [];
913
- var borderRadius = 0;
914
- if (serie.data) {
915
- serie.data.forEach(function (point, columnIndex) {
916
- // Check if all previous stacked data at the same abscissa (located higher on the graph) are missing or have a value of 0
917
- // if so, it means that this point is the visual top of the column, so we should round it
918
- var roundedColumnEnabled = series.slice(0, serieIndex)
919
- .every(function (otherSerie) {
920
- if (otherSerie.visible === false) {
921
- return true;
922
- }
923
- var pointAtSameAbscissa = otherSerie.options.data.find(function (otherPoint) { return otherPoint[0] === point[0]; });
924
- return !pointAtSameAbscissa || pointAtSameAbscissa[1] === 0;
925
- });
926
- borderRadius = roundedColumnEnabled ? 100 : 0;
927
- roundedOptionMap[columnIndex] = borderRadius;
928
- });
929
- serie.borderRadiusTopLeft = roundedOptionMap;
930
- serie.borderRadiusTopRight = roundedOptionMap;
931
- }
932
- };
933
- return ChartColumnOptions;
934
- }(ChartOptions));
935
-
936
- var ChartColumnComponent = /** @class */ (function () {
937
- function ChartColumnComponent() {
938
- this.chartOptions = {}; // https://api.highcharts.com/highcharts/
939
- this.color = exports.ChartColor.ElectricBlue;
940
- this.simple = false;
941
- this.lastWidth = 0;
942
- }
943
- ChartColumnComponent.prototype.ngOnChanges = function (changes) {
944
- if ((changes.series && !changes.series.firstChange) || (changes.color && !changes.color.firstChange)) {
945
- this.initChart();
946
- }
947
- };
948
- ChartColumnComponent.prototype.ngAfterViewChecked = function () {
949
- if (this.chartRef && this.chartRef.nativeElement.clientWidth != this.lastWidth) {
950
- this.lastWidth = this.chartRef.nativeElement.clientWidth;
951
- if (this.chart) {
952
- this.chart.reflow();
953
- }
954
- else if (this.series && this.series.length) {
955
- this.initChart();
956
- }
957
- }
958
- };
959
- ChartColumnComponent.prototype.initChart = function () {
960
- if (this.series) {
961
- this.chartOptions = ChartColumnOptions.buildColumn(this.chartOptions, this.simple);
962
- ChartColumnOptions.configure(this.series, this.chartOptions, this.color, this.labelDateFormat);
963
- this.chart = new Highcharts.Chart(this.chartRef.nativeElement, this.chartOptions);
964
- if (this.chart) {
965
- ChartColumnOptions.redrawWithRoundedColumns(this.chart);
966
- }
967
- }
968
- };
969
- return ChartColumnComponent;
970
- }());
971
- ChartColumnComponent.decorators = [
972
- { type: core.Component, args: [{
973
- selector: 'ap-chart-column',
974
- template: "<div #chart></div>\n",
975
- styles: [""]
976
- },] }
977
- ];
978
- ChartColumnComponent.propDecorators = {
979
- chartRef: [{ type: core.ViewChild, args: ['chart',] }],
980
- chartOptions: [{ type: core.Input }],
981
- color: [{ type: core.Input }],
982
- labelDateFormat: [{ type: core.Input }],
983
- series: [{ type: core.Input }],
984
- simple: [{ type: core.Input }]
985
- };
986
-
987
- exports.ChartMetricType = void 0;
988
- (function (ChartMetricType) {
989
- ChartMetricType[ChartMetricType["default"] = 0] = "default";
990
- ChartMetricType[ChartMetricType["total"] = 1] = "total";
991
- })(exports.ChartMetricType || (exports.ChartMetricType = {}));
992
- var ChartMetric = /** @class */ (function () {
993
- function ChartMetric() {
994
- }
995
- return ChartMetric;
996
- }());
997
-
998
- var ChartMetricsListComponent = /** @class */ (function () {
999
- function ChartMetricsListComponent() {
1000
- this.ChartMetricType = exports.ChartMetricType;
1001
- this.digitsInfo = '1.0-1';
1002
- }
1003
- return ChartMetricsListComponent;
1004
- }());
1005
- ChartMetricsListComponent.decorators = [
1006
- { type: core.Component, args: [{
1007
- changeDetection: core.ChangeDetectionStrategy.OnPush,
1008
- selector: "ap-chart-metrics-list",
1009
- template: "<mat-list>\n <ng-container *ngIf=\"metrics\">\n <mat-list-item *ngFor=\"let metric of metrics; let i = index\"\n [ngClass]=\"{'chart-metric-total': metric.type == ChartMetricType.total}\">\n <div class=\"chart-metric-name metric-label\"\n *ngIf=\"!metric.children\">\n {{metric.name}}\n </div>\n <div class=\"chart-metric-name\"\n *ngIf=\"metric.children\">\n <span class=\"metric-label\">\n {{metric.name}}\n </span>\n <span class=\"chart-metric-children\">\n <span *ngFor=\"let item of metric.children\">\n <span class=\"child-label\">{{item.name}}</span>: <span class=\"child-value\">{{item.value}}</span>\n </span>\n </span>\n </div>\n <div class=\"chart-metric-value metric-label\">\n {{metric.value | number: digitsInfo: locale}}\n </div>\n <mat-divider *ngIf=\"i < metrics.length - 1\"></mat-divider>\n </mat-list-item>\n </ng-container>\n</mat-list>\n",
1010
- styles: ["[color=facebook]{color:#1877f2}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#1877f2}[border=facebook]{border:1px solid #1877f2}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid red}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #fff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:#0000}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:initial}[border=transparent]{border:1px solid #0000}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #a566a5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #c7ab82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #f2713c}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #ffd006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94c5aa}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2a9d8f}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78acd8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525a9e}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6a2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729e}.metric-label{font-size:14px;color:#5d6a82}.chart-metric-total .metric-label{font-size:16px;color:#344563!important;font-weight:700}.chart-metric-name .chart-metric-children{color:#aeb5c1;font-size:14px}.chart-metric-name .chart-metric-children .child-label{margin-left:16px}.chart-metric-value{justify-content:left;flex:1 0 0;flex-direction:row;text-align:end;color:#344563}.mat-list-item{height:35px}.mat-list-item ::ng-deep .mat-list-item-content{padding:0}"]
1011
- },] }
1012
- ];
1013
- ChartMetricsListComponent.propDecorators = {
1014
- metrics: [{ type: core.Input }],
1015
- locale: [{ type: core.Input }]
1016
- };
1017
-
1018
- var ChartHeatmapOptions = /** @class */ (function (_super) {
1019
- __extends(ChartHeatmapOptions, _super);
1020
- function ChartHeatmapOptions() {
1021
- return _super !== null && _super.apply(this, arguments) || this;
1022
- }
1023
- ChartHeatmapOptions.build = function (options) {
1024
- var defaultHeatmapOptions = {
1025
- chart: {
1026
- type: 'heatmap',
1027
- height: 600
1028
- },
1029
- colorAxis: {
1030
- allowDecimals: false,
1031
- gridLineWidth: 2,
1032
- gridLineColor: 'white',
1033
- min: 0,
1034
- labels: {
1035
- style: {
1036
- fontSize: '12px'
1037
- }
1038
- }
1039
- },
1040
- legend: {
1041
- enabled: false
1042
- },
1043
- plotOptions: {
1044
- heatmap: {
1045
- borderColor: ChartColors.GREY_COLORS[10],
1046
- borderWidth: 1,
1047
- nullColor: 'white'
1048
- }
1049
- },
1050
- tooltip: {
1051
- headerFormat: '',
1052
- pointFormat: "<div style=\"border-bottom: 1px solid " + ChartColors.GREY_COLORS[10] + "; padding: 0 8px 7px\">"
1053
- + ("<span style=\"font-size: 12px; color: " + ChartColors.GREY_COLORS[60] + "\">{point.tooltipHeaderLabel}</span></div>")
1054
- + ("<div style=\"font-size: 14px; color: " + ChartColors.GREY_COLORS[100] + "; margin: 6px 8px 0 8px;\">")
1055
- + "<span style=\"color:{point.color}\">\u25CF</span> {series.name}: <b>{point.value}</b></div>",
1056
- },
1057
- xAxis: {
1058
- labels: {
1059
- formatter: function () {
1060
- return this.value.toString();
1061
- }
1062
- },
1063
- lineWidth: 1,
1064
- tickWidth: 0,
1065
- visible: true
1066
- },
1067
- yAxis: {
1068
- lineWidth: 0,
1069
- tickInterval: 3,
1070
- reversed: true,
1071
- visible: true
1072
- }
1073
- };
1074
- return _super.build.call(this, mergeDeep(defaultHeatmapOptions, options));
1075
- };
1076
- ChartHeatmapOptions.configureHeatmap = function (categoriesX, categoriesY, series, options, labelDateFormat) {
1077
- _super.configure.call(this, series, options, null, labelDateFormat);
1078
- if (categoriesX && categoriesX.length) {
1079
- options.xAxis.categories = categoriesX;
1080
- }
1081
- if (categoriesY && categoriesY.length) {
1082
- options.yAxis.categories = categoriesY;
1083
- }
1084
- };
1085
- return ChartHeatmapOptions;
1086
- }(ChartOptions));
1087
-
1088
- var ChartHeatmapComponent = /** @class */ (function () {
1089
- function ChartHeatmapComponent() {
1090
- this.categoriesX = [];
1091
- this.categoriesY = [];
1092
- this.chartOptions = {}; // https://api.highcharts.com/highcharts/
1093
- this.lastWidth = 0;
1094
- }
1095
- ChartHeatmapComponent.prototype.ngOnChanges = function (changes) {
1096
- if ((changes.series && !changes.series.firstChange)) {
1097
- this.initChart();
1098
- }
1099
- };
1100
- ChartHeatmapComponent.prototype.ngAfterViewChecked = function () {
1101
- if (this.chartRef && this.chartRef.nativeElement.clientWidth != this.lastWidth) {
1102
- this.lastWidth = this.chartRef.nativeElement.clientWidth;
1103
- if (this.chart) {
1104
- this.chart.reflow();
1105
- }
1106
- else if (this.series && this.series.length) {
1107
- this.initChart();
1108
- }
1109
- }
1110
- };
1111
- ChartHeatmapComponent.prototype.initChart = function () {
1112
- if (this.series) {
1113
- this.chartOptions = ChartHeatmapOptions.build(this.chartOptions);
1114
- ChartHeatmapOptions.configureHeatmap(this.categoriesX, this.categoriesY, this.series, this.chartOptions, this.labelDateFormat);
1115
- highmaps.mapChart(this.chartRef.nativeElement, this.chartOptions);
1116
- }
1117
- };
1118
- return ChartHeatmapComponent;
1119
- }());
1120
- ChartHeatmapComponent.decorators = [
1121
- { type: core.Component, args: [{
1122
- selector: 'ap-chart-heatmap',
1123
- template: "<div #chart></div>\n",
1124
- styles: [""]
1125
- },] }
1126
- ];
1127
- ChartHeatmapComponent.propDecorators = {
1128
- chartRef: [{ type: core.ViewChild, args: ['chart',] }],
1129
- categoriesX: [{ type: core.Input }],
1130
- categoriesY: [{ type: core.Input }],
1131
- chartOptions: [{ type: core.Input }],
1132
- labelDateFormat: [{ type: core.Input }],
1133
- series: [{ type: core.Input }]
1134
- };
1135
-
1136
- var ChartSplineOptions = /** @class */ (function (_super) {
1137
- __extends(ChartSplineOptions, _super);
1138
- function ChartSplineOptions() {
1139
- return _super !== null && _super.apply(this, arguments) || this;
1140
- }
1141
- ChartSplineOptions.build = function (options) {
1142
- var defaultSplineOptions = {
1143
- chart: {
1144
- type: 'spline'
1145
- },
1146
- plotOptions: {
1147
- series: {
1148
- marker: {
1149
- enabled: false,
1150
- radius: 2,
1151
- symbol: 'circle'
1152
- }
1153
- }
1154
- },
1155
- xAxis: {
1156
- type: 'datetime'
1157
- }
1158
- };
1159
- return _super.build.call(this, mergeDeep(defaultSplineOptions, options));
1160
- };
1161
- return ChartSplineOptions;
1162
- }(ChartOptions));
1163
-
1164
- var ChartSplineComponent = /** @class */ (function () {
1165
- function ChartSplineComponent() {
1166
- this.chartOptions = {}; // https://api.highcharts.com/highcharts/
1167
- this.color = exports.ChartColor.ElectricBlue;
1168
- this.lastWidth = 0;
1169
- }
1170
- ChartSplineComponent.prototype.ngOnChanges = function (changes) {
1171
- if ((changes.series && !changes.series.firstChange) || (changes.color && !changes.color.firstChange)) {
1172
- this.initChart();
1173
- }
1174
- };
1175
- ChartSplineComponent.prototype.ngAfterViewChecked = function () {
1176
- if (this.chartRef && this.chartRef.nativeElement.clientWidth !== this.lastWidth) {
1177
- this.lastWidth = this.chartRef.nativeElement.clientWidth;
1178
- if (this.chart) {
1179
- this.chart.reflow();
1180
- }
1181
- else if (this.series && this.series.length) {
1182
- this.initChart();
1183
- }
1184
- }
1185
- };
1186
- ChartSplineComponent.prototype.initChart = function () {
1187
- var _a;
1188
- if (this.series) {
1189
- this.chartOptions = ChartSplineOptions.build(this.chartOptions);
1190
- if (((_a = this.series[0].data) === null || _a === void 0 ? void 0 : _a.length) === 1) {
1191
- this.chartOptions.plotOptions.series.marker.enabled = true;
1192
- this.chartOptions.plotOptions.series.marker.radius = 5;
1193
- }
1194
- ChartSplineOptions.configure(this.series, this.chartOptions, this.color, this.labelDateFormat);
1195
- this.chart = new Highcharts.Chart(this.chartRef.nativeElement, this.chartOptions);
1196
- }
1197
- };
1198
- return ChartSplineComponent;
1199
- }());
1200
- ChartSplineComponent.decorators = [
1201
- { type: core.Component, args: [{
1202
- selector: 'ap-chart-spline',
1203
- template: "<div #chart></div>\n",
1204
- styles: [""]
1205
- },] }
1206
- ];
1207
- ChartSplineComponent.propDecorators = {
1208
- chartRef: [{ type: core.ViewChild, args: ['chart',] }],
1209
- chartOptions: [{ type: core.Input }],
1210
- color: [{ type: core.Input }],
1211
- labelDateFormat: [{ type: core.Input }],
1212
- series: [{ type: core.Input }]
1213
- };
1214
-
1215
- var ChartPieOptions = /** @class */ (function (_super) {
1216
- __extends(ChartPieOptions, _super);
1217
- function ChartPieOptions() {
1218
- return _super !== null && _super.apply(this, arguments) || this;
1219
- }
1220
- ChartPieOptions.buildPie = function (options, innerLabels) {
1221
- var defaultPieOptions = {
1222
- chart: {
1223
- type: 'pie',
1224
- plotBackgroundColor: null,
1225
- plotBorderWidth: null,
1226
- plotShadow: false
1227
- },
1228
- plotOptions: {
1229
- pie: {
1230
- dataLabels: {
1231
- distance: innerLabels ? -40 : 30,
1232
- useHTML: true
1233
- },
1234
- innerSize: '50%'
1235
- },
1236
- series: {
1237
- allowPointSelect: !innerLabels,
1238
- dataLabels: innerLabels ? {
1239
- format: '{point.percentage:.1f}%',
1240
- style: {
1241
- fontSize: '16px',
1242
- color: 'white',
1243
- textOutline: '0'
1244
- }
1245
- } : {
1246
- style: {
1247
- fontSize: '12px',
1248
- color: ChartColors.GREY_COLORS[60]
1249
- }
1250
- },
1251
- showInLegend: innerLabels
1252
- }
1253
- },
1254
- legend: innerLabels ? {
1255
- symbolHeight: 10,
1256
- enabled: true
1257
- } : {}
1258
- };
1259
- return _super.build.call(this, mergeDeep(defaultPieOptions, options));
1260
- };
1261
- ChartPieOptions.configurePie = function (series, options, color, labelDateFormat, innerLabels) {
1262
- _super.configure.call(this, series, options, color, labelDateFormat);
1263
- if (innerLabels) {
1264
- options.legend.enabled = true;
1265
- }
1266
- if (series && series.length > 0 && series[0]) {
1267
- options.colors = ChartColors.getColors(series[0].data.length, color);
1268
- }
1269
- };
1270
- return ChartPieOptions;
1271
- }(ChartOptions));
1272
-
1273
- var ChartPieComponent = /** @class */ (function () {
1274
- function ChartPieComponent() {
1275
- this.chartOptions = {}; // https://api.highcharts.com/highcharts/
1276
- this.color = exports.ChartColor.ElectricBlue;
1277
- this.innerLabels = false;
1278
- this.lastWidth = 0;
1279
- }
1280
- ChartPieComponent.prototype.ngOnChanges = function (changes) {
1281
- if ((changes.series && !changes.series.firstChange) || (changes.color && !changes.color.firstChange)) {
1282
- this.initChart();
1283
- }
1284
- };
1285
- ChartPieComponent.prototype.ngAfterViewChecked = function () {
1286
- if (this.chartRef && this.chartRef.nativeElement.clientWidth !== this.lastWidth) {
1287
- this.lastWidth = this.chartRef.nativeElement.clientWidth;
1288
- if (this.chart) {
1289
- this.chart.reflow();
1290
- }
1291
- else if (this.series && this.series.length) {
1292
- this.initChart();
1293
- }
1294
- }
1295
- };
1296
- ChartPieComponent.prototype.initChart = function () {
1297
- if (this.series) {
1298
- this.chartOptions = ChartPieOptions.buildPie(this.chartOptions, this.innerLabels);
1299
- ChartPieOptions.configurePie(this.series, this.chartOptions, this.color, this.labelDateFormat, this.innerLabels);
1300
- this.chart = new Highcharts.Chart(this.chartRef.nativeElement, this.chartOptions);
1301
- }
1302
- };
1303
- return ChartPieComponent;
1304
- }());
1305
- ChartPieComponent.decorators = [
1306
- { type: core.Component, args: [{
1307
- selector: 'ap-chart-pie',
1308
- template: "<div #chart></div>\n",
1309
- styles: [""]
1310
- },] }
1311
- ];
1312
- ChartPieComponent.propDecorators = {
1313
- chartRef: [{ type: core.ViewChild, args: ['chart',] }],
1314
- chartOptions: [{ type: core.Input }],
1315
- color: [{ type: core.Input }],
1316
- innerLabels: [{ type: core.Input }],
1317
- labelDateFormat: [{ type: core.Input }],
1318
- series: [{ type: core.Input }]
1319
- };
1320
-
1321
- var AgorapulseUiChartsModule = /** @class */ (function () {
1322
- function AgorapulseUiChartsModule() {
1323
- }
1324
- return AgorapulseUiChartsModule;
1325
- }());
1326
- AgorapulseUiChartsModule.decorators = [
1327
- { type: core.NgModule, args: [{
1328
- declarations: [
1329
- ChartBarComponent,
1330
- ChartColumnComponent,
1331
- ChartHeatmapComponent,
1332
- ChartMetricsListComponent,
1333
- ChartSplineComponent,
1334
- ChartPieComponent
1335
- ],
1336
- imports: [
1337
- common.CommonModule,
1338
- highchartsAngular.HighchartsChartModule,
1339
- list.MatListModule
1340
- ],
1341
- exports: [
1342
- ChartBarComponent,
1343
- ChartColumnComponent,
1344
- ChartHeatmapComponent,
1345
- ChartMetricsListComponent,
1346
- ChartSplineComponent,
1347
- ChartPieComponent
1348
- ],
1349
- providers: []
1350
- },] }
1351
- ];
1352
-
1353
- /*
1354
- * Public API Surface of ui-charts
1355
- */
1356
- borderRadiusPlugin(Highcharts__namespace);
1357
-
1358
- /**
1359
- * Generated bundle index. Do not edit.
1360
- */
1361
-
1362
- exports.AgorapulseUiChartsModule = AgorapulseUiChartsModule;
1363
- exports.ChartBarComponent = ChartBarComponent;
1364
- exports.ChartColors = ChartColors;
1365
- exports.ChartColumnComponent = ChartColumnComponent;
1366
- exports.ChartHeatmapComponent = ChartHeatmapComponent;
1367
- exports.ChartMetric = ChartMetric;
1368
- exports.ChartMetricsListComponent = ChartMetricsListComponent;
1369
- exports.ChartOptions = ChartOptions;
1370
- exports.ChartPieComponent = ChartPieComponent;
1371
- exports.ChartSplineComponent = ChartSplineComponent;
1372
- exports.borderRadiusPlugin = borderRadiusPlugin;
1373
- exports.mergeDeep = mergeDeep;
1374
-
1375
- Object.defineProperty(exports, '__esModule', { value: true });
1376
-
1377
- })));
1378
- //# sourceMappingURL=agorapulse-ui-charts.umd.js.map