angular-chrts 1.0.0-beta.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.
@@ -0,0 +1,1756 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, Component, output, viewChild, signal, inject, ChangeDetectorRef } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i1 from '@unovis/angular';
5
+ import { VisXYContainerModule, VisAreaModule, VisAxisModule, VisLineModule, VisTooltipModule, VisCrosshairModule, VisBulletLegendModule, VisGroupedBarModule, VisStackedBarModule, VisSingleContainerModule, VisDonutModule, VisScatterModule, VisTimelineModule } from '@unovis/angular';
6
+ import { Position, CurveType as CurveType$1, Orientation as Orientation$1, StackedBar, GroupedBar, Donut, Scatter, Timeline } from '@unovis/ts';
7
+
8
+ var LegendPosition;
9
+ (function (LegendPosition) {
10
+ LegendPosition["TopLeft"] = "top-left";
11
+ LegendPosition["TopCenter"] = "top-center";
12
+ LegendPosition["TopRight"] = "top-right";
13
+ LegendPosition["BottomLeft"] = "bottom-left";
14
+ LegendPosition["BottomCenter"] = "bottom-center";
15
+ LegendPosition["BottomRight"] = "bottom-right";
16
+ })(LegendPosition || (LegendPosition = {}));
17
+ var CurveType;
18
+ (function (CurveType) {
19
+ CurveType["Basis"] = "basis";
20
+ CurveType["BasisClosed"] = "basisClosed";
21
+ CurveType["BasisOpen"] = "basisOpen";
22
+ CurveType["Bundle"] = "bundle";
23
+ CurveType["Cardinal"] = "cardinal";
24
+ CurveType["CardinalClosed"] = "cardinalClosed";
25
+ CurveType["CardinalOpen"] = "cardinalOpen";
26
+ CurveType["CatmullRom"] = "catmullRom";
27
+ CurveType["CatmullRomClosed"] = "catmullRomClosed";
28
+ CurveType["CatmullRomOpen"] = "catmullRomOpen";
29
+ CurveType["Linear"] = "linear";
30
+ CurveType["LinearClosed"] = "linearClosed";
31
+ CurveType["MonotoneX"] = "monotoneX";
32
+ CurveType["MonotoneY"] = "monotoneY";
33
+ CurveType["Natural"] = "natural";
34
+ CurveType["Step"] = "step";
35
+ CurveType["StepAfter"] = "stepAfter";
36
+ CurveType["StepBefore"] = "stepBefore";
37
+ })(CurveType || (CurveType = {}));
38
+ var Orientation;
39
+ (function (Orientation) {
40
+ Orientation["Horizontal"] = "horizontal";
41
+ Orientation["Vertical"] = "vertical";
42
+ })(Orientation || (Orientation = {}));
43
+ var DonutType;
44
+ (function (DonutType) {
45
+ DonutType["Half"] = "half";
46
+ DonutType["Full"] = "full";
47
+ })(DonutType || (DonutType = {}));
48
+
49
+ class TooltipComponent {
50
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
51
+ categories = input.required(...(ngDevMode ? [{ debugName: "categories" }] : []));
52
+ titleFormatter = input(...(ngDevMode ? [undefined, { debugName: "titleFormatter" }] : []));
53
+ yFormatter = input(...(ngDevMode ? [undefined, { debugName: "yFormatter" }] : []));
54
+ titleFormat = computed(() => {
55
+ const data = this.data();
56
+ const formatter = this.titleFormatter();
57
+ if (formatter)
58
+ return formatter(data);
59
+ // getFirstPropertyValue equivalent
60
+ if (data && Object.keys(data).length > 0) {
61
+ const firstKey = Object.keys(data)[0];
62
+ return data[firstKey];
63
+ }
64
+ return undefined;
65
+ }, ...(ngDevMode ? [{ debugName: "titleFormat" }] : []));
66
+ keyBlockList = ['_index', '_stacked', '_ending'];
67
+ visibleEntries = computed(() => {
68
+ const data = this.data();
69
+ const categories = this.categories();
70
+ return Object.entries(data ?? {})
71
+ .filter(([key]) => !this.keyBlockList.includes(key) && Object.keys(categories).includes(key))
72
+ .map(([key, value]) => ({ key, value }));
73
+ }, ...(ngDevMode ? [{ debugName: "visibleEntries" }] : []));
74
+ containerStyle = {
75
+ display: 'flex',
76
+ flexDirection: 'column',
77
+ padding: '0px',
78
+ margin: '0px'
79
+ };
80
+ titleStyle = {
81
+ color: 'var(--vis-tooltip-title-color, #000)',
82
+ textTransform: 'var(--vis-tooltip-title-text-transform, capitalize)',
83
+ borderBottom: 'var(--vis-tooltip-title-border-bottom, 1px solid #e5e7eb)',
84
+ padding: 'var(--vis-tooltip-title-padding, 0.75rem 0.75rem 0.5rem 0.75rem)',
85
+ margin: 'var(--vis-tooltip-title-margin, 0 0 0.25rem 0)',
86
+ fontSize: 'var(--vis-tooltip-title-font-size, 0.875rem)',
87
+ lineHeight: 'var(--vis-tooltip-title-line-height, 100%)',
88
+ fontWeight: 'var(--vis-tooltip-title-font-weight, 600)',
89
+ };
90
+ contentStyle = {
91
+ display: 'grid',
92
+ gridTemplateColumns: 'auto 1fr auto',
93
+ alignItems: 'center',
94
+ gap: 'var(--vis-tooltip-content-gap, 0.25rem 0.5rem)',
95
+ padding: 'var(--vis-tooltip-content-padding, 0 0.75rem 0.5rem 0.75rem)',
96
+ };
97
+ labelStyle = {
98
+ fontWeight: 'var(--vis-tooltip-label-font-weight, 400)',
99
+ fontSize: 'var(--vis-tooltip-label-font-size, 0.875rem)',
100
+ color: 'var(--vis-tooltip-label-color, inherit)',
101
+ margin: 'var(--vis-tooltip-label-margin, 0 1rem 0 0)',
102
+ whiteSpace: 'nowrap',
103
+ };
104
+ valueStyle = {
105
+ fontSize: 'var(--vis-tooltip-value-font-size, 0.875rem)',
106
+ fontWeight: 'var(--vis-tooltip-value-font-weight, 600)',
107
+ color: 'var(--vis-tooltip-value-color, inherit)',
108
+ textAlign: 'right',
109
+ fontVariantNumeric: 'tabular-nums',
110
+ };
111
+ getDotStyle(key, index) {
112
+ const category = this.categories()[key];
113
+ const color = (category && typeof category.color === 'string')
114
+ ? category.color
115
+ : `var(--vis-color${index})`;
116
+ return {
117
+ width: '8px',
118
+ height: '8px',
119
+ aspectRatio: '1',
120
+ borderRadius: 'var(--vis-tooltip-dot-border-radius, 4px)',
121
+ margin: 'var(--vis-tooltip-dot-margin, 0)',
122
+ flexShrink: '0',
123
+ backgroundColor: color,
124
+ };
125
+ }
126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
127
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TooltipComponent, isStandalone: true, selector: "ngx-tooltip", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, titleFormatter: { classPropertyName: "titleFormatter", publicName: "titleFormatter", isSignal: true, isRequired: false, transformFunction: null }, yFormatter: { classPropertyName: "yFormatter", publicName: "yFormatter", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
128
+ <div [style]="containerStyle">
129
+ @if (titleFormat()) {
130
+ <div [style]="titleStyle">
131
+ {{ titleFormat() }}
132
+ </div>
133
+ }
134
+ <div [style]="contentStyle">
135
+ @for (entry of visibleEntries(); track entry.key; let i = $index) {
136
+ <span [style]="getDotStyle(entry.key, i)"></span>
137
+ <span [style]="labelStyle">
138
+ {{ categories()[entry.key].name }}
139
+ </span>
140
+ <span [style]="valueStyle">
141
+ {{ yFormatter() ? yFormatter()!(entry.value, i, []) : entry.value }}
142
+ </span>
143
+ }
144
+ </div>
145
+ </div>
146
+ `, isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
147
+ }
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TooltipComponent, decorators: [{
149
+ type: Component,
150
+ args: [{ selector: 'ngx-tooltip', standalone: true, imports: [], template: `
151
+ <div [style]="containerStyle">
152
+ @if (titleFormat()) {
153
+ <div [style]="titleStyle">
154
+ {{ titleFormat() }}
155
+ </div>
156
+ }
157
+ <div [style]="contentStyle">
158
+ @for (entry of visibleEntries(); track entry.key; let i = $index) {
159
+ <span [style]="getDotStyle(entry.key, i)"></span>
160
+ <span [style]="labelStyle">
161
+ {{ categories()[entry.key].name }}
162
+ </span>
163
+ <span [style]="valueStyle">
164
+ {{ yFormatter() ? yFormatter()!(entry.value, i, []) : entry.value }}
165
+ </span>
166
+ }
167
+ </div>
168
+ </div>
169
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
170
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], titleFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleFormatter", required: false }] }], yFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "yFormatter", required: false }] }] } });
171
+
172
+ function getDistributedIndices(length, numTicks) {
173
+ // Handle edge cases
174
+ if (numTicks <= 0)
175
+ return [];
176
+ // If numTicks >= length, return all indices
177
+ if (numTicks >= length) {
178
+ return Array.from({ length }, (_, i) => i);
179
+ }
180
+ // Special case: if numTicks is 1, return only the middle index
181
+ if (numTicks === 1) {
182
+ return [Math.floor((length - 1) / 2)];
183
+ }
184
+ // For 2 ticks, just return first and last
185
+ if (numTicks === 2) {
186
+ return [0, length - 1];
187
+ }
188
+ // For 3 or more ticks, we need to ensure perfectly even distribution
189
+ const indices = [];
190
+ // We'll manually calculate the indices to ensure perfect distribution
191
+ for (let i = 0; i < numTicks; i++) {
192
+ // This formula ensures perfect distribution of indices
193
+ const index = Math.round((i * (length - 1)) / (numTicks - 1));
194
+ indices.push(index);
195
+ }
196
+ return indices;
197
+ }
198
+ function getFirstPropertyValue(obj) {
199
+ if (obj && Object.keys(obj).length > 0) {
200
+ const firstKey = Object.keys(obj)[0];
201
+ return obj[firstKey];
202
+ }
203
+ return undefined;
204
+ }
205
+ const markerShape = (type, size, strokeWidth, color, strokeColor) => {
206
+ switch (type) {
207
+ case 'circle':
208
+ return `<circle cx="${size / 2}" cy="${size / 2}" r="${(size - strokeWidth) / 2}" stroke-width="${strokeWidth}" stroke="${strokeColor}" fill="${color}" />`;
209
+ case 'square':
210
+ return `<rect x="${strokeWidth / 2}" y="${strokeWidth / 2}" width="${size - strokeWidth}" height="${size - strokeWidth}" stroke-width="${strokeWidth}" stroke="${strokeColor}" fill="${color}" />`;
211
+ case 'triangle':
212
+ return `<polygon points="${size / 2},${strokeWidth / 2} ${size - strokeWidth / 2},${size - strokeWidth / 2} ${strokeWidth / 2},${size - strokeWidth / 2}" stroke-width="${strokeWidth}" stroke="${strokeColor}" fill="${color}" />`;
213
+ case 'diamond':
214
+ return `<polygon points="${size / 2},${strokeWidth / 2} ${size - strokeWidth / 2},${size / 2} ${size / 2},${size - strokeWidth / 2} ${strokeWidth / 2},${size / 2}" stroke-width="${strokeWidth}" stroke="${strokeColor}" fill="${color}" />`;
215
+ default:
216
+ return '';
217
+ }
218
+ };
219
+ function createMarkers(markerConfig) {
220
+ const makeMarker = (id, cfg) => {
221
+ const type = cfg.type || 'circle';
222
+ const size = cfg.size || 10;
223
+ const strokeWidth = cfg.strokeWidth || 2;
224
+ const color = cfg.color || '#000';
225
+ const strokeColor = cfg.strokeColor || cfg.color || '#000';
226
+ return `<marker id="${id}" viewBox="0 0 ${size} ${size}" refX="${size / 2}" refY="${size / 2}" markerWidth="${size / 2}" markerHeight="${size / 2}" orient="auto">
227
+ ${markerShape(type, size, strokeWidth, color, strokeColor)}
228
+ </marker>`;
229
+ };
230
+ return Object.entries(markerConfig.config)
231
+ .map(([key, cfg]) => {
232
+ const legacyId = `${markerConfig.id}-${key}`;
233
+ return makeMarker(legacyId, cfg);
234
+ })
235
+ .join('\n');
236
+ }
237
+ function logPremiumUpgradeMessage() {
238
+ // Logic for premium upgrade message
239
+ }
240
+
241
+ class AreaChartComponent {
242
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
243
+ height = input(400, ...(ngDevMode ? [{ debugName: "height" }] : []));
244
+ padding = input({
245
+ top: 5,
246
+ right: 5,
247
+ bottom: 5,
248
+ left: 5,
249
+ }, ...(ngDevMode ? [{ debugName: "padding" }] : []));
250
+ categories = input.required(...(ngDevMode ? [{ debugName: "categories" }] : []));
251
+ stacked = input(false, ...(ngDevMode ? [{ debugName: "stacked" }] : []));
252
+ hideArea = input(false, ...(ngDevMode ? [{ debugName: "hideArea" }] : []));
253
+ curveType = input(...(ngDevMode ? [undefined, { debugName: "curveType" }] : []));
254
+ lineWidth = input(2, ...(ngDevMode ? [{ debugName: "lineWidth" }] : []));
255
+ lineDashArray = input(...(ngDevMode ? [undefined, { debugName: "lineDashArray" }] : []));
256
+ xLabel = input(...(ngDevMode ? [undefined, { debugName: "xLabel" }] : []));
257
+ yLabel = input(...(ngDevMode ? [undefined, { debugName: "yLabel" }] : []));
258
+ xFormatter = input(...(ngDevMode ? [undefined, { debugName: "xFormatter" }] : []));
259
+ yFormatter = input(...(ngDevMode ? [undefined, { debugName: "yFormatter" }] : []));
260
+ xNumTicks = input(...(ngDevMode ? [undefined, { debugName: "xNumTicks" }] : []));
261
+ xExplicitTicks = input(...(ngDevMode ? [undefined, { debugName: "xExplicitTicks" }] : []));
262
+ minMaxTicksOnly = input(false, ...(ngDevMode ? [{ debugName: "minMaxTicksOnly" }] : []));
263
+ yNumTicks = input(...(ngDevMode ? [undefined, { debugName: "yNumTicks" }] : []));
264
+ hideXAxis = input(false, ...(ngDevMode ? [{ debugName: "hideXAxis" }] : []));
265
+ hideYAxis = input(false, ...(ngDevMode ? [{ debugName: "hideYAxis" }] : []));
266
+ xGridLine = input(false, ...(ngDevMode ? [{ debugName: "xGridLine" }] : []));
267
+ yGridLine = input(false, ...(ngDevMode ? [{ debugName: "yGridLine" }] : []));
268
+ xDomainLine = input(false, ...(ngDevMode ? [{ debugName: "xDomainLine" }] : []));
269
+ yDomainLine = input(false, ...(ngDevMode ? [{ debugName: "yDomainLine" }] : []));
270
+ xTickLine = input(false, ...(ngDevMode ? [{ debugName: "xTickLine" }] : []));
271
+ yTickLine = input(false, ...(ngDevMode ? [{ debugName: "yTickLine" }] : []));
272
+ hideTooltip = input(false, ...(ngDevMode ? [{ debugName: "hideTooltip" }] : []));
273
+ hideLegend = input(false, ...(ngDevMode ? [{ debugName: "hideLegend" }] : []));
274
+ legendPosition = input(LegendPosition.BottomCenter, ...(ngDevMode ? [{ debugName: "legendPosition" }] : []));
275
+ legendStyle = input(...(ngDevMode ? [undefined, { debugName: "legendStyle" }] : []));
276
+ tooltipStyle = input({}, ...(ngDevMode ? [{ debugName: "tooltipStyle" }] : []));
277
+ tooltipTitleFormatter = input(...(ngDevMode ? [undefined, { debugName: "tooltipTitleFormatter" }] : []));
278
+ markerConfig = input(...(ngDevMode ? [undefined, { debugName: "markerConfig" }] : []));
279
+ gradientStops = input([
280
+ { offset: '0%', stopOpacity: 1 },
281
+ { offset: '75%', stopOpacity: 0 },
282
+ ], ...(ngDevMode ? [{ debugName: "gradientStops" }] : []));
283
+ yDomain = input(...(ngDevMode ? [undefined, { debugName: "yDomain" }] : []));
284
+ xDomain = input(...(ngDevMode ? [undefined, { debugName: "xDomain" }] : []));
285
+ click = output();
286
+ tooltipWrapper = viewChild('tooltipWrapper', ...(ngDevMode ? [{ debugName: "tooltipWrapper" }] : []));
287
+ hoverValues = signal(undefined, ...(ngDevMode ? [{ debugName: "hoverValues" }] : []));
288
+ DEFAULT_OPACITY = 0.5;
289
+ DEFAULT_COLOR = '#3b82f6';
290
+ Position = Position;
291
+ CurveType = CurveType$1;
292
+ categoryKeys = computed(() => Object.keys(this.categories()), ...(ngDevMode ? [{ debugName: "categoryKeys" }] : []));
293
+ colors = computed(() => {
294
+ const cats = this.categories();
295
+ return Object.keys(cats).map((key, index) => {
296
+ return cats[key].color ?? `var(--vis-color${index})`;
297
+ });
298
+ }, ...(ngDevMode ? [{ debugName: "colors" }] : []));
299
+ isLegendTop = computed(() => this.legendPosition().startsWith('top'), ...(ngDevMode ? [{ debugName: "isLegendTop" }] : []));
300
+ legendAlignment = computed(() => {
301
+ const pos = this.legendPosition();
302
+ if (pos.includes('left'))
303
+ return 'flex-start';
304
+ if (pos.includes('right'))
305
+ return 'flex-end';
306
+ return 'center';
307
+ }, ...(ngDevMode ? [{ debugName: "legendAlignment" }] : []));
308
+ legendItems = computed(() => {
309
+ return Object.values(this.categories()).map((item) => ({
310
+ ...item,
311
+ color: Array.isArray(item.color) ? item.color[0] : item.color,
312
+ }));
313
+ }, ...(ngDevMode ? [{ debugName: "legendItems" }] : []));
314
+ svgDefs = computed(() => {
315
+ const stops = this.gradientStops();
316
+ const colors = this.colors();
317
+ return colors.map((color, index) => {
318
+ const id = `gradient-${index}-${color.replace(/#/g, '')}`;
319
+ return `
320
+ <linearGradient id="${id}" gradientTransform="rotate(90)">
321
+ ${stops.map(stop => `
322
+ <stop offset="${stop.offset}" stop-color="${color}" stop-opacity="${stop.stopOpacity}" />
323
+ `).join('')}
324
+ <stop offset="100%" stop-color="${color}" stop-opacity="0" />
325
+ </linearGradient>
326
+ `;
327
+ }).join('');
328
+ }, ...(ngDevMode ? [{ debugName: "svgDefs" }] : []));
329
+ stackedYAccessors = computed(() => {
330
+ const keys = this.categoryKeys();
331
+ return keys.map(key => (d) => Number(d[key]));
332
+ }, ...(ngDevMode ? [{ debugName: "stackedYAccessors" }] : []));
333
+ stackedLineYAccessors = computed(() => {
334
+ const keys = this.categoryKeys();
335
+ return keys.map((_, index) => {
336
+ return (d) => {
337
+ let sum = 0;
338
+ for (let i = 0; i <= index; i++) {
339
+ sum += Number(d[keys[i]]) || 0;
340
+ }
341
+ return sum;
342
+ };
343
+ });
344
+ }, ...(ngDevMode ? [{ debugName: "stackedLineYAccessors" }] : []));
345
+ markerSvgDefs = computed(() => {
346
+ const config = this.markerConfig();
347
+ if (!config?.config)
348
+ return '';
349
+ return createMarkers(config);
350
+ }, ...(ngDevMode ? [{ debugName: "markerSvgDefs" }] : []));
351
+ markerCssVars = computed(() => {
352
+ const config = this.markerConfig();
353
+ if (!config?.config)
354
+ return {};
355
+ const vars = {};
356
+ for (const key of Object.keys(config.config)) {
357
+ vars[`--vis-marker-${key}`] = `url("#${config.id}-${key}")`;
358
+ }
359
+ return vars;
360
+ }, ...(ngDevMode ? [{ debugName: "markerCssVars" }] : []));
361
+ stackedColorAccessor = (_d, i) => this.colors()[i] ?? this.DEFAULT_COLOR;
362
+ _x = (_, i) => i;
363
+ getYAccessor(categoryId) {
364
+ return (d) => Number(d[categoryId]);
365
+ }
366
+ getGradientSelector(index) {
367
+ const color = this.colors()[index];
368
+ const id = `gradient-${index}-${color.replace(/#/g, '')}`;
369
+ return `url(#${id})`;
370
+ }
371
+ onCrosshairUpdate = (d) => {
372
+ this.hoverValues.set(d);
373
+ this.cdr.detectChanges();
374
+ return this.tooltipWrapper()?.nativeElement.innerHTML || '';
375
+ };
376
+ onClick(event) {
377
+ this.click.emit({ event, values: this.hoverValues() });
378
+ }
379
+ cdr = inject(ChangeDetectorRef);
380
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AreaChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
381
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AreaChartComponent, isStandalone: true, selector: "ngx-area-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null }, hideArea: { classPropertyName: "hideArea", publicName: "hideArea", isSignal: true, isRequired: false, transformFunction: null }, curveType: { classPropertyName: "curveType", publicName: "curveType", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, lineDashArray: { classPropertyName: "lineDashArray", publicName: "lineDashArray", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, xFormatter: { classPropertyName: "xFormatter", publicName: "xFormatter", isSignal: true, isRequired: false, transformFunction: null }, yFormatter: { classPropertyName: "yFormatter", publicName: "yFormatter", isSignal: true, isRequired: false, transformFunction: null }, xNumTicks: { classPropertyName: "xNumTicks", publicName: "xNumTicks", isSignal: true, isRequired: false, transformFunction: null }, xExplicitTicks: { classPropertyName: "xExplicitTicks", publicName: "xExplicitTicks", isSignal: true, isRequired: false, transformFunction: null }, minMaxTicksOnly: { classPropertyName: "minMaxTicksOnly", publicName: "minMaxTicksOnly", isSignal: true, isRequired: false, transformFunction: null }, yNumTicks: { classPropertyName: "yNumTicks", publicName: "yNumTicks", isSignal: true, isRequired: false, transformFunction: null }, hideXAxis: { classPropertyName: "hideXAxis", publicName: "hideXAxis", isSignal: true, isRequired: false, transformFunction: null }, hideYAxis: { classPropertyName: "hideYAxis", publicName: "hideYAxis", isSignal: true, isRequired: false, transformFunction: null }, xGridLine: { classPropertyName: "xGridLine", publicName: "xGridLine", isSignal: true, isRequired: false, transformFunction: null }, yGridLine: { classPropertyName: "yGridLine", publicName: "yGridLine", isSignal: true, isRequired: false, transformFunction: null }, xDomainLine: { classPropertyName: "xDomainLine", publicName: "xDomainLine", isSignal: true, isRequired: false, transformFunction: null }, yDomainLine: { classPropertyName: "yDomainLine", publicName: "yDomainLine", isSignal: true, isRequired: false, transformFunction: null }, xTickLine: { classPropertyName: "xTickLine", publicName: "xTickLine", isSignal: true, isRequired: false, transformFunction: null }, yTickLine: { classPropertyName: "yTickLine", publicName: "yTickLine", isSignal: true, isRequired: false, transformFunction: null }, hideTooltip: { classPropertyName: "hideTooltip", publicName: "hideTooltip", isSignal: true, isRequired: false, transformFunction: null }, hideLegend: { classPropertyName: "hideLegend", publicName: "hideLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendStyle: { classPropertyName: "legendStyle", publicName: "legendStyle", isSignal: true, isRequired: false, transformFunction: null }, tooltipStyle: { classPropertyName: "tooltipStyle", publicName: "tooltipStyle", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitleFormatter: { classPropertyName: "tooltipTitleFormatter", publicName: "tooltipTitleFormatter", isSignal: true, isRequired: false, transformFunction: null }, markerConfig: { classPropertyName: "markerConfig", publicName: "markerConfig", isSignal: true, isRequired: false, transformFunction: null }, gradientStops: { classPropertyName: "gradientStops", publicName: "gradientStops", isSignal: true, isRequired: false, transformFunction: null }, yDomain: { classPropertyName: "yDomain", publicName: "yDomain", isSignal: true, isRequired: false, transformFunction: null }, xDomain: { classPropertyName: "xDomain", publicName: "xDomain", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "tooltipWrapper", first: true, predicate: ["tooltipWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
382
+ <div
383
+ [style.display]="'flex'"
384
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
385
+ [style.gap]="'var(--vis-legend-spacing)'"
386
+ [style]="markerCssVars()"
387
+ [class.stacked-area-chart]="stacked()"
388
+ [id]="markerConfig()?.id"
389
+ (click)="onClick($event)"
390
+ >
391
+ <vis-xy-container
392
+ [data]="data()"
393
+ [height]="height()"
394
+ [padding]="padding()"
395
+ [yDomain]="yDomain()"
396
+ [xDomain]="xDomain()"
397
+ >
398
+ @if (!hideTooltip()) {
399
+ <vis-tooltip
400
+ [horizontalPlacement]="Position.Right"
401
+ [verticalPlacement]="Position.Top"
402
+ ></vis-tooltip>
403
+ }
404
+
405
+ @if (stacked()) {
406
+ <vis-area
407
+ [x]="_x"
408
+ [y]="stackedYAccessors()"
409
+ [color]="stackedColorAccessor"
410
+ [opacity]="hideArea() ? 0 : DEFAULT_OPACITY"
411
+ [curveType]="curveType() || CurveType.MonotoneX"
412
+ ></vis-area>
413
+ <vis-line
414
+ [x]="_x"
415
+ [y]="stackedLineYAccessors()"
416
+ [color]="stackedColorAccessor"
417
+ [curveType]="curveType() || CurveType.MonotoneX"
418
+ [lineWidth]="lineWidth()"
419
+ ></vis-line>
420
+ } @else {
421
+ @for (categoryId of categoryKeys(); track categoryId; let i = $index) {
422
+ <vis-area
423
+ [x]="_x"
424
+ [y]="getYAccessor(categoryId)"
425
+ [color]="getGradientSelector(i)"
426
+ [opacity]="hideArea() ? 0 : DEFAULT_OPACITY"
427
+ [curveType]="curveType() || CurveType.MonotoneX"
428
+ ></vis-area>
429
+ <vis-line
430
+ [x]="_x"
431
+ [y]="getYAccessor(categoryId)"
432
+ [color]="colors()[i]"
433
+ [curveType]="curveType() || CurveType.MonotoneX"
434
+ [lineWidth]="lineWidth()"
435
+ [lineDashArray]="lineDashArray() ? lineDashArray()![i] : undefined"
436
+ ></vis-line>
437
+ }
438
+ }
439
+
440
+ @if (!hideXAxis()) {
441
+ <vis-axis
442
+ type="x"
443
+ [label]="xLabel()"
444
+ [labelMargin]="8"
445
+ [numTicks]="xNumTicks()"
446
+ [tickFormat]="xFormatter()"
447
+ [tickValues]="xExplicitTicks()"
448
+ [gridLine]="xGridLine()"
449
+ [domainLine]="xDomainLine()"
450
+ [tickLine]="xTickLine()"
451
+ [minMaxTicksOnly]="minMaxTicksOnly()"
452
+ ></vis-axis>
453
+ }
454
+
455
+ @if (!hideYAxis()) {
456
+ <vis-axis
457
+ type="y"
458
+ [label]="yLabel()"
459
+ [numTicks]="yNumTicks()"
460
+ [tickFormat]="yFormatter()"
461
+ [gridLine]="yGridLine()"
462
+ [domainLine]="yDomainLine()"
463
+ [tickLine]="yTickLine()"
464
+ ></vis-axis>
465
+ }
466
+
467
+ @if (!hideTooltip()) {
468
+ <vis-crosshair
469
+ [template]="onCrosshairUpdate"
470
+ ></vis-crosshair>
471
+ }
472
+ </vis-xy-container>
473
+
474
+ @if (!hideLegend()) {
475
+ <div
476
+ [style.display]="'flex'"
477
+ [style.justifyContent]="legendAlignment()"
478
+ >
479
+ <vis-bullet-legend
480
+ [style]="legendStyle()"
481
+ [items]="legendItems()"
482
+ ></vis-bullet-legend>
483
+ </div>
484
+ }
485
+
486
+ <div #tooltipWrapper style="display: none">
487
+ @if (hoverValues()) {
488
+ <ngx-tooltip
489
+ [data]="hoverValues()!"
490
+ [categories]="categories()"
491
+ [titleFormatter]="tooltipTitleFormatter()"
492
+ [yFormatter]="yFormatter()"
493
+ ></ngx-tooltip>
494
+ }
495
+ </div>
496
+ </div>
497
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: VisXYContainerModule }, { kind: "component", type: i1.VisXYContainerComponent, selector: "vis-xy-container", inputs: ["width", "height", "xScale", "xDomain", "xDomainMinConstraint", "xDomainMaxConstraint", "xRange", "yScale", "yDomain", "yDomainMinConstraint", "yDomainMaxConstraint", "yRange", "yDirection", "preventEmptyDomain", "duration", "margin", "padding", "scaleByDomain", "autoMargin", "ariaLabel", "data"] }, { kind: "ngmodule", type: VisAreaModule }, { kind: "component", type: i1.VisAreaComponent, selector: "vis-area", inputs: ["duration", "events", "attributes", "x", "y", "id", "color", "xScale", "yScale", "excludeFromDomainCalculation", "curveType", "baseline", "opacity", "cursor", "minHeight1Px", "minHeight", "data"] }, { kind: "ngmodule", type: VisAxisModule }, { kind: "component", type: i1.VisAxisComponent, selector: "vis-axis", inputs: ["duration", "events", "attributes", "position", "type", "fullSize", "label", "labelFontSize", "labelMargin", "labelTextFitMode", "labelTextTrimType", "labelColor", "gridLine", "tickLine", "domainLine", "minMaxTicksOnly", "minMaxTicksOnlyShowGridLines", "minMaxTicksOnlyWhenWidthIsLess", "tickFormat", "tickValues", "numTicks", "tickTextFitMode", "tickTextWidth", "tickTextSeparator", "tickTextForceWordBreak", "tickTextTrimType", "tickTextFontSize", "tickTextAlign", "tickTextColor", "tickTextAngle", "tickTextHideOverlapping", "tickPadding", "data"] }, { kind: "ngmodule", type: VisLineModule }, { kind: "component", type: i1.VisLineComponent, selector: "vis-line", inputs: ["duration", "events", "attributes", "x", "y", "id", "color", "xScale", "yScale", "excludeFromDomainCalculation", "curveType", "lineWidth", "lineDashArray", "fallbackValue", "highlightOnHover", "cursor", "interpolateMissingData", "data"] }, { kind: "ngmodule", type: VisTooltipModule }, { kind: "component", type: i1.VisTooltipComponent, selector: "vis-tooltip", inputs: ["components", "container", "followCursor", "allowHover", "horizontalPlacement", "horizontalShift", "verticalPlacement", "verticalShift", "triggers", "attributes", "className", "hideDelay", "showDelay"] }, { kind: "ngmodule", type: VisCrosshairModule }, { kind: "component", type: i1.VisCrosshairComponent, selector: "vis-crosshair", inputs: ["duration", "events", "attributes", "x", "y", "id", "color", "xScale", "yScale", "excludeFromDomainCalculation", "strokeColor", "strokeWidth", "yStacked", "baseline", "tooltip", "template", "hideWhenFarFromPointer", "hideWhenFarFromPointerDistance", "snapToData", "getCircles", "onCrosshairMove", "forceShowAt", "skipRangeCheck", "data"] }, { kind: "ngmodule", type: VisBulletLegendModule }, { kind: "component", type: i1.VisBulletLegendComponent, selector: "vis-bullet-legend", inputs: ["items", "labelClassName", "onLegendItemClick", "labelFontSize", "labelMaxWidth", "bulletSize", "bulletSpacing", "bulletShape", "orientation"] }, { kind: "component", type: TooltipComponent, selector: "ngx-tooltip", inputs: ["data", "categories", "titleFormatter", "yFormatter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
498
+ }
499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AreaChartComponent, decorators: [{
500
+ type: Component,
501
+ args: [{
502
+ selector: 'ngx-area-chart',
503
+ standalone: true,
504
+ imports: [
505
+ CommonModule,
506
+ VisXYContainerModule,
507
+ VisAreaModule,
508
+ VisAxisModule,
509
+ VisLineModule,
510
+ VisTooltipModule,
511
+ VisCrosshairModule,
512
+ VisBulletLegendModule,
513
+ TooltipComponent,
514
+ ],
515
+ template: `
516
+ <div
517
+ [style.display]="'flex'"
518
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
519
+ [style.gap]="'var(--vis-legend-spacing)'"
520
+ [style]="markerCssVars()"
521
+ [class.stacked-area-chart]="stacked()"
522
+ [id]="markerConfig()?.id"
523
+ (click)="onClick($event)"
524
+ >
525
+ <vis-xy-container
526
+ [data]="data()"
527
+ [height]="height()"
528
+ [padding]="padding()"
529
+ [yDomain]="yDomain()"
530
+ [xDomain]="xDomain()"
531
+ >
532
+ @if (!hideTooltip()) {
533
+ <vis-tooltip
534
+ [horizontalPlacement]="Position.Right"
535
+ [verticalPlacement]="Position.Top"
536
+ ></vis-tooltip>
537
+ }
538
+
539
+ @if (stacked()) {
540
+ <vis-area
541
+ [x]="_x"
542
+ [y]="stackedYAccessors()"
543
+ [color]="stackedColorAccessor"
544
+ [opacity]="hideArea() ? 0 : DEFAULT_OPACITY"
545
+ [curveType]="curveType() || CurveType.MonotoneX"
546
+ ></vis-area>
547
+ <vis-line
548
+ [x]="_x"
549
+ [y]="stackedLineYAccessors()"
550
+ [color]="stackedColorAccessor"
551
+ [curveType]="curveType() || CurveType.MonotoneX"
552
+ [lineWidth]="lineWidth()"
553
+ ></vis-line>
554
+ } @else {
555
+ @for (categoryId of categoryKeys(); track categoryId; let i = $index) {
556
+ <vis-area
557
+ [x]="_x"
558
+ [y]="getYAccessor(categoryId)"
559
+ [color]="getGradientSelector(i)"
560
+ [opacity]="hideArea() ? 0 : DEFAULT_OPACITY"
561
+ [curveType]="curveType() || CurveType.MonotoneX"
562
+ ></vis-area>
563
+ <vis-line
564
+ [x]="_x"
565
+ [y]="getYAccessor(categoryId)"
566
+ [color]="colors()[i]"
567
+ [curveType]="curveType() || CurveType.MonotoneX"
568
+ [lineWidth]="lineWidth()"
569
+ [lineDashArray]="lineDashArray() ? lineDashArray()![i] : undefined"
570
+ ></vis-line>
571
+ }
572
+ }
573
+
574
+ @if (!hideXAxis()) {
575
+ <vis-axis
576
+ type="x"
577
+ [label]="xLabel()"
578
+ [labelMargin]="8"
579
+ [numTicks]="xNumTicks()"
580
+ [tickFormat]="xFormatter()"
581
+ [tickValues]="xExplicitTicks()"
582
+ [gridLine]="xGridLine()"
583
+ [domainLine]="xDomainLine()"
584
+ [tickLine]="xTickLine()"
585
+ [minMaxTicksOnly]="minMaxTicksOnly()"
586
+ ></vis-axis>
587
+ }
588
+
589
+ @if (!hideYAxis()) {
590
+ <vis-axis
591
+ type="y"
592
+ [label]="yLabel()"
593
+ [numTicks]="yNumTicks()"
594
+ [tickFormat]="yFormatter()"
595
+ [gridLine]="yGridLine()"
596
+ [domainLine]="yDomainLine()"
597
+ [tickLine]="yTickLine()"
598
+ ></vis-axis>
599
+ }
600
+
601
+ @if (!hideTooltip()) {
602
+ <vis-crosshair
603
+ [template]="onCrosshairUpdate"
604
+ ></vis-crosshair>
605
+ }
606
+ </vis-xy-container>
607
+
608
+ @if (!hideLegend()) {
609
+ <div
610
+ [style.display]="'flex'"
611
+ [style.justifyContent]="legendAlignment()"
612
+ >
613
+ <vis-bullet-legend
614
+ [style]="legendStyle()"
615
+ [items]="legendItems()"
616
+ ></vis-bullet-legend>
617
+ </div>
618
+ }
619
+
620
+ <div #tooltipWrapper style="display: none">
621
+ @if (hoverValues()) {
622
+ <ngx-tooltip
623
+ [data]="hoverValues()!"
624
+ [categories]="categories()"
625
+ [titleFormatter]="tooltipTitleFormatter()"
626
+ [yFormatter]="yFormatter()"
627
+ ></ngx-tooltip>
628
+ }
629
+ </div>
630
+ </div>
631
+ `,
632
+ changeDetection: ChangeDetectionStrategy.OnPush,
633
+ }]
634
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], stacked: [{ type: i0.Input, args: [{ isSignal: true, alias: "stacked", required: false }] }], hideArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideArea", required: false }] }], curveType: [{ type: i0.Input, args: [{ isSignal: true, alias: "curveType", required: false }] }], lineWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineWidth", required: false }] }], lineDashArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineDashArray", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], xFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "xFormatter", required: false }] }], yFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "yFormatter", required: false }] }], xNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xNumTicks", required: false }] }], xExplicitTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xExplicitTicks", required: false }] }], minMaxTicksOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMaxTicksOnly", required: false }] }], yNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "yNumTicks", required: false }] }], hideXAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideXAxis", required: false }] }], hideYAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideYAxis", required: false }] }], xGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xGridLine", required: false }] }], yGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yGridLine", required: false }] }], xDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomainLine", required: false }] }], yDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yDomainLine", required: false }] }], xTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xTickLine", required: false }] }], yTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yTickLine", required: false }] }], hideTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTooltip", required: false }] }], hideLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendStyle", required: false }] }], tooltipStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipStyle", required: false }] }], tooltipTitleFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitleFormatter", required: false }] }], markerConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "markerConfig", required: false }] }], gradientStops: [{ type: i0.Input, args: [{ isSignal: true, alias: "gradientStops", required: false }] }], yDomain: [{ type: i0.Input, args: [{ isSignal: true, alias: "yDomain", required: false }] }], xDomain: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomain", required: false }] }], click: [{ type: i0.Output, args: ["click"] }], tooltipWrapper: [{ type: i0.ViewChild, args: ['tooltipWrapper', { isSignal: true }] }] } });
635
+
636
+ class LineChartComponent {
637
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
638
+ height = input(400, ...(ngDevMode ? [{ debugName: "height" }] : []));
639
+ padding = input({
640
+ top: 5,
641
+ right: 5,
642
+ bottom: 5,
643
+ left: 5,
644
+ }, ...(ngDevMode ? [{ debugName: "padding" }] : []));
645
+ categories = input.required(...(ngDevMode ? [{ debugName: "categories" }] : []));
646
+ stacked = input(false, ...(ngDevMode ? [{ debugName: "stacked" }] : []));
647
+ curveType = input(...(ngDevMode ? [undefined, { debugName: "curveType" }] : []));
648
+ lineWidth = input(2, ...(ngDevMode ? [{ debugName: "lineWidth" }] : []));
649
+ lineDashArray = input(...(ngDevMode ? [undefined, { debugName: "lineDashArray" }] : []));
650
+ xLabel = input(...(ngDevMode ? [undefined, { debugName: "xLabel" }] : []));
651
+ yLabel = input(...(ngDevMode ? [undefined, { debugName: "yLabel" }] : []));
652
+ xFormatter = input(...(ngDevMode ? [undefined, { debugName: "xFormatter" }] : []));
653
+ yFormatter = input(...(ngDevMode ? [undefined, { debugName: "yFormatter" }] : []));
654
+ xNumTicks = input(...(ngDevMode ? [undefined, { debugName: "xNumTicks" }] : []));
655
+ xExplicitTicks = input(...(ngDevMode ? [undefined, { debugName: "xExplicitTicks" }] : []));
656
+ minMaxTicksOnly = input(false, ...(ngDevMode ? [{ debugName: "minMaxTicksOnly" }] : []));
657
+ yNumTicks = input(...(ngDevMode ? [undefined, { debugName: "yNumTicks" }] : []));
658
+ hideXAxis = input(false, ...(ngDevMode ? [{ debugName: "hideXAxis" }] : []));
659
+ hideYAxis = input(false, ...(ngDevMode ? [{ debugName: "hideYAxis" }] : []));
660
+ xGridLine = input(false, ...(ngDevMode ? [{ debugName: "xGridLine" }] : []));
661
+ yGridLine = input(false, ...(ngDevMode ? [{ debugName: "yGridLine" }] : []));
662
+ xDomainLine = input(false, ...(ngDevMode ? [{ debugName: "xDomainLine" }] : []));
663
+ yDomainLine = input(false, ...(ngDevMode ? [{ debugName: "yDomainLine" }] : []));
664
+ xTickLine = input(false, ...(ngDevMode ? [{ debugName: "xTickLine" }] : []));
665
+ yTickLine = input(false, ...(ngDevMode ? [{ debugName: "yTickLine" }] : []));
666
+ hideTooltip = input(false, ...(ngDevMode ? [{ debugName: "hideTooltip" }] : []));
667
+ hideLegend = input(false, ...(ngDevMode ? [{ debugName: "hideLegend" }] : []));
668
+ legendPosition = input(LegendPosition.BottomCenter, ...(ngDevMode ? [{ debugName: "legendPosition" }] : []));
669
+ legendStyle = input(...(ngDevMode ? [undefined, { debugName: "legendStyle" }] : []));
670
+ tooltipTitleFormatter = input(...(ngDevMode ? [undefined, { debugName: "tooltipTitleFormatter" }] : []));
671
+ markerConfig = input(...(ngDevMode ? [undefined, { debugName: "markerConfig" }] : []));
672
+ yDomain = input(...(ngDevMode ? [undefined, { debugName: "yDomain" }] : []));
673
+ xDomain = input(...(ngDevMode ? [undefined, { debugName: "xDomain" }] : []));
674
+ click = output();
675
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LineChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
676
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: LineChartComponent, isStandalone: true, selector: "ngx-line-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null }, curveType: { classPropertyName: "curveType", publicName: "curveType", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, lineDashArray: { classPropertyName: "lineDashArray", publicName: "lineDashArray", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, xFormatter: { classPropertyName: "xFormatter", publicName: "xFormatter", isSignal: true, isRequired: false, transformFunction: null }, yFormatter: { classPropertyName: "yFormatter", publicName: "yFormatter", isSignal: true, isRequired: false, transformFunction: null }, xNumTicks: { classPropertyName: "xNumTicks", publicName: "xNumTicks", isSignal: true, isRequired: false, transformFunction: null }, xExplicitTicks: { classPropertyName: "xExplicitTicks", publicName: "xExplicitTicks", isSignal: true, isRequired: false, transformFunction: null }, minMaxTicksOnly: { classPropertyName: "minMaxTicksOnly", publicName: "minMaxTicksOnly", isSignal: true, isRequired: false, transformFunction: null }, yNumTicks: { classPropertyName: "yNumTicks", publicName: "yNumTicks", isSignal: true, isRequired: false, transformFunction: null }, hideXAxis: { classPropertyName: "hideXAxis", publicName: "hideXAxis", isSignal: true, isRequired: false, transformFunction: null }, hideYAxis: { classPropertyName: "hideYAxis", publicName: "hideYAxis", isSignal: true, isRequired: false, transformFunction: null }, xGridLine: { classPropertyName: "xGridLine", publicName: "xGridLine", isSignal: true, isRequired: false, transformFunction: null }, yGridLine: { classPropertyName: "yGridLine", publicName: "yGridLine", isSignal: true, isRequired: false, transformFunction: null }, xDomainLine: { classPropertyName: "xDomainLine", publicName: "xDomainLine", isSignal: true, isRequired: false, transformFunction: null }, yDomainLine: { classPropertyName: "yDomainLine", publicName: "yDomainLine", isSignal: true, isRequired: false, transformFunction: null }, xTickLine: { classPropertyName: "xTickLine", publicName: "xTickLine", isSignal: true, isRequired: false, transformFunction: null }, yTickLine: { classPropertyName: "yTickLine", publicName: "yTickLine", isSignal: true, isRequired: false, transformFunction: null }, hideTooltip: { classPropertyName: "hideTooltip", publicName: "hideTooltip", isSignal: true, isRequired: false, transformFunction: null }, hideLegend: { classPropertyName: "hideLegend", publicName: "hideLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendStyle: { classPropertyName: "legendStyle", publicName: "legendStyle", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitleFormatter: { classPropertyName: "tooltipTitleFormatter", publicName: "tooltipTitleFormatter", isSignal: true, isRequired: false, transformFunction: null }, markerConfig: { classPropertyName: "markerConfig", publicName: "markerConfig", isSignal: true, isRequired: false, transformFunction: null }, yDomain: { classPropertyName: "yDomain", publicName: "yDomain", isSignal: true, isRequired: false, transformFunction: null }, xDomain: { classPropertyName: "xDomain", publicName: "xDomain", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, ngImport: i0, template: `
677
+ <ngx-area-chart
678
+ [data]="data()"
679
+ [height]="height()"
680
+ [padding]="padding()"
681
+ [categories]="categories()"
682
+ [stacked]="stacked()"
683
+ [hideArea]="true"
684
+ [curveType]="curveType()"
685
+ [lineWidth]="lineWidth()"
686
+ [lineDashArray]="lineDashArray()"
687
+ [xLabel]="xLabel()"
688
+ [yLabel]="yLabel()"
689
+ [xFormatter]="xFormatter()"
690
+ [yFormatter]="yFormatter()"
691
+ [xNumTicks]="xNumTicks()"
692
+ [xExplicitTicks]="xExplicitTicks()"
693
+ [minMaxTicksOnly]="minMaxTicksOnly()"
694
+ [yNumTicks]="yNumTicks()"
695
+ [hideXAxis]="hideXAxis()"
696
+ [hideYAxis]="hideYAxis()"
697
+ [xGridLine]="xGridLine()"
698
+ [yGridLine]="yGridLine()"
699
+ [xDomainLine]="xDomainLine()"
700
+ [yDomainLine]="yDomainLine()"
701
+ [xTickLine]="xTickLine()"
702
+ [yTickLine]="yTickLine()"
703
+ [hideTooltip]="hideTooltip()"
704
+ [hideLegend]="hideLegend()"
705
+ [legendPosition]="legendPosition()"
706
+ [legendStyle]="legendStyle()"
707
+ [tooltipTitleFormatter]="tooltipTitleFormatter()"
708
+ [markerConfig]="markerConfig()"
709
+ [yDomain]="yDomain()"
710
+ [xDomain]="xDomain()"
711
+ (click)="click.emit($event)"
712
+ ></ngx-area-chart>
713
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AreaChartComponent, selector: "ngx-area-chart", inputs: ["data", "height", "padding", "categories", "stacked", "hideArea", "curveType", "lineWidth", "lineDashArray", "xLabel", "yLabel", "xFormatter", "yFormatter", "xNumTicks", "xExplicitTicks", "minMaxTicksOnly", "yNumTicks", "hideXAxis", "hideYAxis", "xGridLine", "yGridLine", "xDomainLine", "yDomainLine", "xTickLine", "yTickLine", "hideTooltip", "hideLegend", "legendPosition", "legendStyle", "tooltipStyle", "tooltipTitleFormatter", "markerConfig", "gradientStops", "yDomain", "xDomain"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
714
+ }
715
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LineChartComponent, decorators: [{
716
+ type: Component,
717
+ args: [{
718
+ selector: 'ngx-line-chart',
719
+ standalone: true,
720
+ imports: [CommonModule, AreaChartComponent],
721
+ template: `
722
+ <ngx-area-chart
723
+ [data]="data()"
724
+ [height]="height()"
725
+ [padding]="padding()"
726
+ [categories]="categories()"
727
+ [stacked]="stacked()"
728
+ [hideArea]="true"
729
+ [curveType]="curveType()"
730
+ [lineWidth]="lineWidth()"
731
+ [lineDashArray]="lineDashArray()"
732
+ [xLabel]="xLabel()"
733
+ [yLabel]="yLabel()"
734
+ [xFormatter]="xFormatter()"
735
+ [yFormatter]="yFormatter()"
736
+ [xNumTicks]="xNumTicks()"
737
+ [xExplicitTicks]="xExplicitTicks()"
738
+ [minMaxTicksOnly]="minMaxTicksOnly()"
739
+ [yNumTicks]="yNumTicks()"
740
+ [hideXAxis]="hideXAxis()"
741
+ [hideYAxis]="hideYAxis()"
742
+ [xGridLine]="xGridLine()"
743
+ [yGridLine]="yGridLine()"
744
+ [xDomainLine]="xDomainLine()"
745
+ [yDomainLine]="yDomainLine()"
746
+ [xTickLine]="xTickLine()"
747
+ [yTickLine]="yTickLine()"
748
+ [hideTooltip]="hideTooltip()"
749
+ [hideLegend]="hideLegend()"
750
+ [legendPosition]="legendPosition()"
751
+ [legendStyle]="legendStyle()"
752
+ [tooltipTitleFormatter]="tooltipTitleFormatter()"
753
+ [markerConfig]="markerConfig()"
754
+ [yDomain]="yDomain()"
755
+ [xDomain]="xDomain()"
756
+ (click)="click.emit($event)"
757
+ ></ngx-area-chart>
758
+ `,
759
+ changeDetection: ChangeDetectionStrategy.OnPush,
760
+ }]
761
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], stacked: [{ type: i0.Input, args: [{ isSignal: true, alias: "stacked", required: false }] }], curveType: [{ type: i0.Input, args: [{ isSignal: true, alias: "curveType", required: false }] }], lineWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineWidth", required: false }] }], lineDashArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineDashArray", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], xFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "xFormatter", required: false }] }], yFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "yFormatter", required: false }] }], xNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xNumTicks", required: false }] }], xExplicitTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xExplicitTicks", required: false }] }], minMaxTicksOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMaxTicksOnly", required: false }] }], yNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "yNumTicks", required: false }] }], hideXAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideXAxis", required: false }] }], hideYAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideYAxis", required: false }] }], xGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xGridLine", required: false }] }], yGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yGridLine", required: false }] }], xDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomainLine", required: false }] }], yDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yDomainLine", required: false }] }], xTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xTickLine", required: false }] }], yTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yTickLine", required: false }] }], hideTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTooltip", required: false }] }], hideLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendStyle", required: false }] }], tooltipTitleFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitleFormatter", required: false }] }], markerConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "markerConfig", required: false }] }], yDomain: [{ type: i0.Input, args: [{ isSignal: true, alias: "yDomain", required: false }] }], xDomain: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomain", required: false }] }], click: [{ type: i0.Output, args: ["click"] }] } });
762
+
763
+ class BarChartComponent {
764
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
765
+ height = input(400, ...(ngDevMode ? [{ debugName: "height" }] : []));
766
+ padding = input({
767
+ top: 5,
768
+ right: 5,
769
+ bottom: 5,
770
+ left: 5,
771
+ }, ...(ngDevMode ? [{ debugName: "padding" }] : []));
772
+ categories = input.required(...(ngDevMode ? [{ debugName: "categories" }] : []));
773
+ yAxis = input.required(...(ngDevMode ? [{ debugName: "yAxis" }] : []));
774
+ stacked = input(false, ...(ngDevMode ? [{ debugName: "stacked" }] : []));
775
+ orientation = input(Orientation$1.Vertical, ...(ngDevMode ? [{ debugName: "orientation" }] : []));
776
+ radius = input(...(ngDevMode ? [undefined, { debugName: "radius" }] : []));
777
+ groupPadding = input(0, ...(ngDevMode ? [{ debugName: "groupPadding" }] : []));
778
+ barPadding = input(0.2, ...(ngDevMode ? [{ debugName: "barPadding" }] : []));
779
+ xLabel = input(...(ngDevMode ? [undefined, { debugName: "xLabel" }] : []));
780
+ yLabel = input(...(ngDevMode ? [undefined, { debugName: "yLabel" }] : []));
781
+ xFormatter = input(...(ngDevMode ? [undefined, { debugName: "xFormatter" }] : []));
782
+ yFormatter = input(...(ngDevMode ? [undefined, { debugName: "yFormatter" }] : []));
783
+ tooltipTitleFormatter = input(...(ngDevMode ? [undefined, { debugName: "tooltipTitleFormatter" }] : []));
784
+ xNumTicks = input(...(ngDevMode ? [undefined, { debugName: "xNumTicks" }] : []));
785
+ xExplicitTicks = input(...(ngDevMode ? [undefined, { debugName: "xExplicitTicks" }] : []));
786
+ minMaxTicksOnly = input(false, ...(ngDevMode ? [{ debugName: "minMaxTicksOnly" }] : []));
787
+ yNumTicks = input(...(ngDevMode ? [undefined, { debugName: "yNumTicks" }] : []));
788
+ hideXAxis = input(false, ...(ngDevMode ? [{ debugName: "hideXAxis" }] : []));
789
+ hideYAxis = input(false, ...(ngDevMode ? [{ debugName: "hideYAxis" }] : []));
790
+ xGridLine = input(false, ...(ngDevMode ? [{ debugName: "xGridLine" }] : []));
791
+ yGridLine = input(true, ...(ngDevMode ? [{ debugName: "yGridLine" }] : []));
792
+ xDomainLine = input(false, ...(ngDevMode ? [{ debugName: "xDomainLine" }] : []));
793
+ yDomainLine = input(false, ...(ngDevMode ? [{ debugName: "yDomainLine" }] : []));
794
+ xTickLine = input(false, ...(ngDevMode ? [{ debugName: "xTickLine" }] : []));
795
+ yTickLine = input(false, ...(ngDevMode ? [{ debugName: "yTickLine" }] : []));
796
+ hideTooltip = input(false, ...(ngDevMode ? [{ debugName: "hideTooltip" }] : []));
797
+ hideLegend = input(false, ...(ngDevMode ? [{ debugName: "hideLegend" }] : []));
798
+ legendPosition = input(LegendPosition.BottomCenter, ...(ngDevMode ? [{ debugName: "legendPosition" }] : []));
799
+ legendStyle = input(...(ngDevMode ? [undefined, { debugName: "legendStyle" }] : []));
800
+ valueLabel = input(...(ngDevMode ? [undefined, { debugName: "valueLabel" }] : []));
801
+ xAxisConfig = input(...(ngDevMode ? [undefined, { debugName: "xAxisConfig" }] : []));
802
+ yAxisConfig = input(...(ngDevMode ? [undefined, { debugName: "yAxisConfig" }] : []));
803
+ click = output();
804
+ tooltipWrapper = viewChild('tooltipWrapper', ...(ngDevMode ? [{ debugName: "tooltipWrapper" }] : []));
805
+ hoverValues = signal(undefined, ...(ngDevMode ? [{ debugName: "hoverValues" }] : []));
806
+ Orientation = Orientation$1;
807
+ isLegendTop = computed(() => this.legendPosition().startsWith('top'), ...(ngDevMode ? [{ debugName: "isLegendTop" }] : []));
808
+ legendAlignment = computed(() => {
809
+ const pos = this.legendPosition();
810
+ if (pos.includes('left'))
811
+ return 'flex-start';
812
+ if (pos.includes('right'))
813
+ return 'flex-end';
814
+ return 'center';
815
+ }, ...(ngDevMode ? [{ debugName: "legendAlignment" }] : []));
816
+ legendItems = computed(() => {
817
+ return Object.values(this.categories()).map((item) => ({
818
+ ...item,
819
+ color: Array.isArray(item.color) ? item.color[0] : item.color,
820
+ }));
821
+ }, ...(ngDevMode ? [{ debugName: "legendItems" }] : []));
822
+ yAccessors = computed(() => {
823
+ return this.yAxis().map((key) => (d) => d[key]);
824
+ }, ...(ngDevMode ? [{ debugName: "yAccessors" }] : []));
825
+ colorAccessor = (_, i) => {
826
+ const cats = Object.values(this.categories());
827
+ return cats[i]?.color;
828
+ };
829
+ _x = (_, i) => i;
830
+ xFormatterFn = (tick, i, ticks) => {
831
+ const formatter = this.xFormatter();
832
+ return formatter ? formatter(tick, i, ticks) : String(tick);
833
+ };
834
+ yFormatterFn = (tick, i, ticks) => {
835
+ const formatter = this.yFormatter();
836
+ return formatter ? formatter(tick, i, ticks) : String(tick);
837
+ };
838
+ tooltipTriggers = {
839
+ [GroupedBar.selectors.bar]: (d) => {
840
+ this.onCrosshairUpdate(d);
841
+ return d ? this.tooltipWrapper()?.nativeElement.innerHTML ?? '' : '';
842
+ },
843
+ [StackedBar.selectors.bar]: (d) => {
844
+ this.onCrosshairUpdate(d);
845
+ return d ? this.tooltipWrapper()?.nativeElement.innerHTML ?? '' : '';
846
+ },
847
+ };
848
+ onCrosshairUpdate(d) {
849
+ this.hoverValues.set(d);
850
+ this.cdr.detectChanges();
851
+ }
852
+ onClick(event) {
853
+ this.click.emit({ event, values: this.hoverValues() });
854
+ }
855
+ cdr = inject(ChangeDetectorRef);
856
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
857
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: BarChartComponent, isStandalone: true, selector: "ngx-bar-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, yAxis: { classPropertyName: "yAxis", publicName: "yAxis", isSignal: true, isRequired: true, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, groupPadding: { classPropertyName: "groupPadding", publicName: "groupPadding", isSignal: true, isRequired: false, transformFunction: null }, barPadding: { classPropertyName: "barPadding", publicName: "barPadding", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, xFormatter: { classPropertyName: "xFormatter", publicName: "xFormatter", isSignal: true, isRequired: false, transformFunction: null }, yFormatter: { classPropertyName: "yFormatter", publicName: "yFormatter", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitleFormatter: { classPropertyName: "tooltipTitleFormatter", publicName: "tooltipTitleFormatter", isSignal: true, isRequired: false, transformFunction: null }, xNumTicks: { classPropertyName: "xNumTicks", publicName: "xNumTicks", isSignal: true, isRequired: false, transformFunction: null }, xExplicitTicks: { classPropertyName: "xExplicitTicks", publicName: "xExplicitTicks", isSignal: true, isRequired: false, transformFunction: null }, minMaxTicksOnly: { classPropertyName: "minMaxTicksOnly", publicName: "minMaxTicksOnly", isSignal: true, isRequired: false, transformFunction: null }, yNumTicks: { classPropertyName: "yNumTicks", publicName: "yNumTicks", isSignal: true, isRequired: false, transformFunction: null }, hideXAxis: { classPropertyName: "hideXAxis", publicName: "hideXAxis", isSignal: true, isRequired: false, transformFunction: null }, hideYAxis: { classPropertyName: "hideYAxis", publicName: "hideYAxis", isSignal: true, isRequired: false, transformFunction: null }, xGridLine: { classPropertyName: "xGridLine", publicName: "xGridLine", isSignal: true, isRequired: false, transformFunction: null }, yGridLine: { classPropertyName: "yGridLine", publicName: "yGridLine", isSignal: true, isRequired: false, transformFunction: null }, xDomainLine: { classPropertyName: "xDomainLine", publicName: "xDomainLine", isSignal: true, isRequired: false, transformFunction: null }, yDomainLine: { classPropertyName: "yDomainLine", publicName: "yDomainLine", isSignal: true, isRequired: false, transformFunction: null }, xTickLine: { classPropertyName: "xTickLine", publicName: "xTickLine", isSignal: true, isRequired: false, transformFunction: null }, yTickLine: { classPropertyName: "yTickLine", publicName: "yTickLine", isSignal: true, isRequired: false, transformFunction: null }, hideTooltip: { classPropertyName: "hideTooltip", publicName: "hideTooltip", isSignal: true, isRequired: false, transformFunction: null }, hideLegend: { classPropertyName: "hideLegend", publicName: "hideLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendStyle: { classPropertyName: "legendStyle", publicName: "legendStyle", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "valueLabel", isSignal: true, isRequired: false, transformFunction: null }, xAxisConfig: { classPropertyName: "xAxisConfig", publicName: "xAxisConfig", isSignal: true, isRequired: false, transformFunction: null }, yAxisConfig: { classPropertyName: "yAxisConfig", publicName: "yAxisConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "tooltipWrapper", first: true, predicate: ["tooltipWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
858
+ <div
859
+ [style.display]="'flex'"
860
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
861
+ [style.gap]="'var(--vis-legend-spacing)'"
862
+ (click)="onClick($event)"
863
+ >
864
+ <vis-xy-container
865
+ [data]="data()"
866
+ [height]="height()"
867
+ [padding]="padding()"
868
+ >
869
+ <vis-tooltip
870
+ [triggers]="tooltipTriggers"
871
+ ></vis-tooltip>
872
+
873
+ @if (!stacked()) {
874
+ <vis-grouped-bar
875
+ [data]="data()"
876
+ [x]="_x"
877
+ [y]="yAccessors()"
878
+ [color]="colorAccessor"
879
+ [roundedCorners]="radius() ?? 0"
880
+ [groupPadding]="groupPadding()"
881
+ [barPadding]="barPadding()"
882
+ [orientation]="orientation()"
883
+ ></vis-grouped-bar>
884
+ } @else {
885
+ <vis-stacked-bar
886
+ [data]="data()"
887
+ [x]="_x"
888
+ [y]="yAccessors()"
889
+ [color]="colorAccessor"
890
+ [roundedCorners]="radius() ?? 0"
891
+ [barPadding]="barPadding()"
892
+ [orientation]="orientation()"
893
+ ></vis-stacked-bar>
894
+ }
895
+
896
+ @if (!hideXAxis()) {
897
+ <vis-axis
898
+ type="x"
899
+ [label]="xLabel()"
900
+ [tickFormat]="xFormatterFn"
901
+ [gridLine]="xGridLine()"
902
+ [domainLine]="!!xDomainLine()"
903
+ [tickLine]="xTickLine()"
904
+ [numTicks]="xNumTicks()"
905
+ [tickValues]="xExplicitTicks()"
906
+ [minMaxTicksOnly]="minMaxTicksOnly()"
907
+ ></vis-axis>
908
+ }
909
+
910
+ @if (!hideYAxis()) {
911
+ <vis-axis
912
+ type="y"
913
+ [label]="yLabel()"
914
+ [tickFormat]="yFormatterFn"
915
+ [gridLine]="orientation() !== Orientation.Horizontal && yGridLine()"
916
+ [domainLine]="!!yDomainLine()"
917
+ [numTicks]="yNumTicks()"
918
+ [tickLine]="yTickLine()"
919
+ ></vis-axis>
920
+ }
921
+ </vis-xy-container>
922
+
923
+ @if (!hideLegend()) {
924
+ <div
925
+ [style.display]="'flex'"
926
+ [style.justifyContent]="legendAlignment()"
927
+ >
928
+ <vis-bullet-legend
929
+ [items]="legendItems()"
930
+ ></vis-bullet-legend>
931
+ </div>
932
+ }
933
+
934
+ <div #tooltipWrapper style="display: none">
935
+ @if (hoverValues()) {
936
+ <ngx-tooltip
937
+ [data]="hoverValues()!"
938
+ [categories]="categories()"
939
+ [titleFormatter]="tooltipTitleFormatter()"
940
+ [yFormatter]="orientation() === Orientation.Horizontal ? xFormatter() : yFormatter()"
941
+ ></ngx-tooltip>
942
+ }
943
+ </div>
944
+ </div>
945
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: VisXYContainerModule }, { kind: "component", type: i1.VisXYContainerComponent, selector: "vis-xy-container", inputs: ["width", "height", "xScale", "xDomain", "xDomainMinConstraint", "xDomainMaxConstraint", "xRange", "yScale", "yDomain", "yDomainMinConstraint", "yDomainMaxConstraint", "yRange", "yDirection", "preventEmptyDomain", "duration", "margin", "padding", "scaleByDomain", "autoMargin", "ariaLabel", "data"] }, { kind: "ngmodule", type: VisAxisModule }, { kind: "component", type: i1.VisAxisComponent, selector: "vis-axis", inputs: ["duration", "events", "attributes", "position", "type", "fullSize", "label", "labelFontSize", "labelMargin", "labelTextFitMode", "labelTextTrimType", "labelColor", "gridLine", "tickLine", "domainLine", "minMaxTicksOnly", "minMaxTicksOnlyShowGridLines", "minMaxTicksOnlyWhenWidthIsLess", "tickFormat", "tickValues", "numTicks", "tickTextFitMode", "tickTextWidth", "tickTextSeparator", "tickTextForceWordBreak", "tickTextTrimType", "tickTextFontSize", "tickTextAlign", "tickTextColor", "tickTextAngle", "tickTextHideOverlapping", "tickPadding", "data"] }, { kind: "ngmodule", type: VisTooltipModule }, { kind: "component", type: i1.VisTooltipComponent, selector: "vis-tooltip", inputs: ["components", "container", "followCursor", "allowHover", "horizontalPlacement", "horizontalShift", "verticalPlacement", "verticalShift", "triggers", "attributes", "className", "hideDelay", "showDelay"] }, { kind: "ngmodule", type: VisBulletLegendModule }, { kind: "component", type: i1.VisBulletLegendComponent, selector: "vis-bullet-legend", inputs: ["items", "labelClassName", "onLegendItemClick", "labelFontSize", "labelMaxWidth", "bulletSize", "bulletSpacing", "bulletShape", "orientation"] }, { kind: "ngmodule", type: VisGroupedBarModule }, { kind: "component", type: i1.VisGroupedBarComponent, selector: "vis-grouped-bar", inputs: ["duration", "events", "attributes", "x", "y", "id", "color", "xScale", "yScale", "excludeFromDomainCalculation", "groupWidth", "groupMaxWidth", "dataStep", "groupPadding", "barPadding", "roundedCorners", "barMinHeight", "cursor", "orientation", "data"] }, { kind: "ngmodule", type: VisStackedBarModule }, { kind: "component", type: i1.VisStackedBarComponent, selector: "vis-stacked-bar", inputs: ["duration", "events", "attributes", "x", "y", "id", "color", "xScale", "yScale", "excludeFromDomainCalculation", "barWidth", "barMaxWidth", "dataStep", "barPadding", "roundedCorners", "cursor", "barMinHeight1Px", "barMinHeightZeroValue", "orientation", "data"] }, { kind: "component", type: TooltipComponent, selector: "ngx-tooltip", inputs: ["data", "categories", "titleFormatter", "yFormatter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
946
+ }
947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BarChartComponent, decorators: [{
948
+ type: Component,
949
+ args: [{
950
+ selector: 'ngx-bar-chart',
951
+ standalone: true,
952
+ imports: [
953
+ CommonModule,
954
+ VisXYContainerModule,
955
+ VisAxisModule,
956
+ VisTooltipModule,
957
+ VisBulletLegendModule,
958
+ VisGroupedBarModule,
959
+ VisStackedBarModule,
960
+ TooltipComponent,
961
+ ],
962
+ template: `
963
+ <div
964
+ [style.display]="'flex'"
965
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
966
+ [style.gap]="'var(--vis-legend-spacing)'"
967
+ (click)="onClick($event)"
968
+ >
969
+ <vis-xy-container
970
+ [data]="data()"
971
+ [height]="height()"
972
+ [padding]="padding()"
973
+ >
974
+ <vis-tooltip
975
+ [triggers]="tooltipTriggers"
976
+ ></vis-tooltip>
977
+
978
+ @if (!stacked()) {
979
+ <vis-grouped-bar
980
+ [data]="data()"
981
+ [x]="_x"
982
+ [y]="yAccessors()"
983
+ [color]="colorAccessor"
984
+ [roundedCorners]="radius() ?? 0"
985
+ [groupPadding]="groupPadding()"
986
+ [barPadding]="barPadding()"
987
+ [orientation]="orientation()"
988
+ ></vis-grouped-bar>
989
+ } @else {
990
+ <vis-stacked-bar
991
+ [data]="data()"
992
+ [x]="_x"
993
+ [y]="yAccessors()"
994
+ [color]="colorAccessor"
995
+ [roundedCorners]="radius() ?? 0"
996
+ [barPadding]="barPadding()"
997
+ [orientation]="orientation()"
998
+ ></vis-stacked-bar>
999
+ }
1000
+
1001
+ @if (!hideXAxis()) {
1002
+ <vis-axis
1003
+ type="x"
1004
+ [label]="xLabel()"
1005
+ [tickFormat]="xFormatterFn"
1006
+ [gridLine]="xGridLine()"
1007
+ [domainLine]="!!xDomainLine()"
1008
+ [tickLine]="xTickLine()"
1009
+ [numTicks]="xNumTicks()"
1010
+ [tickValues]="xExplicitTicks()"
1011
+ [minMaxTicksOnly]="minMaxTicksOnly()"
1012
+ ></vis-axis>
1013
+ }
1014
+
1015
+ @if (!hideYAxis()) {
1016
+ <vis-axis
1017
+ type="y"
1018
+ [label]="yLabel()"
1019
+ [tickFormat]="yFormatterFn"
1020
+ [gridLine]="orientation() !== Orientation.Horizontal && yGridLine()"
1021
+ [domainLine]="!!yDomainLine()"
1022
+ [numTicks]="yNumTicks()"
1023
+ [tickLine]="yTickLine()"
1024
+ ></vis-axis>
1025
+ }
1026
+ </vis-xy-container>
1027
+
1028
+ @if (!hideLegend()) {
1029
+ <div
1030
+ [style.display]="'flex'"
1031
+ [style.justifyContent]="legendAlignment()"
1032
+ >
1033
+ <vis-bullet-legend
1034
+ [items]="legendItems()"
1035
+ ></vis-bullet-legend>
1036
+ </div>
1037
+ }
1038
+
1039
+ <div #tooltipWrapper style="display: none">
1040
+ @if (hoverValues()) {
1041
+ <ngx-tooltip
1042
+ [data]="hoverValues()!"
1043
+ [categories]="categories()"
1044
+ [titleFormatter]="tooltipTitleFormatter()"
1045
+ [yFormatter]="orientation() === Orientation.Horizontal ? xFormatter() : yFormatter()"
1046
+ ></ngx-tooltip>
1047
+ }
1048
+ </div>
1049
+ </div>
1050
+ `,
1051
+ changeDetection: ChangeDetectionStrategy.OnPush,
1052
+ }]
1053
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], yAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxis", required: true }] }], stacked: [{ type: i0.Input, args: [{ isSignal: true, alias: "stacked", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], groupPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupPadding", required: false }] }], barPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "barPadding", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], xFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "xFormatter", required: false }] }], yFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "yFormatter", required: false }] }], tooltipTitleFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitleFormatter", required: false }] }], xNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xNumTicks", required: false }] }], xExplicitTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xExplicitTicks", required: false }] }], minMaxTicksOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMaxTicksOnly", required: false }] }], yNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "yNumTicks", required: false }] }], hideXAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideXAxis", required: false }] }], hideYAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideYAxis", required: false }] }], xGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xGridLine", required: false }] }], yGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yGridLine", required: false }] }], xDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomainLine", required: false }] }], yDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yDomainLine", required: false }] }], xTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xTickLine", required: false }] }], yTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yTickLine", required: false }] }], hideTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTooltip", required: false }] }], hideLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendStyle", required: false }] }], valueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueLabel", required: false }] }], xAxisConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "xAxisConfig", required: false }] }], yAxisConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisConfig", required: false }] }], click: [{ type: i0.Output, args: ["click"] }], tooltipWrapper: [{ type: i0.ViewChild, args: ['tooltipWrapper', { isSignal: true }] }] } });
1054
+
1055
+ class DonutChartComponent {
1056
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
1057
+ height = input(400, ...(ngDevMode ? [{ debugName: "height" }] : []));
1058
+ categories = input.required(...(ngDevMode ? [{ debugName: "categories" }] : []));
1059
+ type = input(DonutType.Full, ...(ngDevMode ? [{ debugName: "type" }] : []));
1060
+ radius = input(0, ...(ngDevMode ? [{ debugName: "radius" }] : []));
1061
+ arcWidth = input(20, ...(ngDevMode ? [{ debugName: "arcWidth" }] : []));
1062
+ padAngle = input(0, ...(ngDevMode ? [{ debugName: "padAngle" }] : []));
1063
+ hideLegend = input(false, ...(ngDevMode ? [{ debugName: "hideLegend" }] : []));
1064
+ legendPosition = input(LegendPosition.BottomCenter, ...(ngDevMode ? [{ debugName: "legendPosition" }] : []));
1065
+ legendStyle = input(...(ngDevMode ? [undefined, { debugName: "legendStyle" }] : []));
1066
+ tooltipTitleFormatter = input(...(ngDevMode ? [undefined, { debugName: "tooltipTitleFormatter" }] : []));
1067
+ click = output();
1068
+ tooltipWrapper = viewChild('tooltipWrapper', ...(ngDevMode ? [{ debugName: "tooltipWrapper" }] : []));
1069
+ hoverValues = signal(undefined, ...(ngDevMode ? [{ debugName: "hoverValues" }] : []));
1070
+ isLegendTop = computed(() => this.legendPosition().startsWith('top'), ...(ngDevMode ? [{ debugName: "isLegendTop" }] : []));
1071
+ legendAlignment = computed(() => {
1072
+ const pos = this.legendPosition();
1073
+ if (pos.includes('left'))
1074
+ return 'flex-start';
1075
+ if (pos.includes('right'))
1076
+ return 'flex-end';
1077
+ return 'center';
1078
+ }, ...(ngDevMode ? [{ debugName: "legendAlignment" }] : []));
1079
+ categoriesArray = computed(() => Object.values(this.categories()), ...(ngDevMode ? [{ debugName: "categoriesArray" }] : []));
1080
+ legendItems = computed(() => {
1081
+ return this.categoriesArray().map((item) => ({
1082
+ ...item,
1083
+ color: this.normalizeColor(item.color),
1084
+ }));
1085
+ }, ...(ngDevMode ? [{ debugName: "legendItems" }] : []));
1086
+ angleRange = computed(() => {
1087
+ return this.type() === DonutType.Half
1088
+ ? [-1.5707963267948966, 1.5707963267948966]
1089
+ : undefined;
1090
+ }, ...(ngDevMode ? [{ debugName: "angleRange" }] : []));
1091
+ valueAccessor = (d) => d;
1092
+ colorAccessor = (_, i) => {
1093
+ const cat = this.categoriesArray()[i];
1094
+ if (!cat)
1095
+ return undefined;
1096
+ return this.normalizeColor(cat.color);
1097
+ };
1098
+ tooltipTriggers = {
1099
+ [Donut.selectors.segment]: (d) => {
1100
+ this.onCrosshairUpdate(d);
1101
+ return d ? this.tooltipWrapper()?.nativeElement.innerHTML ?? '' : '';
1102
+ },
1103
+ };
1104
+ onCrosshairUpdate(d) {
1105
+ const keyName = Object.values(this.categories())[d?.index]?.name;
1106
+ this.hoverValues.set({
1107
+ label: keyName,
1108
+ [keyName]: d?.data,
1109
+ });
1110
+ this.cdr.detectChanges();
1111
+ }
1112
+ onClick(event) {
1113
+ this.click.emit({ event, values: this.hoverValues() });
1114
+ }
1115
+ normalizeColor(color, fallback = '#ccc') {
1116
+ if (!color)
1117
+ return fallback;
1118
+ return Array.isArray(color) ? color[0] || fallback : color;
1119
+ }
1120
+ cdr = inject(ChangeDetectorRef);
1121
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DonutChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: DonutChartComponent, isStandalone: true, selector: "ngx-donut-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, arcWidth: { classPropertyName: "arcWidth", publicName: "arcWidth", isSignal: true, isRequired: false, transformFunction: null }, padAngle: { classPropertyName: "padAngle", publicName: "padAngle", isSignal: true, isRequired: false, transformFunction: null }, hideLegend: { classPropertyName: "hideLegend", publicName: "hideLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendStyle: { classPropertyName: "legendStyle", publicName: "legendStyle", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitleFormatter: { classPropertyName: "tooltipTitleFormatter", publicName: "tooltipTitleFormatter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "tooltipWrapper", first: true, predicate: ["tooltipWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
1123
+ <div
1124
+ [style.display]="'flex'"
1125
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
1126
+ [style.gap]="'var(--vis-legend-spacing)'"
1127
+ (click)="onClick($event)"
1128
+ >
1129
+ <vis-single-container
1130
+ [data]="data()"
1131
+ [height]="height()"
1132
+ [margin]="{}"
1133
+ >
1134
+ <vis-tooltip
1135
+ [horizontalShift]="20"
1136
+ [verticalShift]="20"
1137
+ [triggers]="tooltipTriggers"
1138
+ ></vis-tooltip>
1139
+
1140
+ <vis-donut
1141
+ [value]="valueAccessor"
1142
+ [cornerRadius]="radius()"
1143
+ [arcWidth]="arcWidth()"
1144
+ [color]="colorAccessor"
1145
+ [angleRange]="angleRange()"
1146
+ [padAngle]="padAngle()"
1147
+ ></vis-donut>
1148
+
1149
+ <div
1150
+ [style.position]="'absolute'"
1151
+ [style.top]="'50%'"
1152
+ [style.left]="'50%'"
1153
+ [style.transform]="'translate(-50%, -50%)'"
1154
+ >
1155
+ <ng-content></ng-content>
1156
+ </div>
1157
+ </vis-single-container>
1158
+
1159
+ @if (!hideLegend()) {
1160
+ <div
1161
+ [style.display]="'flex'"
1162
+ [style.justifyContent]="legendAlignment()"
1163
+ >
1164
+ <vis-bullet-legend
1165
+ [items]="legendItems()"
1166
+ ></vis-bullet-legend>
1167
+ </div>
1168
+ }
1169
+
1170
+ <div #tooltipWrapper style="display: none">
1171
+ @if (hoverValues()) {
1172
+ <ngx-tooltip
1173
+ [data]="hoverValues()!"
1174
+ [categories]="categories()"
1175
+ [titleFormatter]="tooltipTitleFormatter()"
1176
+ ></ngx-tooltip>
1177
+ }
1178
+ </div>
1179
+ </div>
1180
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: VisSingleContainerModule }, { kind: "component", type: i1.VisSingleContainerComponent, selector: "vis-single-container", inputs: ["width", "height", "margin", "duration", "ariaLabel", "svgDefs", "sizing", "data"] }, { kind: "ngmodule", type: VisDonutModule }, { kind: "component", type: i1.VisDonutComponent, selector: "vis-donut", inputs: ["duration", "events", "attributes", "id", "value", "angleRange", "padAngle", "sortFunction", "cornerRadius", "color", "radius", "arcWidth", "centralLabel", "centralSubLabel", "centralSubLabelWrap", "showEmptySegments", "emptySegmentAngle", "showBackground", "backgroundAngleRange", "centralLabelOffsetX", "centralLabelOffsetY", "data"] }, { kind: "ngmodule", type: VisTooltipModule }, { kind: "component", type: i1.VisTooltipComponent, selector: "vis-tooltip", inputs: ["components", "container", "followCursor", "allowHover", "horizontalPlacement", "horizontalShift", "verticalPlacement", "verticalShift", "triggers", "attributes", "className", "hideDelay", "showDelay"] }, { kind: "ngmodule", type: VisBulletLegendModule }, { kind: "component", type: i1.VisBulletLegendComponent, selector: "vis-bullet-legend", inputs: ["items", "labelClassName", "onLegendItemClick", "labelFontSize", "labelMaxWidth", "bulletSize", "bulletSpacing", "bulletShape", "orientation"] }, { kind: "component", type: TooltipComponent, selector: "ngx-tooltip", inputs: ["data", "categories", "titleFormatter", "yFormatter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1181
+ }
1182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DonutChartComponent, decorators: [{
1183
+ type: Component,
1184
+ args: [{
1185
+ selector: 'ngx-donut-chart',
1186
+ standalone: true,
1187
+ imports: [
1188
+ CommonModule,
1189
+ VisSingleContainerModule,
1190
+ VisDonutModule,
1191
+ VisTooltipModule,
1192
+ VisBulletLegendModule,
1193
+ TooltipComponent,
1194
+ ],
1195
+ template: `
1196
+ <div
1197
+ [style.display]="'flex'"
1198
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
1199
+ [style.gap]="'var(--vis-legend-spacing)'"
1200
+ (click)="onClick($event)"
1201
+ >
1202
+ <vis-single-container
1203
+ [data]="data()"
1204
+ [height]="height()"
1205
+ [margin]="{}"
1206
+ >
1207
+ <vis-tooltip
1208
+ [horizontalShift]="20"
1209
+ [verticalShift]="20"
1210
+ [triggers]="tooltipTriggers"
1211
+ ></vis-tooltip>
1212
+
1213
+ <vis-donut
1214
+ [value]="valueAccessor"
1215
+ [cornerRadius]="radius()"
1216
+ [arcWidth]="arcWidth()"
1217
+ [color]="colorAccessor"
1218
+ [angleRange]="angleRange()"
1219
+ [padAngle]="padAngle()"
1220
+ ></vis-donut>
1221
+
1222
+ <div
1223
+ [style.position]="'absolute'"
1224
+ [style.top]="'50%'"
1225
+ [style.left]="'50%'"
1226
+ [style.transform]="'translate(-50%, -50%)'"
1227
+ >
1228
+ <ng-content></ng-content>
1229
+ </div>
1230
+ </vis-single-container>
1231
+
1232
+ @if (!hideLegend()) {
1233
+ <div
1234
+ [style.display]="'flex'"
1235
+ [style.justifyContent]="legendAlignment()"
1236
+ >
1237
+ <vis-bullet-legend
1238
+ [items]="legendItems()"
1239
+ ></vis-bullet-legend>
1240
+ </div>
1241
+ }
1242
+
1243
+ <div #tooltipWrapper style="display: none">
1244
+ @if (hoverValues()) {
1245
+ <ngx-tooltip
1246
+ [data]="hoverValues()!"
1247
+ [categories]="categories()"
1248
+ [titleFormatter]="tooltipTitleFormatter()"
1249
+ ></ngx-tooltip>
1250
+ }
1251
+ </div>
1252
+ </div>
1253
+ `,
1254
+ changeDetection: ChangeDetectionStrategy.OnPush,
1255
+ }]
1256
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], arcWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "arcWidth", required: false }] }], padAngle: [{ type: i0.Input, args: [{ isSignal: true, alias: "padAngle", required: false }] }], hideLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendStyle", required: false }] }], tooltipTitleFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitleFormatter", required: false }] }], click: [{ type: i0.Output, args: ["click"] }], tooltipWrapper: [{ type: i0.ViewChild, args: ['tooltipWrapper', { isSignal: true }] }] } });
1257
+
1258
+ class BubbleChartComponent {
1259
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
1260
+ height = input(600, ...(ngDevMode ? [{ debugName: "height" }] : []));
1261
+ padding = input({
1262
+ top: 5,
1263
+ right: 5,
1264
+ bottom: 5,
1265
+ left: 5,
1266
+ }, ...(ngDevMode ? [{ debugName: "padding" }] : []));
1267
+ categories = input({}, ...(ngDevMode ? [{ debugName: "categories" }] : []));
1268
+ categoryKey = input(...(ngDevMode ? [undefined, { debugName: "categoryKey" }] : []));
1269
+ xAccessor = input(...(ngDevMode ? [undefined, { debugName: "xAccessor" }] : []));
1270
+ yAccessor = input(...(ngDevMode ? [undefined, { debugName: "yAccessor" }] : []));
1271
+ sizeAccessor = input(...(ngDevMode ? [undefined, { debugName: "sizeAccessor" }] : []));
1272
+ labelPosition = input(...(ngDevMode ? [undefined, { debugName: "labelPosition" }] : []));
1273
+ sizeRange = input(...(ngDevMode ? [undefined, { debugName: "sizeRange" }] : []));
1274
+ xLabel = input('', ...(ngDevMode ? [{ debugName: "xLabel" }] : []));
1275
+ yLabel = input('', ...(ngDevMode ? [{ debugName: "yLabel" }] : []));
1276
+ xFormatter = input(...(ngDevMode ? [undefined, { debugName: "xFormatter" }] : []));
1277
+ yFormatter = input(...(ngDevMode ? [undefined, { debugName: "yFormatter" }] : []));
1278
+ tooltipTitleFormatter = input(...(ngDevMode ? [undefined, { debugName: "tooltipTitleFormatter" }] : []));
1279
+ xNumTicks = input(...(ngDevMode ? [undefined, { debugName: "xNumTicks" }] : []));
1280
+ yNumTicks = input(...(ngDevMode ? [undefined, { debugName: "yNumTicks" }] : []));
1281
+ xExplicitTicks = input(...(ngDevMode ? [undefined, { debugName: "xExplicitTicks" }] : []));
1282
+ minMaxTicksOnly = input(false, ...(ngDevMode ? [{ debugName: "minMaxTicksOnly" }] : []));
1283
+ hideXAxis = input(false, ...(ngDevMode ? [{ debugName: "hideXAxis" }] : []));
1284
+ hideYAxis = input(false, ...(ngDevMode ? [{ debugName: "hideYAxis" }] : []));
1285
+ xGridLine = input(false, ...(ngDevMode ? [{ debugName: "xGridLine" }] : []));
1286
+ yGridLine = input(true, ...(ngDevMode ? [{ debugName: "yGridLine" }] : []));
1287
+ xDomainLine = input(true, ...(ngDevMode ? [{ debugName: "xDomainLine" }] : []));
1288
+ yDomainLine = input(true, ...(ngDevMode ? [{ debugName: "yDomainLine" }] : []));
1289
+ xTickLine = input(true, ...(ngDevMode ? [{ debugName: "xTickLine" }] : []));
1290
+ yTickLine = input(true, ...(ngDevMode ? [{ debugName: "yTickLine" }] : []));
1291
+ hideTooltip = input(false, ...(ngDevMode ? [{ debugName: "hideTooltip" }] : []));
1292
+ hideLegend = input(false, ...(ngDevMode ? [{ debugName: "hideLegend" }] : []));
1293
+ legendPosition = input(LegendPosition.BottomCenter, ...(ngDevMode ? [{ debugName: "legendPosition" }] : []));
1294
+ legendStyle = input(...(ngDevMode ? [undefined, { debugName: "legendStyle" }] : []));
1295
+ crosshairConfig = input({ color: '#666' }, ...(ngDevMode ? [{ debugName: "crosshairConfig" }] : []));
1296
+ xAxisConfig = input(...(ngDevMode ? [undefined, { debugName: "xAxisConfig" }] : []));
1297
+ yAxisConfig = input(...(ngDevMode ? [undefined, { debugName: "yAxisConfig" }] : []));
1298
+ click = output();
1299
+ tooltipWrapper = viewChild('tooltipWrapper', ...(ngDevMode ? [{ debugName: "tooltipWrapper" }] : []));
1300
+ hoverValues = signal(undefined, ...(ngDevMode ? [{ debugName: "hoverValues" }] : []));
1301
+ Position = Position;
1302
+ isLegendTop = computed(() => this.legendPosition().startsWith('top'), ...(ngDevMode ? [{ debugName: "isLegendTop" }] : []));
1303
+ legendAlignment = computed(() => {
1304
+ const pos = this.legendPosition();
1305
+ if (pos.includes('left'))
1306
+ return 'flex-start';
1307
+ if (pos.includes('right'))
1308
+ return 'flex-end';
1309
+ return 'center';
1310
+ }, ...(ngDevMode ? [{ debugName: "legendAlignment" }] : []));
1311
+ legendItems = computed(() => {
1312
+ const cats = this.categories();
1313
+ return Object.values(cats).map((item) => ({
1314
+ ...item,
1315
+ color: Array.isArray(item.color) ? item.color[0] : item.color,
1316
+ }));
1317
+ }, ...(ngDevMode ? [{ debugName: "legendItems" }] : []));
1318
+ sizeAccessorFn = computed(() => {
1319
+ const accessor = this.sizeAccessor();
1320
+ if (accessor)
1321
+ return accessor;
1322
+ return (d) => (typeof d.comments === 'number' ? d.comments : 1);
1323
+ }, ...(ngDevMode ? [{ debugName: "sizeAccessorFn" }] : []));
1324
+ colorAccessor = (d) => {
1325
+ const cats = this.categories();
1326
+ const catKey = this.categoryKey();
1327
+ if (!cats || !catKey) {
1328
+ return '#cccccc';
1329
+ }
1330
+ const categoryValue = String(d[catKey]);
1331
+ let categoryColor = cats[categoryValue]?.color;
1332
+ // Special case: when only one category is defined, use the categoryKey
1333
+ // directly as the category lookup key (matching Vue behavior)
1334
+ if (Object.keys(cats).length === 1) {
1335
+ categoryColor = cats[catKey]?.color;
1336
+ }
1337
+ if (!categoryColor) {
1338
+ return '#cccccc';
1339
+ }
1340
+ // Ensure we return a string, not an array
1341
+ return Array.isArray(categoryColor) ? categoryColor[0] : categoryColor;
1342
+ };
1343
+ xFormatterFn = (tick, i, ticks) => {
1344
+ const formatter = this.xFormatter();
1345
+ return formatter ? formatter(tick, i, ticks) : String(tick);
1346
+ };
1347
+ yFormatterFn = (tick, i, ticks) => {
1348
+ const formatter = this.yFormatter();
1349
+ return formatter ? formatter(tick, i, ticks) : String(tick);
1350
+ };
1351
+ tooltipTriggers = {
1352
+ [Scatter.selectors.point]: (d) => {
1353
+ this.onCrosshairUpdate(d);
1354
+ return d ? this.tooltipWrapper()?.nativeElement.innerHTML ?? '' : '';
1355
+ },
1356
+ };
1357
+ onCrosshairUpdate(d) {
1358
+ this.hoverValues.set(d);
1359
+ this.cdr.detectChanges();
1360
+ }
1361
+ onClick(event) {
1362
+ this.click.emit({ event, values: this.hoverValues() });
1363
+ }
1364
+ cdr = inject(ChangeDetectorRef);
1365
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BubbleChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1366
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: BubbleChartComponent, isStandalone: true, selector: "ngx-bubble-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, categoryKey: { classPropertyName: "categoryKey", publicName: "categoryKey", isSignal: true, isRequired: false, transformFunction: null }, xAccessor: { classPropertyName: "xAccessor", publicName: "xAccessor", isSignal: true, isRequired: false, transformFunction: null }, yAccessor: { classPropertyName: "yAccessor", publicName: "yAccessor", isSignal: true, isRequired: false, transformFunction: null }, sizeAccessor: { classPropertyName: "sizeAccessor", publicName: "sizeAccessor", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, sizeRange: { classPropertyName: "sizeRange", publicName: "sizeRange", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, xFormatter: { classPropertyName: "xFormatter", publicName: "xFormatter", isSignal: true, isRequired: false, transformFunction: null }, yFormatter: { classPropertyName: "yFormatter", publicName: "yFormatter", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitleFormatter: { classPropertyName: "tooltipTitleFormatter", publicName: "tooltipTitleFormatter", isSignal: true, isRequired: false, transformFunction: null }, xNumTicks: { classPropertyName: "xNumTicks", publicName: "xNumTicks", isSignal: true, isRequired: false, transformFunction: null }, yNumTicks: { classPropertyName: "yNumTicks", publicName: "yNumTicks", isSignal: true, isRequired: false, transformFunction: null }, xExplicitTicks: { classPropertyName: "xExplicitTicks", publicName: "xExplicitTicks", isSignal: true, isRequired: false, transformFunction: null }, minMaxTicksOnly: { classPropertyName: "minMaxTicksOnly", publicName: "minMaxTicksOnly", isSignal: true, isRequired: false, transformFunction: null }, hideXAxis: { classPropertyName: "hideXAxis", publicName: "hideXAxis", isSignal: true, isRequired: false, transformFunction: null }, hideYAxis: { classPropertyName: "hideYAxis", publicName: "hideYAxis", isSignal: true, isRequired: false, transformFunction: null }, xGridLine: { classPropertyName: "xGridLine", publicName: "xGridLine", isSignal: true, isRequired: false, transformFunction: null }, yGridLine: { classPropertyName: "yGridLine", publicName: "yGridLine", isSignal: true, isRequired: false, transformFunction: null }, xDomainLine: { classPropertyName: "xDomainLine", publicName: "xDomainLine", isSignal: true, isRequired: false, transformFunction: null }, yDomainLine: { classPropertyName: "yDomainLine", publicName: "yDomainLine", isSignal: true, isRequired: false, transformFunction: null }, xTickLine: { classPropertyName: "xTickLine", publicName: "xTickLine", isSignal: true, isRequired: false, transformFunction: null }, yTickLine: { classPropertyName: "yTickLine", publicName: "yTickLine", isSignal: true, isRequired: false, transformFunction: null }, hideTooltip: { classPropertyName: "hideTooltip", publicName: "hideTooltip", isSignal: true, isRequired: false, transformFunction: null }, hideLegend: { classPropertyName: "hideLegend", publicName: "hideLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendStyle: { classPropertyName: "legendStyle", publicName: "legendStyle", isSignal: true, isRequired: false, transformFunction: null }, crosshairConfig: { classPropertyName: "crosshairConfig", publicName: "crosshairConfig", isSignal: true, isRequired: false, transformFunction: null }, xAxisConfig: { classPropertyName: "xAxisConfig", publicName: "xAxisConfig", isSignal: true, isRequired: false, transformFunction: null }, yAxisConfig: { classPropertyName: "yAxisConfig", publicName: "yAxisConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "tooltipWrapper", first: true, predicate: ["tooltipWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
1367
+ <div
1368
+ [style.display]="'flex'"
1369
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
1370
+ [style.gap]="'var(--vis-legend-spacing)'"
1371
+ >
1372
+ <vis-xy-container
1373
+ [data]="data()"
1374
+ [height]="height()"
1375
+ [padding]="padding()"
1376
+ [scaleByDomain]="true"
1377
+ (click)="onClick($event)"
1378
+ >
1379
+ @if (!hideTooltip()) {
1380
+ <vis-tooltip [triggers]="tooltipTriggers"></vis-tooltip>
1381
+ }
1382
+
1383
+ <vis-scatter
1384
+ [x]="xAccessor()"
1385
+ [y]="yAccessor()"
1386
+ [color]="colorAccessor"
1387
+ [size]="sizeAccessorFn()"
1388
+ [labelPosition]="labelPosition() || Position.Bottom"
1389
+ [sizeRange]="sizeRange() || [1, 20]"
1390
+ cursor="pointer"
1391
+ ></vis-scatter>
1392
+
1393
+ @if (!hideXAxis()) {
1394
+ <vis-axis
1395
+ type="x"
1396
+ [label]="xLabel()"
1397
+ [tickFormat]="xFormatterFn"
1398
+ [gridLine]="xGridLine()"
1399
+ [domainLine]="!!xDomainLine()"
1400
+ [tickLine]="xTickLine()"
1401
+ [numTicks]="xNumTicks()"
1402
+ [tickValues]="xExplicitTicks()"
1403
+ [minMaxTicksOnly]="minMaxTicksOnly()"
1404
+ ></vis-axis>
1405
+ }
1406
+
1407
+ @if (!hideYAxis()) {
1408
+ <vis-axis
1409
+ type="y"
1410
+ [label]="yLabel()"
1411
+ [tickFormat]="yFormatterFn"
1412
+ [gridLine]="yGridLine()"
1413
+ [domainLine]="!!yDomainLine()"
1414
+ [tickLine]="yTickLine()"
1415
+ [numTicks]="yNumTicks()"
1416
+ ></vis-axis>
1417
+ }
1418
+ </vis-xy-container>
1419
+
1420
+ @if (!hideLegend()) {
1421
+ <div
1422
+ [style.display]="'flex'"
1423
+ [style.justifyContent]="legendAlignment()"
1424
+ >
1425
+ <vis-bullet-legend
1426
+ [items]="legendItems()"
1427
+ ></vis-bullet-legend>
1428
+ </div>
1429
+ }
1430
+
1431
+ <div #tooltipWrapper style="display: none">
1432
+ @if (hoverValues()) {
1433
+ <ngx-tooltip
1434
+ [data]="hoverValues()!"
1435
+ [categories]="categories() || {}"
1436
+ [titleFormatter]="tooltipTitleFormatter()"
1437
+ [yFormatter]="yFormatter()"
1438
+ ></ngx-tooltip>
1439
+ }
1440
+ </div>
1441
+ </div>
1442
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: VisXYContainerModule }, { kind: "component", type: i1.VisXYContainerComponent, selector: "vis-xy-container", inputs: ["width", "height", "xScale", "xDomain", "xDomainMinConstraint", "xDomainMaxConstraint", "xRange", "yScale", "yDomain", "yDomainMinConstraint", "yDomainMaxConstraint", "yRange", "yDirection", "preventEmptyDomain", "duration", "margin", "padding", "scaleByDomain", "autoMargin", "ariaLabel", "data"] }, { kind: "ngmodule", type: VisScatterModule }, { kind: "component", type: i1.VisScatterComponent, selector: "vis-scatter", inputs: ["duration", "events", "attributes", "x", "y", "id", "color", "xScale", "yScale", "excludeFromDomainCalculation", "size", "sizeScale", "sizeRange", "shape", "label", "labelColor", "labelHideOverlapping", "cursor", "labelTextBrightnessRatio", "labelPosition", "strokeColor", "strokeWidth", "data"] }, { kind: "ngmodule", type: VisAxisModule }, { kind: "component", type: i1.VisAxisComponent, selector: "vis-axis", inputs: ["duration", "events", "attributes", "position", "type", "fullSize", "label", "labelFontSize", "labelMargin", "labelTextFitMode", "labelTextTrimType", "labelColor", "gridLine", "tickLine", "domainLine", "minMaxTicksOnly", "minMaxTicksOnlyShowGridLines", "minMaxTicksOnlyWhenWidthIsLess", "tickFormat", "tickValues", "numTicks", "tickTextFitMode", "tickTextWidth", "tickTextSeparator", "tickTextForceWordBreak", "tickTextTrimType", "tickTextFontSize", "tickTextAlign", "tickTextColor", "tickTextAngle", "tickTextHideOverlapping", "tickPadding", "data"] }, { kind: "ngmodule", type: VisTooltipModule }, { kind: "component", type: i1.VisTooltipComponent, selector: "vis-tooltip", inputs: ["components", "container", "followCursor", "allowHover", "horizontalPlacement", "horizontalShift", "verticalPlacement", "verticalShift", "triggers", "attributes", "className", "hideDelay", "showDelay"] }, { kind: "ngmodule", type: VisBulletLegendModule }, { kind: "component", type: i1.VisBulletLegendComponent, selector: "vis-bullet-legend", inputs: ["items", "labelClassName", "onLegendItemClick", "labelFontSize", "labelMaxWidth", "bulletSize", "bulletSpacing", "bulletShape", "orientation"] }, { kind: "component", type: TooltipComponent, selector: "ngx-tooltip", inputs: ["data", "categories", "titleFormatter", "yFormatter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1443
+ }
1444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BubbleChartComponent, decorators: [{
1445
+ type: Component,
1446
+ args: [{
1447
+ selector: 'ngx-bubble-chart',
1448
+ standalone: true,
1449
+ imports: [
1450
+ CommonModule,
1451
+ VisXYContainerModule,
1452
+ VisScatterModule,
1453
+ VisAxisModule,
1454
+ VisTooltipModule,
1455
+ VisBulletLegendModule,
1456
+ TooltipComponent,
1457
+ ],
1458
+ template: `
1459
+ <div
1460
+ [style.display]="'flex'"
1461
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
1462
+ [style.gap]="'var(--vis-legend-spacing)'"
1463
+ >
1464
+ <vis-xy-container
1465
+ [data]="data()"
1466
+ [height]="height()"
1467
+ [padding]="padding()"
1468
+ [scaleByDomain]="true"
1469
+ (click)="onClick($event)"
1470
+ >
1471
+ @if (!hideTooltip()) {
1472
+ <vis-tooltip [triggers]="tooltipTriggers"></vis-tooltip>
1473
+ }
1474
+
1475
+ <vis-scatter
1476
+ [x]="xAccessor()"
1477
+ [y]="yAccessor()"
1478
+ [color]="colorAccessor"
1479
+ [size]="sizeAccessorFn()"
1480
+ [labelPosition]="labelPosition() || Position.Bottom"
1481
+ [sizeRange]="sizeRange() || [1, 20]"
1482
+ cursor="pointer"
1483
+ ></vis-scatter>
1484
+
1485
+ @if (!hideXAxis()) {
1486
+ <vis-axis
1487
+ type="x"
1488
+ [label]="xLabel()"
1489
+ [tickFormat]="xFormatterFn"
1490
+ [gridLine]="xGridLine()"
1491
+ [domainLine]="!!xDomainLine()"
1492
+ [tickLine]="xTickLine()"
1493
+ [numTicks]="xNumTicks()"
1494
+ [tickValues]="xExplicitTicks()"
1495
+ [minMaxTicksOnly]="minMaxTicksOnly()"
1496
+ ></vis-axis>
1497
+ }
1498
+
1499
+ @if (!hideYAxis()) {
1500
+ <vis-axis
1501
+ type="y"
1502
+ [label]="yLabel()"
1503
+ [tickFormat]="yFormatterFn"
1504
+ [gridLine]="yGridLine()"
1505
+ [domainLine]="!!yDomainLine()"
1506
+ [tickLine]="yTickLine()"
1507
+ [numTicks]="yNumTicks()"
1508
+ ></vis-axis>
1509
+ }
1510
+ </vis-xy-container>
1511
+
1512
+ @if (!hideLegend()) {
1513
+ <div
1514
+ [style.display]="'flex'"
1515
+ [style.justifyContent]="legendAlignment()"
1516
+ >
1517
+ <vis-bullet-legend
1518
+ [items]="legendItems()"
1519
+ ></vis-bullet-legend>
1520
+ </div>
1521
+ }
1522
+
1523
+ <div #tooltipWrapper style="display: none">
1524
+ @if (hoverValues()) {
1525
+ <ngx-tooltip
1526
+ [data]="hoverValues()!"
1527
+ [categories]="categories() || {}"
1528
+ [titleFormatter]="tooltipTitleFormatter()"
1529
+ [yFormatter]="yFormatter()"
1530
+ ></ngx-tooltip>
1531
+ }
1532
+ </div>
1533
+ </div>
1534
+ `,
1535
+ changeDetection: ChangeDetectionStrategy.OnPush,
1536
+ }]
1537
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: false }] }], categoryKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryKey", required: false }] }], xAccessor: [{ type: i0.Input, args: [{ isSignal: true, alias: "xAccessor", required: false }] }], yAccessor: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAccessor", required: false }] }], sizeAccessor: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizeAccessor", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], sizeRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizeRange", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], xFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "xFormatter", required: false }] }], yFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "yFormatter", required: false }] }], tooltipTitleFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitleFormatter", required: false }] }], xNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xNumTicks", required: false }] }], yNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "yNumTicks", required: false }] }], xExplicitTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xExplicitTicks", required: false }] }], minMaxTicksOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMaxTicksOnly", required: false }] }], hideXAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideXAxis", required: false }] }], hideYAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideYAxis", required: false }] }], xGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xGridLine", required: false }] }], yGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yGridLine", required: false }] }], xDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomainLine", required: false }] }], yDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yDomainLine", required: false }] }], xTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xTickLine", required: false }] }], yTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "yTickLine", required: false }] }], hideTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTooltip", required: false }] }], hideLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendStyle", required: false }] }], crosshairConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "crosshairConfig", required: false }] }], xAxisConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "xAxisConfig", required: false }] }], yAxisConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisConfig", required: false }] }], click: [{ type: i0.Output, args: ["click"] }], tooltipWrapper: [{ type: i0.ViewChild, args: ['tooltipWrapper', { isSignal: true }] }] } });
1538
+
1539
+ // Cached date formatter instance for better performance
1540
+ const cachedDateFormatter = new Intl.DateTimeFormat();
1541
+ const dateFormatter = (date) => cachedDateFormatter.format(typeof date === 'number' ? date : date.getTime());
1542
+ class GanttChartComponent {
1543
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
1544
+ height = input(...(ngDevMode ? [undefined, { debugName: "height" }] : []));
1545
+ categories = input.required(...(ngDevMode ? [{ debugName: "categories" }] : []));
1546
+ x = input.required(...(ngDevMode ? [{ debugName: "x" }] : []));
1547
+ length = input.required(...(ngDevMode ? [{ debugName: "length" }] : []));
1548
+ type = input.required(...(ngDevMode ? [{ debugName: "type" }] : []));
1549
+ labelWidth = input(220, ...(ngDevMode ? [{ debugName: "labelWidth" }] : []));
1550
+ title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
1551
+ showLabels = input(true, ...(ngDevMode ? [{ debugName: "showLabels" }] : []));
1552
+ hideTooltip = input(false, ...(ngDevMode ? [{ debugName: "hideTooltip" }] : []));
1553
+ lineWidth = input(12, ...(ngDevMode ? [{ debugName: "lineWidth" }] : []));
1554
+ rowHeight = input(24, ...(ngDevMode ? [{ debugName: "rowHeight" }] : []));
1555
+ legendPosition = input(LegendPosition.TopRight, ...(ngDevMode ? [{ debugName: "legendPosition" }] : []));
1556
+ legendStyle = input(...(ngDevMode ? [undefined, { debugName: "legendStyle" }] : []));
1557
+ hideLegend = input(false, ...(ngDevMode ? [{ debugName: "hideLegend" }] : []));
1558
+ xNumTicks = input(...(ngDevMode ? [undefined, { debugName: "xNumTicks" }] : []));
1559
+ xTickLine = input(...(ngDevMode ? [undefined, { debugName: "xTickLine" }] : []));
1560
+ xTickFormat = input(...(ngDevMode ? [undefined, { debugName: "xTickFormat" }] : []));
1561
+ xGridLine = input(...(ngDevMode ? [undefined, { debugName: "xGridLine" }] : []));
1562
+ xDomainLine = input(...(ngDevMode ? [undefined, { debugName: "xDomainLine" }] : []));
1563
+ tooltipTitleFormatter = input(...(ngDevMode ? [undefined, { debugName: "tooltipTitleFormatter" }] : []));
1564
+ clickEvent = output();
1565
+ scrollEvent = output();
1566
+ labelHover = output();
1567
+ tooltipWrapper = viewChild('tooltipWrapper', ...(ngDevMode ? [{ debugName: "tooltipWrapper" }] : []));
1568
+ slotValue = signal(undefined, ...(ngDevMode ? [{ debugName: "slotValue" }] : []));
1569
+ isLegendTop = computed(() => this.legendPosition().startsWith('top'), ...(ngDevMode ? [{ debugName: "isLegendTop" }] : []));
1570
+ legendAlignment = computed(() => {
1571
+ const pos = this.legendPosition();
1572
+ if (pos.includes('left'))
1573
+ return 'flex-start';
1574
+ if (pos.includes('right'))
1575
+ return 'flex-end';
1576
+ return 'center';
1577
+ }, ...(ngDevMode ? [{ debugName: "legendAlignment" }] : []));
1578
+ legendItems = computed(() => {
1579
+ return Object.values(this.categories()).map((item) => ({
1580
+ ...item,
1581
+ color: Array.isArray(item.color) ? item.color[0] : item.color,
1582
+ }));
1583
+ }, ...(ngDevMode ? [{ debugName: "legendItems" }] : []));
1584
+ colors = computed(() => {
1585
+ const cats = this.categories();
1586
+ const defaultColors = Object.values(cats).map((_, index) => `var(--vis-color${index})`);
1587
+ return Object.values(cats).map((c, i) => {
1588
+ const color = c.color ?? defaultColors[i];
1589
+ return Array.isArray(color) ? color[0] : color;
1590
+ });
1591
+ }, ...(ngDevMode ? [{ debugName: "colors" }] : []));
1592
+ tickFormatFn = (tick, i, ticks) => {
1593
+ const formatter = this.xTickFormat();
1594
+ return formatter ? formatter(tick, i, ticks) : dateFormatter(tick);
1595
+ };
1596
+ tooltipTriggers = {
1597
+ [Timeline.selectors.label]: (d) => {
1598
+ this.generateLabelTooltip(d);
1599
+ return d ? this.tooltipWrapper()?.nativeElement.innerHTML ?? '' : '';
1600
+ },
1601
+ };
1602
+ generateLabelTooltip(d) {
1603
+ this.slotValue.set(d);
1604
+ this.labelHover.emit(d);
1605
+ this.cdr.detectChanges();
1606
+ }
1607
+ onScroll(event) {
1608
+ this.scrollEvent.emit(event.deltaY);
1609
+ }
1610
+ cdr = inject(ChangeDetectorRef);
1611
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GanttChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1612
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: GanttChartComponent, isStandalone: true, selector: "ngx-gantt-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, x: { classPropertyName: "x", publicName: "x", isSignal: true, isRequired: true, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, hideTooltip: { classPropertyName: "hideTooltip", publicName: "hideTooltip", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendStyle: { classPropertyName: "legendStyle", publicName: "legendStyle", isSignal: true, isRequired: false, transformFunction: null }, hideLegend: { classPropertyName: "hideLegend", publicName: "hideLegend", isSignal: true, isRequired: false, transformFunction: null }, xNumTicks: { classPropertyName: "xNumTicks", publicName: "xNumTicks", isSignal: true, isRequired: false, transformFunction: null }, xTickLine: { classPropertyName: "xTickLine", publicName: "xTickLine", isSignal: true, isRequired: false, transformFunction: null }, xTickFormat: { classPropertyName: "xTickFormat", publicName: "xTickFormat", isSignal: true, isRequired: false, transformFunction: null }, xGridLine: { classPropertyName: "xGridLine", publicName: "xGridLine", isSignal: true, isRequired: false, transformFunction: null }, xDomainLine: { classPropertyName: "xDomainLine", publicName: "xDomainLine", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitleFormatter: { classPropertyName: "tooltipTitleFormatter", publicName: "tooltipTitleFormatter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickEvent: "clickEvent", scrollEvent: "scrollEvent", labelHover: "labelHover" }, viewQueries: [{ propertyName: "tooltipWrapper", first: true, predicate: ["tooltipWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
1613
+ <div
1614
+ [style.display]="'flex'"
1615
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
1616
+ [style.gap]="'var(--vis-legend-spacing)'"
1617
+ >
1618
+ <vis-xy-container
1619
+ [data]="data()"
1620
+ [height]="height()"
1621
+ (wheel)="onScroll($event)"
1622
+ >
1623
+ <vis-timeline
1624
+ [x]="x()"
1625
+ [length]="length()"
1626
+ [lineWidth]="lineWidth()"
1627
+ [rowHeight]="rowHeight()"
1628
+ [type]="type()"
1629
+ [color]="colors()"
1630
+ [labelWidth]="labelWidth()"
1631
+ [showLabels]="showLabels()"
1632
+ ></vis-timeline>
1633
+
1634
+ <vis-tooltip
1635
+ [triggers]="tooltipTriggers"
1636
+ ></vis-tooltip>
1637
+
1638
+ <vis-axis
1639
+ type="x"
1640
+ [tickFormat]="tickFormatFn"
1641
+ [numTicks]="xNumTicks()"
1642
+ [tickLine]="xTickLine()"
1643
+ [gridLine]="xGridLine()"
1644
+ [domainLine]="xDomainLine()"
1645
+ ></vis-axis>
1646
+ </vis-xy-container>
1647
+
1648
+ @if (!hideLegend()) {
1649
+ <div
1650
+ [style.display]="'flex'"
1651
+ [style.justifyContent]="legendAlignment()"
1652
+ >
1653
+ <vis-bullet-legend
1654
+ [items]="legendItems()"
1655
+ ></vis-bullet-legend>
1656
+ </div>
1657
+ }
1658
+
1659
+ <div #tooltipWrapper style="display: none">
1660
+ @if (slotValue()) {
1661
+ <ngx-tooltip
1662
+ [data]="slotValue()!"
1663
+ [categories]="categories()"
1664
+ [titleFormatter]="tooltipTitleFormatter()"
1665
+ ></ngx-tooltip>
1666
+ }
1667
+ </div>
1668
+ </div>
1669
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: VisXYContainerModule }, { kind: "component", type: i1.VisXYContainerComponent, selector: "vis-xy-container", inputs: ["width", "height", "xScale", "xDomain", "xDomainMinConstraint", "xDomainMaxConstraint", "xRange", "yScale", "yDomain", "yDomainMinConstraint", "yDomainMaxConstraint", "yRange", "yDirection", "preventEmptyDomain", "duration", "margin", "padding", "scaleByDomain", "autoMargin", "ariaLabel", "data"] }, { kind: "ngmodule", type: VisTimelineModule }, { kind: "component", type: i1.VisTimelineComponent, selector: "vis-timeline", inputs: ["duration", "events", "attributes", "x", "id", "color", "xScale", "yScale", "excludeFromDomainCalculation", "type", "length", "cursor", "lineRow", "lineDuration", "lineWidth", "lineCap", "lineStartIcon", "lineStartIconColor", "lineStartIconSize", "lineStartIconArrangement", "lineEndIcon", "lineEndIconColor", "lineEndIconSize", "lineEndIconArrangement", "lineCursor", "showEmptySegments", "showEmptySegmentsCorrectPosition", "rowHeight", "alternatingRowColors", "showLabels", "labelWidth", "maxLabelWidth", "showRowLabels", "rowLabelStyle", "rowLabelFormatter", "rowIcon", "rowLabelWidth", "rowMaxLabelWidth", "rowLabelTextAlign", "arrows", "animationLineEnterPosition", "animationLineExitPosition", "onScroll", "data"] }, { kind: "ngmodule", type: VisAxisModule }, { kind: "component", type: i1.VisAxisComponent, selector: "vis-axis", inputs: ["duration", "events", "attributes", "position", "type", "fullSize", "label", "labelFontSize", "labelMargin", "labelTextFitMode", "labelTextTrimType", "labelColor", "gridLine", "tickLine", "domainLine", "minMaxTicksOnly", "minMaxTicksOnlyShowGridLines", "minMaxTicksOnlyWhenWidthIsLess", "tickFormat", "tickValues", "numTicks", "tickTextFitMode", "tickTextWidth", "tickTextSeparator", "tickTextForceWordBreak", "tickTextTrimType", "tickTextFontSize", "tickTextAlign", "tickTextColor", "tickTextAngle", "tickTextHideOverlapping", "tickPadding", "data"] }, { kind: "ngmodule", type: VisTooltipModule }, { kind: "component", type: i1.VisTooltipComponent, selector: "vis-tooltip", inputs: ["components", "container", "followCursor", "allowHover", "horizontalPlacement", "horizontalShift", "verticalPlacement", "verticalShift", "triggers", "attributes", "className", "hideDelay", "showDelay"] }, { kind: "ngmodule", type: VisBulletLegendModule }, { kind: "component", type: i1.VisBulletLegendComponent, selector: "vis-bullet-legend", inputs: ["items", "labelClassName", "onLegendItemClick", "labelFontSize", "labelMaxWidth", "bulletSize", "bulletSpacing", "bulletShape", "orientation"] }, { kind: "component", type: TooltipComponent, selector: "ngx-tooltip", inputs: ["data", "categories", "titleFormatter", "yFormatter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1670
+ }
1671
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GanttChartComponent, decorators: [{
1672
+ type: Component,
1673
+ args: [{
1674
+ selector: 'ngx-gantt-chart',
1675
+ standalone: true,
1676
+ imports: [
1677
+ CommonModule,
1678
+ VisXYContainerModule,
1679
+ VisTimelineModule,
1680
+ VisAxisModule,
1681
+ VisTooltipModule,
1682
+ VisBulletLegendModule,
1683
+ TooltipComponent,
1684
+ ],
1685
+ template: `
1686
+ <div
1687
+ [style.display]="'flex'"
1688
+ [style.flexDirection]="isLegendTop() ? 'column-reverse' : 'column'"
1689
+ [style.gap]="'var(--vis-legend-spacing)'"
1690
+ >
1691
+ <vis-xy-container
1692
+ [data]="data()"
1693
+ [height]="height()"
1694
+ (wheel)="onScroll($event)"
1695
+ >
1696
+ <vis-timeline
1697
+ [x]="x()"
1698
+ [length]="length()"
1699
+ [lineWidth]="lineWidth()"
1700
+ [rowHeight]="rowHeight()"
1701
+ [type]="type()"
1702
+ [color]="colors()"
1703
+ [labelWidth]="labelWidth()"
1704
+ [showLabels]="showLabels()"
1705
+ ></vis-timeline>
1706
+
1707
+ <vis-tooltip
1708
+ [triggers]="tooltipTriggers"
1709
+ ></vis-tooltip>
1710
+
1711
+ <vis-axis
1712
+ type="x"
1713
+ [tickFormat]="tickFormatFn"
1714
+ [numTicks]="xNumTicks()"
1715
+ [tickLine]="xTickLine()"
1716
+ [gridLine]="xGridLine()"
1717
+ [domainLine]="xDomainLine()"
1718
+ ></vis-axis>
1719
+ </vis-xy-container>
1720
+
1721
+ @if (!hideLegend()) {
1722
+ <div
1723
+ [style.display]="'flex'"
1724
+ [style.justifyContent]="legendAlignment()"
1725
+ >
1726
+ <vis-bullet-legend
1727
+ [items]="legendItems()"
1728
+ ></vis-bullet-legend>
1729
+ </div>
1730
+ }
1731
+
1732
+ <div #tooltipWrapper style="display: none">
1733
+ @if (slotValue()) {
1734
+ <ngx-tooltip
1735
+ [data]="slotValue()!"
1736
+ [categories]="categories()"
1737
+ [titleFormatter]="tooltipTitleFormatter()"
1738
+ ></ngx-tooltip>
1739
+ }
1740
+ </div>
1741
+ </div>
1742
+ `,
1743
+ changeDetection: ChangeDetectionStrategy.OnPush,
1744
+ }]
1745
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], x: [{ type: i0.Input, args: [{ isSignal: true, alias: "x", required: true }] }], length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], hideTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTooltip", required: false }] }], lineWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineWidth", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendStyle", required: false }] }], hideLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLegend", required: false }] }], xNumTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "xNumTicks", required: false }] }], xTickLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xTickLine", required: false }] }], xTickFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "xTickFormat", required: false }] }], xGridLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xGridLine", required: false }] }], xDomainLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "xDomainLine", required: false }] }], tooltipTitleFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitleFormatter", required: false }] }], clickEvent: [{ type: i0.Output, args: ["clickEvent"] }], scrollEvent: [{ type: i0.Output, args: ["scrollEvent"] }], labelHover: [{ type: i0.Output, args: ["labelHover"] }], tooltipWrapper: [{ type: i0.ViewChild, args: ['tooltipWrapper', { isSignal: true }] }] } });
1746
+
1747
+ /*
1748
+ * Public API Surface of lib
1749
+ */
1750
+
1751
+ /**
1752
+ * Generated bundle index. Do not edit.
1753
+ */
1754
+
1755
+ export { AreaChartComponent, BarChartComponent, BubbleChartComponent, CurveType, DonutChartComponent, DonutType, GanttChartComponent, LegendPosition, LineChartComponent, Orientation, TooltipComponent };
1756
+ //# sourceMappingURL=angular-chrts.mjs.map