@tectra-ng/charts 0.0.0-stage → 0.1.9

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,1081 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, afterNextRender, booleanAttribute, computed, contentChild, inject, input, linkedSignal, output, signal, viewChild } from "@angular/core";
3
+ import { TxChartAxes, TxChartFrame, TxChartLegendTemplate, TxChartTooltipTemplate, areaPath, cartesianLayout, chartMonthNames, chartNumberFormatter, chartSummary, chartTable, cycleIndex, decimateSeries, extent, hasChartData, initialChartSize, injectChartEntrance, linePath, normalizeSeries, seriesColor, stackValues, stepIndex, timeInterval, timeTooltipFormatter, toggleKey } from "@tectra-ng/charts/core";
4
+ import { uniqueId } from "@tectra-ng/core/a11y";
5
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
6
+ import { TxLocaleService, formatMessage, injectTranslations } from "@tectra-ng/core/i18n";
7
+ import { optionalBoolean } from "@tectra-ng/core/utils";
8
+ import { toStyleObject } from "@tectra-ng/themes";
9
+ const DECIMATE_RATIO = 1.5;
10
+ var TxLineChart = class TxLineChart {
11
+ locale = inject(TxLocaleService);
12
+ translations = injectTranslations();
13
+ series = input([], ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
14
+ categories = input([], ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
15
+ xType = input("category", ...ngDevMode ? [{ debugName: "xType" }] : /* istanbul ignore next */ []);
16
+ height = input(450, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
17
+ curve = input("smooth", ...ngDevMode ? [{ debugName: "curve" }] : /* istanbul ignore next */ []);
18
+ area = input(true, {
19
+ ...ngDevMode ? { debugName: "area" } : /* istanbul ignore next */ {},
20
+ transform: booleanAttribute
21
+ });
22
+ stacked = input(false, {
23
+ ...ngDevMode ? { debugName: "stacked" } : /* istanbul ignore next */ {},
24
+ transform: booleanAttribute
25
+ });
26
+ stackType = input("normal", ...ngDevMode ? [{ debugName: "stackType" }] : /* istanbul ignore next */ []);
27
+ markers = input(false, {
28
+ ...ngDevMode ? { debugName: "markers" } : /* istanbul ignore next */ {},
29
+ transform: booleanAttribute
30
+ });
31
+ showLegend = input(true, {
32
+ ...ngDevMode ? { debugName: "showLegend" } : /* istanbul ignore next */ {},
33
+ transform: booleanAttribute
34
+ });
35
+ legendPosition = input("top", ...ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []);
36
+ legendAlign = input("start", ...ngDevMode ? [{ debugName: "legendAlign" }] : /* istanbul ignore next */ []);
37
+ legendVariant = input("line", ...ngDevMode ? [{ debugName: "legendVariant" }] : /* istanbul ignore next */ []);
38
+ showTooltip = input(true, {
39
+ ...ngDevMode ? { debugName: "showTooltip" } : /* istanbul ignore next */ {},
40
+ transform: booleanAttribute
41
+ });
42
+ tooltipMode = input("shared", ...ngDevMode ? [{ debugName: "tooltipMode" }] : /* istanbul ignore next */ []);
43
+ tooltipFormatter = input(null, ...ngDevMode ? [{ debugName: "tooltipFormatter" }] : /* istanbul ignore next */ []);
44
+ valueFormat = input("number", ...ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []);
45
+ yScale = input("linear", ...ngDevMode ? [{ debugName: "yScale" }] : /* istanbul ignore next */ []);
46
+ yMin = input(void 0, ...ngDevMode ? [{ debugName: "yMin" }] : /* istanbul ignore next */ []);
47
+ yMax = input(void 0, ...ngDevMode ? [{ debugName: "yMax" }] : /* istanbul ignore next */ []);
48
+ xAxisTitle = input("", ...ngDevMode ? [{ debugName: "xAxisTitle" }] : /* istanbul ignore next */ []);
49
+ yAxisTitle = input("", ...ngDevMode ? [{ debugName: "yAxisTitle" }] : /* istanbul ignore next */ []);
50
+ grid = input("value", ...ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []);
51
+ xAxisPosition = input("bottom", ...ngDevMode ? [{ debugName: "xAxisPosition" }] : /* istanbul ignore next */ []);
52
+ yAxisPosition = input("left", ...ngDevMode ? [{ debugName: "yAxisPosition" }] : /* istanbul ignore next */ []);
53
+ labelMode = input("auto", ...ngDevMode ? [{ debugName: "labelMode" }] : /* istanbul ignore next */ []);
54
+ maxLabels = input(10, ...ngDevMode ? [{ debugName: "maxLabels" }] : /* istanbul ignore next */ []);
55
+ decimation = input(true, {
56
+ ...ngDevMode ? { debugName: "decimation" } : /* istanbul ignore next */ {},
57
+ transform: booleanAttribute
58
+ });
59
+ loading = input(false, {
60
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
61
+ transform: booleanAttribute
62
+ });
63
+ ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
64
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
65
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
66
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
67
+ unstyled = input(void 0, {
68
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
69
+ transform: optionalBoolean
70
+ });
71
+ seriesToggle = output();
72
+ pointClick = output();
73
+ legendTemplate = contentChild(TxChartLegendTemplate, ...ngDevMode ? [{ debugName: "legendTemplate" }] : /* istanbul ignore next */ []);
74
+ tooltipTemplate = contentChild(TxChartTooltipTemplate, ...ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []);
75
+ frame = viewChild(TxChartFrame, ...ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []);
76
+ isUnstyled = injectUnstyled(this.unstyled);
77
+ passThrough = injectPassThrough("lineChart", this, this.pt, this.ptOptions);
78
+ tokenStyle = computed(() => toStyleObject(this.dt(), "--tx-chart"), ...ngDevMode ? [{ debugName: "tokenStyle" }] : /* istanbul ignore next */ []);
79
+ hostStyle = computed(() => ({
80
+ ...this.tokenStyle(),
81
+ ...this.passThrough().root?.style
82
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
83
+ entrance = injectChartEntrance();
84
+ morph = signal(false, ...ngDevMode ? [{ debugName: "morph" }] : /* istanbul ignore next */ []);
85
+ uid = uniqueId("tx-line-chart");
86
+ hidden = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
87
+ focusedSeries = signal(null, ...ngDevMode ? [{ debugName: "focusedSeries" }] : /* istanbul ignore next */ []);
88
+ active = signal(null, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
89
+ size = linkedSignal(() => initialChartSize(this.height(), this.legendShown() ? this.legendPosition() : null), ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
90
+ intl = computed(() => this.locale.locale().intl, ...ngDevMode ? [{ debugName: "intl" }] : /* istanbul ignore next */ []);
91
+ list = computed(() => this.series() ?? [], ...ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []);
92
+ table = computed(() => {
93
+ const categories = this.categories() ?? [];
94
+ const fallback = this.xType() === "category" && !categories.length && this.list().every((item) => item.data.every((value) => typeof value !== "object"));
95
+ return normalizeSeries(this.list(), fallback ? chartMonthNames(this.intl(), "long") : categories, this.xType());
96
+ }, ...ngDevMode ? [{ debugName: "table" }] : /* istanbul ignore next */ []);
97
+ keys = computed(() => this.list().map((item, index) => `${index}:${item.name}`), ...ngDevMode ? [{ debugName: "keys" }] : /* istanbul ignore next */ []);
98
+ visibleIndexes = computed(() => this.keys().flatMap((key, index) => this.hidden().has(key) ? [] : [index]), ...ngDevMode ? [{ debugName: "visibleIndexes" }] : /* istanbul ignore next */ []);
99
+ isEmpty = computed(() => !this.list().length || !hasChartData(this.table().values), ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
100
+ isStacked = computed(() => this.stacked() || this.stackType() === "100%", ...ngDevMode ? [{ debugName: "isStacked" }] : /* istanbul ignore next */ []);
101
+ legendShown = computed(() => this.showLegend() && this.list().length > 1, ...ngDevMode ? [{ debugName: "legendShown" }] : /* istanbul ignore next */ []);
102
+ stackedValues = computed(() => {
103
+ const values = this.table().values;
104
+ const visible = new Set(this.visibleIndexes());
105
+ const rows = values.map((row, index) => visible.has(index) ? row : row.map(() => null));
106
+ return stackValues(rows, this.stackType());
107
+ }, ...ngDevMode ? [{ debugName: "stackedValues" }] : /* istanbul ignore next */ []);
108
+ valueExtent = computed(() => {
109
+ const visible = this.visibleIndexes();
110
+ if (this.isStacked()) {
111
+ const all = this.stackedValues().flatMap((row, index) => visible.includes(index) ? row.flatMap((value) => value ? [value[0], value[1]] : []) : []);
112
+ return extent(all) ?? [0, 1];
113
+ }
114
+ return extent(visible.flatMap((index) => this.table().values[index])) ?? [0, 1];
115
+ }, ...ngDevMode ? [{ debugName: "valueExtent" }] : /* istanbul ignore next */ []);
116
+ axisFormat = computed(() => this.stackType() === "100%" && this.isStacked() && this.valueFormat() === "number" ? "percent" : this.valueFormat(), ...ngDevMode ? [{ debugName: "axisFormat" }] : /* istanbul ignore next */ []);
117
+ timeLabel = computed(() => {
118
+ const xs = this.table().xs;
119
+ if (this.xType() !== "time" || xs.length < 1) return null;
120
+ return timeTooltipFormatter(this.intl(), timeInterval(xs[0], xs[xs.length - 1], Math.max(2, Math.min(12, xs.length))));
121
+ }, ...ngDevMode ? [{ debugName: "timeLabel" }] : /* istanbul ignore next */ []);
122
+ labels = computed(() => {
123
+ const format = this.timeLabel();
124
+ const { labels, xs } = this.table();
125
+ return format ? xs.map((x) => format(x)) : labels;
126
+ }, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
127
+ layout = computed(() => {
128
+ const { width, height } = this.size();
129
+ const { xs } = this.table();
130
+ const kind = this.xType() === "category" ? "point" : this.xType() === "time" ? "time" : "linear";
131
+ const domain = xs.length ? [xs[0], xs[xs.length - 1] === xs[0] ? xs[0] + 1 : xs[xs.length - 1]] : [0, 1];
132
+ return cartesianLayout({
133
+ width,
134
+ height,
135
+ intl: this.intl(),
136
+ category: {
137
+ kind,
138
+ labels: this.table().labels,
139
+ count: xs.length,
140
+ domain,
141
+ labelMode: this.labelMode(),
142
+ maxLabels: this.maxLabels(),
143
+ title: this.xAxisTitle() || void 0
144
+ },
145
+ value: {
146
+ extent: this.valueExtent(),
147
+ scale: this.yScale(),
148
+ format: this.axisFormat(),
149
+ includeZero: this.area() || this.isStacked(),
150
+ min: this.isStacked() && this.stackType() === "100%" ? 0 : this.yMin(),
151
+ max: this.isStacked() && this.stackType() === "100%" ? 100 : this.yMax(),
152
+ title: this.yAxisTitle() || void 0
153
+ },
154
+ grid: this.grid(),
155
+ xAxisPosition: this.xAxisPosition(),
156
+ yAxisPosition: this.yAxisPosition()
157
+ });
158
+ }, ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
159
+ xPositions = computed(() => {
160
+ const layout = this.layout();
161
+ const { xs } = this.table();
162
+ return xs.map((x, index) => layout.categoryPosition(index, x));
163
+ }, ...ngDevMode ? [{ debugName: "xPositions" }] : /* istanbul ignore next */ []);
164
+ paths = computed(() => {
165
+ const layout = this.layout();
166
+ const xs = this.xPositions();
167
+ const { values } = this.table();
168
+ const stacked = this.isStacked();
169
+ const stackedValues = this.stackedValues();
170
+ const visible = this.visibleIndexes();
171
+ const scale = layout.value;
172
+ const base = scale.map(scale.domain[0] <= 0 && scale.domain[1] >= 0 ? 0 : scale.domain[0]);
173
+ const threshold = Math.max(16, Math.round(layout.plot.width * DECIMATE_RATIO));
174
+ const curve = this.curve();
175
+ return visible.map((seriesIndex) => {
176
+ const item = this.list()[seriesIndex];
177
+ const top = values[seriesIndex].map((value, index) => {
178
+ if (value === null) return null;
179
+ const y = stacked ? stackedValues[seriesIndex][index]?.[1] ?? null : value;
180
+ return y === null ? null : {
181
+ x: xs[index],
182
+ y: scale.map(y)
183
+ };
184
+ });
185
+ const bottom = values[seriesIndex].map((value, index) => {
186
+ if (value === null) return null;
187
+ const y0 = stacked ? stackedValues[seriesIndex][index]?.[0] ?? 0 : null;
188
+ return {
189
+ x: xs[index],
190
+ y: y0 === null ? base : scale.map(y0)
191
+ };
192
+ });
193
+ const sampled = this.decimation() && top.length > threshold ? decimateSeries(top, threshold) : null;
194
+ const drawnTop = sampled ?? top;
195
+ const drawnBottom = sampled ? sampled.map((point) => point ? bottom[point.index] ?? null : null) : bottom;
196
+ const showMarkers = this.markers() && top.length <= layout.plot.width / 6;
197
+ return {
198
+ index: seriesIndex,
199
+ key: this.keys()[seriesIndex],
200
+ name: item.name,
201
+ color: seriesColor(item.color, seriesIndex),
202
+ line: linePath(drawnTop, curve),
203
+ area: this.area() ? areaPath(drawnTop, drawnBottom, curve) : "",
204
+ markers: showMarkers ? top.flatMap((point, index) => point ? [{
205
+ x: point.x,
206
+ y: point.y,
207
+ index
208
+ }] : []) : [],
209
+ gradient: `${this.uid}-fill-${seriesIndex}`
210
+ };
211
+ });
212
+ }, ...ngDevMode ? [{ debugName: "paths" }] : /* istanbul ignore next */ []);
213
+ legendItems = computed(() => {
214
+ const stat = this.legendVariant() === "stat";
215
+ const active = this.active();
216
+ const format = this.formatValue();
217
+ return this.list().map((item, index) => {
218
+ const values = this.table().values[index] ?? [];
219
+ let at = active?.index ?? -1;
220
+ if (stat && at < 0) {
221
+ for (let cursor = values.length - 1; cursor >= 0; cursor--) if (values[cursor] !== null) {
222
+ at = cursor;
223
+ break;
224
+ }
225
+ }
226
+ const raw = at >= 0 ? values[at] : null;
227
+ return {
228
+ key: this.keys()[index],
229
+ label: item.name,
230
+ color: seriesColor(item.color, index),
231
+ hidden: this.hidden().has(this.keys()[index]),
232
+ ...stat ? {
233
+ value: raw === null || raw === void 0 ? "—" : format(raw, index, at),
234
+ caption: at >= 0 ? this.labels()[at] : void 0
235
+ } : {}
236
+ };
237
+ });
238
+ }, ...ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []);
239
+ valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat() === "number" ? "integer" : this.valueFormat()), ...ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []);
240
+ formatValue = computed(() => {
241
+ const custom = this.tooltipFormatter();
242
+ const format = this.valueFormatter();
243
+ return (value, seriesIndex, dataPointIndex) => custom ? custom(value, {
244
+ seriesIndex,
245
+ dataPointIndex
246
+ }) : format(value);
247
+ }, ...ngDevMode ? [{ debugName: "formatValue" }] : /* istanbul ignore next */ []);
248
+ crosshair = computed(() => {
249
+ const active = this.active();
250
+ if (!active) return null;
251
+ const x = this.xPositions()[active.index];
252
+ const plot = this.layout().plot;
253
+ return x === void 0 ? null : {
254
+ x,
255
+ y1: plot.top,
256
+ y2: plot.top + plot.height
257
+ };
258
+ }, ...ngDevMode ? [{ debugName: "crosshair" }] : /* istanbul ignore next */ []);
259
+ activePoints = computed(() => {
260
+ const active = this.active();
261
+ if (!active) return [];
262
+ const scale = this.layout().value;
263
+ const x = this.xPositions()[active.index];
264
+ return this.visibleIndexes().flatMap((seriesIndex) => {
265
+ const value = this.pointValue(seriesIndex, active.index);
266
+ if (value === null || this.tooltipMode() === "single" && seriesIndex !== active.series) return [];
267
+ return [{
268
+ x,
269
+ y: scale.map(value),
270
+ color: seriesColor(this.list()[seriesIndex].color, seriesIndex),
271
+ series: seriesIndex
272
+ }];
273
+ });
274
+ }, ...ngDevMode ? [{ debugName: "activePoints" }] : /* istanbul ignore next */ []);
275
+ tooltip = computed(() => {
276
+ const active = this.active();
277
+ if (!active || !this.showTooltip() || this.isEmpty() || this.legendVariant() === "stat") return null;
278
+ const format = this.formatValue();
279
+ const rows = this.visibleIndexes().filter((seriesIndex) => this.tooltipMode() === "shared" || seriesIndex === active.series).flatMap((seriesIndex) => {
280
+ const raw = this.table().values[seriesIndex][active.index];
281
+ if (raw === null) return [];
282
+ return [{
283
+ label: this.list()[seriesIndex].name,
284
+ value: format(raw, seriesIndex, active.index),
285
+ color: seriesColor(this.list()[seriesIndex].color, seriesIndex),
286
+ raw,
287
+ seriesIndex,
288
+ active: seriesIndex === active.series
289
+ }];
290
+ });
291
+ if (!rows.length) return null;
292
+ const points = this.activePoints();
293
+ const x = this.xPositions()[active.index];
294
+ const y = this.tooltipMode() === "single" ? points.find((point) => point.series === active.series)?.y ?? this.layout().plot.top : this.layout().plot.top;
295
+ const total = this.isStacked() && rows.length > 1 ? this.valueFormatter()(rows.reduce((sum, row) => sum + (row.raw ?? 0), 0)) : void 0;
296
+ return {
297
+ title: this.labels()[active.index] ?? "",
298
+ rows,
299
+ index: active.index,
300
+ x,
301
+ y,
302
+ placement: "top",
303
+ total
304
+ };
305
+ }, ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
306
+ summary = computed(() => {
307
+ const t = this.translations();
308
+ const type = this.area() ? t.chartArea : t.chartLine;
309
+ const values = this.table().values.flat().filter((value) => value !== null);
310
+ const range = extent(values);
311
+ const format = this.valueFormatter();
312
+ const text = chartSummary(t, this.intl(), type, this.list().length, this.table().xs.length, range ? [format(range[0]), format(range[1])] : null);
313
+ return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;
314
+ }, ...ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []);
315
+ dataTable = computed(() => {
316
+ const format = this.valueFormatter();
317
+ return chartTable(this.labels(), this.list().map((item, index) => ({
318
+ name: item.name,
319
+ values: this.table().values[index]
320
+ })), format);
321
+ }, ...ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []);
322
+ constructor() {
323
+ afterNextRender(() => setTimeout(() => this.morph.set(true), 120));
324
+ }
325
+ pointValue(seriesIndex, index) {
326
+ const raw = this.table().values[seriesIndex]?.[index] ?? null;
327
+ if (raw === null) return null;
328
+ return this.isStacked() ? this.stackedValues()[seriesIndex][index]?.[1] ?? null : raw;
329
+ }
330
+ onPointer(event) {
331
+ if (event.type === "leave") {
332
+ this.active.set(null);
333
+ return;
334
+ }
335
+ const plot = this.layout().plot;
336
+ if (event.x < plot.left - 8 || event.x > plot.left + plot.width + 8 || event.y < plot.top - 8 || event.y > plot.top + plot.height + 8) {
337
+ this.active.set(null);
338
+ return;
339
+ }
340
+ const index = this.layout().categoryIndexAt(event.x, this.table().xs);
341
+ if (index < 0) return;
342
+ const series = this.nearestSeries(index, event.y);
343
+ this.active.set({
344
+ index,
345
+ series,
346
+ pointerY: event.y,
347
+ keyboard: false
348
+ });
349
+ if (event.type === "click" && series >= 0) this.pointClick.emit({
350
+ seriesIndex: series,
351
+ dataPointIndex: index,
352
+ value: this.table().values[series][index],
353
+ category: this.labels()[index] ?? ""
354
+ });
355
+ }
356
+ onNavigate(event) {
357
+ const count = this.table().xs.length;
358
+ const current = this.active();
359
+ if (event.key === "Escape") {
360
+ this.active.set(null);
361
+ return;
362
+ }
363
+ const visible = this.visibleIndexes();
364
+ let index = current?.index ?? -1;
365
+ let series = current?.series ?? visible[0] ?? -1;
366
+ if (event.key === "ArrowUp" || event.key === "ArrowDown") {
367
+ series = cycleIndex(series, event.key === "ArrowDown" ? 1 : -1, visible);
368
+ index = Math.max(0, index);
369
+ } else index = stepIndex(event.key, index, count);
370
+ if (index < 0 || series < 0) return;
371
+ this.active.set({
372
+ index,
373
+ series,
374
+ pointerY: null,
375
+ keyboard: true
376
+ });
377
+ const value = this.table().values[series][index];
378
+ this.frame()?.announce(formatMessage(this.translations().chartPoint, {
379
+ series: this.list()[series].name,
380
+ category: this.labels()[index] ?? "",
381
+ value: value === null ? "—" : this.formatValue()(value, series, index)
382
+ }));
383
+ }
384
+ onLegendToggle(key) {
385
+ const index = this.keys().indexOf(key);
386
+ this.hidden.update((keys) => toggleKey(keys, key));
387
+ this.seriesToggle.emit({
388
+ seriesIndex: index,
389
+ name: this.list()[index]?.name ?? "",
390
+ hidden: this.hidden().has(key)
391
+ });
392
+ }
393
+ onLegendHover(key) {
394
+ const index = key === null ? -1 : this.keys().indexOf(key);
395
+ this.focusedSeries.set(index >= 0 && !this.hidden().has(key ?? "") ? index : null);
396
+ }
397
+ nearestSeries(index, y) {
398
+ const scale = this.layout().value;
399
+ let best = this.visibleIndexes()[0] ?? -1;
400
+ let distance = Infinity;
401
+ for (const seriesIndex of this.visibleIndexes()) {
402
+ const value = this.pointValue(seriesIndex, index);
403
+ if (value === null) continue;
404
+ const next = Math.abs(scale.map(value) - y);
405
+ if (next < distance) {
406
+ distance = next;
407
+ best = seriesIndex;
408
+ }
409
+ }
410
+ return best;
411
+ }
412
+ static ɵfac = i0.ɵɵngDeclareFactory({
413
+ minVersion: "12.0.0",
414
+ version: "22.2.3",
415
+ ngImport: i0,
416
+ type: TxLineChart,
417
+ deps: [],
418
+ target: i0.ɵɵFactoryTarget.Component
419
+ });
420
+ static ɵcmp = i0.ɵɵngDeclareComponent({
421
+ minVersion: "17.0.0",
422
+ version: "22.2.3",
423
+ type: TxLineChart,
424
+ isStandalone: true,
425
+ selector: "tx-line-chart",
426
+ inputs: {
427
+ series: {
428
+ classPropertyName: "series",
429
+ publicName: "series",
430
+ isSignal: true,
431
+ isRequired: false,
432
+ transformFunction: null
433
+ },
434
+ categories: {
435
+ classPropertyName: "categories",
436
+ publicName: "categories",
437
+ isSignal: true,
438
+ isRequired: false,
439
+ transformFunction: null
440
+ },
441
+ xType: {
442
+ classPropertyName: "xType",
443
+ publicName: "xType",
444
+ isSignal: true,
445
+ isRequired: false,
446
+ transformFunction: null
447
+ },
448
+ height: {
449
+ classPropertyName: "height",
450
+ publicName: "height",
451
+ isSignal: true,
452
+ isRequired: false,
453
+ transformFunction: null
454
+ },
455
+ curve: {
456
+ classPropertyName: "curve",
457
+ publicName: "curve",
458
+ isSignal: true,
459
+ isRequired: false,
460
+ transformFunction: null
461
+ },
462
+ area: {
463
+ classPropertyName: "area",
464
+ publicName: "area",
465
+ isSignal: true,
466
+ isRequired: false,
467
+ transformFunction: null
468
+ },
469
+ stacked: {
470
+ classPropertyName: "stacked",
471
+ publicName: "stacked",
472
+ isSignal: true,
473
+ isRequired: false,
474
+ transformFunction: null
475
+ },
476
+ stackType: {
477
+ classPropertyName: "stackType",
478
+ publicName: "stackType",
479
+ isSignal: true,
480
+ isRequired: false,
481
+ transformFunction: null
482
+ },
483
+ markers: {
484
+ classPropertyName: "markers",
485
+ publicName: "markers",
486
+ isSignal: true,
487
+ isRequired: false,
488
+ transformFunction: null
489
+ },
490
+ showLegend: {
491
+ classPropertyName: "showLegend",
492
+ publicName: "showLegend",
493
+ isSignal: true,
494
+ isRequired: false,
495
+ transformFunction: null
496
+ },
497
+ legendPosition: {
498
+ classPropertyName: "legendPosition",
499
+ publicName: "legendPosition",
500
+ isSignal: true,
501
+ isRequired: false,
502
+ transformFunction: null
503
+ },
504
+ legendAlign: {
505
+ classPropertyName: "legendAlign",
506
+ publicName: "legendAlign",
507
+ isSignal: true,
508
+ isRequired: false,
509
+ transformFunction: null
510
+ },
511
+ legendVariant: {
512
+ classPropertyName: "legendVariant",
513
+ publicName: "legendVariant",
514
+ isSignal: true,
515
+ isRequired: false,
516
+ transformFunction: null
517
+ },
518
+ showTooltip: {
519
+ classPropertyName: "showTooltip",
520
+ publicName: "showTooltip",
521
+ isSignal: true,
522
+ isRequired: false,
523
+ transformFunction: null
524
+ },
525
+ tooltipMode: {
526
+ classPropertyName: "tooltipMode",
527
+ publicName: "tooltipMode",
528
+ isSignal: true,
529
+ isRequired: false,
530
+ transformFunction: null
531
+ },
532
+ tooltipFormatter: {
533
+ classPropertyName: "tooltipFormatter",
534
+ publicName: "tooltipFormatter",
535
+ isSignal: true,
536
+ isRequired: false,
537
+ transformFunction: null
538
+ },
539
+ valueFormat: {
540
+ classPropertyName: "valueFormat",
541
+ publicName: "valueFormat",
542
+ isSignal: true,
543
+ isRequired: false,
544
+ transformFunction: null
545
+ },
546
+ yScale: {
547
+ classPropertyName: "yScale",
548
+ publicName: "yScale",
549
+ isSignal: true,
550
+ isRequired: false,
551
+ transformFunction: null
552
+ },
553
+ yMin: {
554
+ classPropertyName: "yMin",
555
+ publicName: "yMin",
556
+ isSignal: true,
557
+ isRequired: false,
558
+ transformFunction: null
559
+ },
560
+ yMax: {
561
+ classPropertyName: "yMax",
562
+ publicName: "yMax",
563
+ isSignal: true,
564
+ isRequired: false,
565
+ transformFunction: null
566
+ },
567
+ xAxisTitle: {
568
+ classPropertyName: "xAxisTitle",
569
+ publicName: "xAxisTitle",
570
+ isSignal: true,
571
+ isRequired: false,
572
+ transformFunction: null
573
+ },
574
+ yAxisTitle: {
575
+ classPropertyName: "yAxisTitle",
576
+ publicName: "yAxisTitle",
577
+ isSignal: true,
578
+ isRequired: false,
579
+ transformFunction: null
580
+ },
581
+ grid: {
582
+ classPropertyName: "grid",
583
+ publicName: "grid",
584
+ isSignal: true,
585
+ isRequired: false,
586
+ transformFunction: null
587
+ },
588
+ xAxisPosition: {
589
+ classPropertyName: "xAxisPosition",
590
+ publicName: "xAxisPosition",
591
+ isSignal: true,
592
+ isRequired: false,
593
+ transformFunction: null
594
+ },
595
+ yAxisPosition: {
596
+ classPropertyName: "yAxisPosition",
597
+ publicName: "yAxisPosition",
598
+ isSignal: true,
599
+ isRequired: false,
600
+ transformFunction: null
601
+ },
602
+ labelMode: {
603
+ classPropertyName: "labelMode",
604
+ publicName: "labelMode",
605
+ isSignal: true,
606
+ isRequired: false,
607
+ transformFunction: null
608
+ },
609
+ maxLabels: {
610
+ classPropertyName: "maxLabels",
611
+ publicName: "maxLabels",
612
+ isSignal: true,
613
+ isRequired: false,
614
+ transformFunction: null
615
+ },
616
+ decimation: {
617
+ classPropertyName: "decimation",
618
+ publicName: "decimation",
619
+ isSignal: true,
620
+ isRequired: false,
621
+ transformFunction: null
622
+ },
623
+ loading: {
624
+ classPropertyName: "loading",
625
+ publicName: "loading",
626
+ isSignal: true,
627
+ isRequired: false,
628
+ transformFunction: null
629
+ },
630
+ ariaLabel: {
631
+ classPropertyName: "ariaLabel",
632
+ publicName: "ariaLabel",
633
+ isSignal: true,
634
+ isRequired: false,
635
+ transformFunction: null
636
+ },
637
+ dt: {
638
+ classPropertyName: "dt",
639
+ publicName: "dt",
640
+ isSignal: true,
641
+ isRequired: false,
642
+ transformFunction: null
643
+ },
644
+ pt: {
645
+ classPropertyName: "pt",
646
+ publicName: "pt",
647
+ isSignal: true,
648
+ isRequired: false,
649
+ transformFunction: null
650
+ },
651
+ ptOptions: {
652
+ classPropertyName: "ptOptions",
653
+ publicName: "ptOptions",
654
+ isSignal: true,
655
+ isRequired: false,
656
+ transformFunction: null
657
+ },
658
+ unstyled: {
659
+ classPropertyName: "unstyled",
660
+ publicName: "unstyled",
661
+ isSignal: true,
662
+ isRequired: false,
663
+ transformFunction: null
664
+ }
665
+ },
666
+ outputs: {
667
+ seriesToggle: "seriesToggle",
668
+ pointClick: "pointClick"
669
+ },
670
+ host: {
671
+ properties: {
672
+ "class": "passThrough().root?.class",
673
+ "style": "hostStyle()",
674
+ "attr.data-styled": "!isUnstyled() || null",
675
+ "attr.data-curve": "curve()",
676
+ "class.tx-line-chart--area": "area()",
677
+ "class.tx-line-chart--fill": "typeof height() === \"string\"",
678
+ "class.tx-line-chart--entering": "entrance.active()",
679
+ "class.tx-line-chart--morph": "morph()",
680
+ "class.tx-line-chart--focused": "focusedSeries() !== null"
681
+ },
682
+ classAttribute: "tx-line-chart"
683
+ },
684
+ queries: [{
685
+ propertyName: "legendTemplate",
686
+ first: true,
687
+ predicate: TxChartLegendTemplate,
688
+ descendants: true,
689
+ isSignal: true
690
+ }, {
691
+ propertyName: "tooltipTemplate",
692
+ first: true,
693
+ predicate: TxChartTooltipTemplate,
694
+ descendants: true,
695
+ isSignal: true
696
+ }],
697
+ viewQueries: [{
698
+ propertyName: "frame",
699
+ first: true,
700
+ predicate: TxChartFrame,
701
+ descendants: true,
702
+ isSignal: true
703
+ }],
704
+ ngImport: i0,
705
+ template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendVariant]=\"legendVariant()\"\n [legendTemplate]=\"legendTemplate()?.template\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n emptyIcon=\"chart-line\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (legendToggled)=\"onLegendToggle($event)\"\n (legendHovered)=\"onLegendHover($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (crosshair(); as line) {\n <svg:line\n class=\"tx-line-chart__crosshair\"\n [class]=\"passThrough().crosshair?.class\"\n [style]=\"passThrough().crosshair?.style\"\n [attr.x1]=\"line.x\"\n [attr.x2]=\"line.x\"\n [attr.y1]=\"line.y1\"\n [attr.y2]=\"line.y2\"\n />\n }\n @for (path of paths(); track path.key) {\n <svg:g\n class=\"tx-line-chart__series\"\n [class.tx-line-chart__series--focused]=\"focusedSeries() === path.index\"\n [class]=\"passThrough().series?.class\"\n [style]=\"passThrough().series?.style\"\n [style.--tx-line-chart-color]=\"path.color\"\n [attr.data-series]=\"path.index\"\n >\n @if (path.area) {\n <svg:linearGradient [attr.id]=\"path.gradient\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop class=\"tx-line-chart__stop-from\" offset=\"0\" [style.stop-color]=\"path.color\" />\n <svg:stop class=\"tx-line-chart__stop-to\" offset=\"0.95\" [style.stop-color]=\"path.color\" />\n </svg:linearGradient>\n <svg:path\n class=\"tx-line-chart__area\"\n [class.tx-line-chart__area--stacked]=\"isStacked()\"\n [class]=\"passThrough().area?.class\"\n [style]=\"passThrough().area?.style\"\n [attr.d]=\"path.area\"\n [attr.fill]=\"'url(#' + path.gradient + ')'\"\n />\n }\n <svg:path\n class=\"tx-line-chart__line\"\n [class]=\"passThrough().line?.class\"\n [style]=\"passThrough().line?.style\"\n [attr.d]=\"path.line\"\n [style.stroke]=\"path.color\"\n />\n @for (marker of path.markers; track marker.index) {\n <svg:circle\n class=\"tx-line-chart__point\"\n [class]=\"passThrough().marker?.class\"\n [style]=\"passThrough().marker?.style\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [style.fill]=\"path.color\"\n />\n }\n </svg:g>\n }\n @for (point of activePoints(); track point.series) {\n <svg:circle class=\"tx-line-chart__halo\" [attr.cx]=\"point.x\" [attr.cy]=\"point.y\" [style.fill]=\"point.color\" />\n <svg:circle\n class=\"tx-line-chart__marker\"\n [class]=\"passThrough().marker?.class\"\n [attr.cx]=\"point.x\"\n [attr.cy]=\"point.y\"\n [style.fill]=\"point.color\"\n />\n }\n</tx-chart-frame>\n",
706
+ styles: [":host{display:block;min-width:0}:host(.tx-line-chart--fill){height:100%}.tx-line-chart__line{fill:none;stroke-linecap:round;stroke-linejoin:round}.tx-line-chart__crosshair{pointer-events:none;shape-rendering:crispEdges}.tx-line-chart__marker,.tx-line-chart__halo,.tx-line-chart__point{pointer-events:none}:host([data-styled]) .tx-line-chart__line{stroke-width:var(--tx-chart-line-stroke-width)}:host([data-styled]) .tx-line-chart__stop-from{stop-opacity:var(--tx-chart-line-area-opacity-from)}:host([data-styled]) .tx-line-chart__stop-to{stop-opacity:var(--tx-chart-line-area-opacity-to)}:host([data-styled]) .tx-line-chart__area--stacked{fill:var(--tx-line-chart-color);fill-opacity:var(--tx-chart-line-stacked-area-opacity)}:host([data-styled]) .tx-line-chart__point{r:var(--tx-chart-line-point-radius);stroke:var(--tx-chart-marker-stroke-color);stroke-width:var(--tx-chart-marker-stroke-width)}:host([data-styled]) .tx-line-chart__marker{r:var(--tx-chart-marker-radius);stroke:var(--tx-chart-marker-stroke-color);stroke-width:var(--tx-chart-marker-stroke-width)}:host([data-styled]) .tx-line-chart__halo{r:var(--tx-chart-marker-halo-radius);opacity:var(--tx-chart-marker-halo-opacity)}:host([data-styled]) .tx-line-chart__crosshair{stroke:var(--tx-chart-crosshair-color);stroke-width:var(--tx-chart-crosshair-width);stroke-dasharray:var(--tx-chart-crosshair-dash)}:host([data-styled]) .tx-line-chart__series{transition:opacity var(--tx-chart-motion-update-duration) ease}:host([data-styled].tx-line-chart--focused) .tx-line-chart__series:not(.tx-line-chart__series--focused){opacity:var(--tx-chart-line-dimmed-opacity)}:host([data-styled].tx-line-chart--morph) .tx-line-chart__line,:host([data-styled].tx-line-chart--morph) .tx-line-chart__area{transition:d var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-line-chart--morph) .tx-line-chart__point{transition:cx var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),cy var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-line-chart--entering) .tx-line-chart__series{animation:tx-line-chart-reveal var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both}@keyframes tx-line-chart-reveal{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-line-chart__series,:host([data-styled].tx-line-chart--morph) .tx-line-chart__line,:host([data-styled].tx-line-chart--morph) .tx-line-chart__area,:host([data-styled].tx-line-chart--morph) .tx-line-chart__point{transition:none;animation:none}}\n"],
707
+ dependencies: [{
708
+ kind: "component",
709
+ type: TxChartFrame,
710
+ selector: "tx-chart-frame",
711
+ inputs: [
712
+ "height",
713
+ "size",
714
+ "legendItems",
715
+ "showLegend",
716
+ "legendPosition",
717
+ "legendAlign",
718
+ "legendVariant",
719
+ "legendToggle",
720
+ "legendTemplate",
721
+ "empty",
722
+ "loading",
723
+ "emptyIcon",
724
+ "summary",
725
+ "table",
726
+ "tooltip",
727
+ "tooltipTemplate",
728
+ "tooltipPlacement",
729
+ "panelStyle",
730
+ "parts",
731
+ "styled",
732
+ "interactive",
733
+ "plotHeight"
734
+ ],
735
+ outputs: [
736
+ "sizeChange",
737
+ "pointer",
738
+ "navigate",
739
+ "legendToggled",
740
+ "legendHovered",
741
+ "tooltipClosed"
742
+ ]
743
+ }, {
744
+ kind: "component",
745
+ type: TxChartAxes,
746
+ selector: "g[tx-chart-axes]",
747
+ inputs: [
748
+ "tx-chart-axes",
749
+ "gridPart",
750
+ "axisPart"
751
+ ]
752
+ }],
753
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
754
+ });
755
+ };
756
+ i0.ɵɵngDeclareClassMetadata({
757
+ minVersion: "12.0.0",
758
+ version: "22.2.3",
759
+ ngImport: i0,
760
+ type: TxLineChart,
761
+ decorators: [{
762
+ type: Component,
763
+ args: [{
764
+ selector: "tx-line-chart",
765
+ imports: [TxChartFrame, TxChartAxes],
766
+ changeDetection: ChangeDetectionStrategy.OnPush,
767
+ host: {
768
+ class: "tx-line-chart",
769
+ "[class]": "passThrough().root?.class",
770
+ "[style]": "hostStyle()",
771
+ "[attr.data-styled]": "!isUnstyled() || null",
772
+ "[attr.data-curve]": "curve()",
773
+ "[class.tx-line-chart--area]": "area()",
774
+ "[class.tx-line-chart--fill]": "typeof height() === \"string\"",
775
+ "[class.tx-line-chart--entering]": "entrance.active()",
776
+ "[class.tx-line-chart--morph]": "morph()",
777
+ "[class.tx-line-chart--focused]": "focusedSeries() !== null"
778
+ },
779
+ template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendVariant]=\"legendVariant()\"\n [legendTemplate]=\"legendTemplate()?.template\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n emptyIcon=\"chart-line\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (legendToggled)=\"onLegendToggle($event)\"\n (legendHovered)=\"onLegendHover($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (crosshair(); as line) {\n <svg:line\n class=\"tx-line-chart__crosshair\"\n [class]=\"passThrough().crosshair?.class\"\n [style]=\"passThrough().crosshair?.style\"\n [attr.x1]=\"line.x\"\n [attr.x2]=\"line.x\"\n [attr.y1]=\"line.y1\"\n [attr.y2]=\"line.y2\"\n />\n }\n @for (path of paths(); track path.key) {\n <svg:g\n class=\"tx-line-chart__series\"\n [class.tx-line-chart__series--focused]=\"focusedSeries() === path.index\"\n [class]=\"passThrough().series?.class\"\n [style]=\"passThrough().series?.style\"\n [style.--tx-line-chart-color]=\"path.color\"\n [attr.data-series]=\"path.index\"\n >\n @if (path.area) {\n <svg:linearGradient [attr.id]=\"path.gradient\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop class=\"tx-line-chart__stop-from\" offset=\"0\" [style.stop-color]=\"path.color\" />\n <svg:stop class=\"tx-line-chart__stop-to\" offset=\"0.95\" [style.stop-color]=\"path.color\" />\n </svg:linearGradient>\n <svg:path\n class=\"tx-line-chart__area\"\n [class.tx-line-chart__area--stacked]=\"isStacked()\"\n [class]=\"passThrough().area?.class\"\n [style]=\"passThrough().area?.style\"\n [attr.d]=\"path.area\"\n [attr.fill]=\"'url(#' + path.gradient + ')'\"\n />\n }\n <svg:path\n class=\"tx-line-chart__line\"\n [class]=\"passThrough().line?.class\"\n [style]=\"passThrough().line?.style\"\n [attr.d]=\"path.line\"\n [style.stroke]=\"path.color\"\n />\n @for (marker of path.markers; track marker.index) {\n <svg:circle\n class=\"tx-line-chart__point\"\n [class]=\"passThrough().marker?.class\"\n [style]=\"passThrough().marker?.style\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [style.fill]=\"path.color\"\n />\n }\n </svg:g>\n }\n @for (point of activePoints(); track point.series) {\n <svg:circle class=\"tx-line-chart__halo\" [attr.cx]=\"point.x\" [attr.cy]=\"point.y\" [style.fill]=\"point.color\" />\n <svg:circle\n class=\"tx-line-chart__marker\"\n [class]=\"passThrough().marker?.class\"\n [attr.cx]=\"point.x\"\n [attr.cy]=\"point.y\"\n [style.fill]=\"point.color\"\n />\n }\n</tx-chart-frame>\n",
780
+ styles: [":host{display:block;min-width:0}:host(.tx-line-chart--fill){height:100%}.tx-line-chart__line{fill:none;stroke-linecap:round;stroke-linejoin:round}.tx-line-chart__crosshair{pointer-events:none;shape-rendering:crispEdges}.tx-line-chart__marker,.tx-line-chart__halo,.tx-line-chart__point{pointer-events:none}:host([data-styled]) .tx-line-chart__line{stroke-width:var(--tx-chart-line-stroke-width)}:host([data-styled]) .tx-line-chart__stop-from{stop-opacity:var(--tx-chart-line-area-opacity-from)}:host([data-styled]) .tx-line-chart__stop-to{stop-opacity:var(--tx-chart-line-area-opacity-to)}:host([data-styled]) .tx-line-chart__area--stacked{fill:var(--tx-line-chart-color);fill-opacity:var(--tx-chart-line-stacked-area-opacity)}:host([data-styled]) .tx-line-chart__point{r:var(--tx-chart-line-point-radius);stroke:var(--tx-chart-marker-stroke-color);stroke-width:var(--tx-chart-marker-stroke-width)}:host([data-styled]) .tx-line-chart__marker{r:var(--tx-chart-marker-radius);stroke:var(--tx-chart-marker-stroke-color);stroke-width:var(--tx-chart-marker-stroke-width)}:host([data-styled]) .tx-line-chart__halo{r:var(--tx-chart-marker-halo-radius);opacity:var(--tx-chart-marker-halo-opacity)}:host([data-styled]) .tx-line-chart__crosshair{stroke:var(--tx-chart-crosshair-color);stroke-width:var(--tx-chart-crosshair-width);stroke-dasharray:var(--tx-chart-crosshair-dash)}:host([data-styled]) .tx-line-chart__series{transition:opacity var(--tx-chart-motion-update-duration) ease}:host([data-styled].tx-line-chart--focused) .tx-line-chart__series:not(.tx-line-chart__series--focused){opacity:var(--tx-chart-line-dimmed-opacity)}:host([data-styled].tx-line-chart--morph) .tx-line-chart__line,:host([data-styled].tx-line-chart--morph) .tx-line-chart__area{transition:d var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-line-chart--morph) .tx-line-chart__point{transition:cx var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),cy var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-line-chart--entering) .tx-line-chart__series{animation:tx-line-chart-reveal var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both}@keyframes tx-line-chart-reveal{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-line-chart__series,:host([data-styled].tx-line-chart--morph) .tx-line-chart__line,:host([data-styled].tx-line-chart--morph) .tx-line-chart__area,:host([data-styled].tx-line-chart--morph) .tx-line-chart__point{transition:none;animation:none}}\n"]
781
+ }]
782
+ }],
783
+ ctorParameters: () => [],
784
+ propDecorators: {
785
+ series: [{
786
+ type: i0.Input,
787
+ args: [{
788
+ isSignal: true,
789
+ alias: "series",
790
+ required: false
791
+ }]
792
+ }],
793
+ categories: [{
794
+ type: i0.Input,
795
+ args: [{
796
+ isSignal: true,
797
+ alias: "categories",
798
+ required: false
799
+ }]
800
+ }],
801
+ xType: [{
802
+ type: i0.Input,
803
+ args: [{
804
+ isSignal: true,
805
+ alias: "xType",
806
+ required: false
807
+ }]
808
+ }],
809
+ height: [{
810
+ type: i0.Input,
811
+ args: [{
812
+ isSignal: true,
813
+ alias: "height",
814
+ required: false
815
+ }]
816
+ }],
817
+ curve: [{
818
+ type: i0.Input,
819
+ args: [{
820
+ isSignal: true,
821
+ alias: "curve",
822
+ required: false
823
+ }]
824
+ }],
825
+ area: [{
826
+ type: i0.Input,
827
+ args: [{
828
+ isSignal: true,
829
+ alias: "area",
830
+ required: false
831
+ }]
832
+ }],
833
+ stacked: [{
834
+ type: i0.Input,
835
+ args: [{
836
+ isSignal: true,
837
+ alias: "stacked",
838
+ required: false
839
+ }]
840
+ }],
841
+ stackType: [{
842
+ type: i0.Input,
843
+ args: [{
844
+ isSignal: true,
845
+ alias: "stackType",
846
+ required: false
847
+ }]
848
+ }],
849
+ markers: [{
850
+ type: i0.Input,
851
+ args: [{
852
+ isSignal: true,
853
+ alias: "markers",
854
+ required: false
855
+ }]
856
+ }],
857
+ showLegend: [{
858
+ type: i0.Input,
859
+ args: [{
860
+ isSignal: true,
861
+ alias: "showLegend",
862
+ required: false
863
+ }]
864
+ }],
865
+ legendPosition: [{
866
+ type: i0.Input,
867
+ args: [{
868
+ isSignal: true,
869
+ alias: "legendPosition",
870
+ required: false
871
+ }]
872
+ }],
873
+ legendAlign: [{
874
+ type: i0.Input,
875
+ args: [{
876
+ isSignal: true,
877
+ alias: "legendAlign",
878
+ required: false
879
+ }]
880
+ }],
881
+ legendVariant: [{
882
+ type: i0.Input,
883
+ args: [{
884
+ isSignal: true,
885
+ alias: "legendVariant",
886
+ required: false
887
+ }]
888
+ }],
889
+ showTooltip: [{
890
+ type: i0.Input,
891
+ args: [{
892
+ isSignal: true,
893
+ alias: "showTooltip",
894
+ required: false
895
+ }]
896
+ }],
897
+ tooltipMode: [{
898
+ type: i0.Input,
899
+ args: [{
900
+ isSignal: true,
901
+ alias: "tooltipMode",
902
+ required: false
903
+ }]
904
+ }],
905
+ tooltipFormatter: [{
906
+ type: i0.Input,
907
+ args: [{
908
+ isSignal: true,
909
+ alias: "tooltipFormatter",
910
+ required: false
911
+ }]
912
+ }],
913
+ valueFormat: [{
914
+ type: i0.Input,
915
+ args: [{
916
+ isSignal: true,
917
+ alias: "valueFormat",
918
+ required: false
919
+ }]
920
+ }],
921
+ yScale: [{
922
+ type: i0.Input,
923
+ args: [{
924
+ isSignal: true,
925
+ alias: "yScale",
926
+ required: false
927
+ }]
928
+ }],
929
+ yMin: [{
930
+ type: i0.Input,
931
+ args: [{
932
+ isSignal: true,
933
+ alias: "yMin",
934
+ required: false
935
+ }]
936
+ }],
937
+ yMax: [{
938
+ type: i0.Input,
939
+ args: [{
940
+ isSignal: true,
941
+ alias: "yMax",
942
+ required: false
943
+ }]
944
+ }],
945
+ xAxisTitle: [{
946
+ type: i0.Input,
947
+ args: [{
948
+ isSignal: true,
949
+ alias: "xAxisTitle",
950
+ required: false
951
+ }]
952
+ }],
953
+ yAxisTitle: [{
954
+ type: i0.Input,
955
+ args: [{
956
+ isSignal: true,
957
+ alias: "yAxisTitle",
958
+ required: false
959
+ }]
960
+ }],
961
+ grid: [{
962
+ type: i0.Input,
963
+ args: [{
964
+ isSignal: true,
965
+ alias: "grid",
966
+ required: false
967
+ }]
968
+ }],
969
+ xAxisPosition: [{
970
+ type: i0.Input,
971
+ args: [{
972
+ isSignal: true,
973
+ alias: "xAxisPosition",
974
+ required: false
975
+ }]
976
+ }],
977
+ yAxisPosition: [{
978
+ type: i0.Input,
979
+ args: [{
980
+ isSignal: true,
981
+ alias: "yAxisPosition",
982
+ required: false
983
+ }]
984
+ }],
985
+ labelMode: [{
986
+ type: i0.Input,
987
+ args: [{
988
+ isSignal: true,
989
+ alias: "labelMode",
990
+ required: false
991
+ }]
992
+ }],
993
+ maxLabels: [{
994
+ type: i0.Input,
995
+ args: [{
996
+ isSignal: true,
997
+ alias: "maxLabels",
998
+ required: false
999
+ }]
1000
+ }],
1001
+ decimation: [{
1002
+ type: i0.Input,
1003
+ args: [{
1004
+ isSignal: true,
1005
+ alias: "decimation",
1006
+ required: false
1007
+ }]
1008
+ }],
1009
+ loading: [{
1010
+ type: i0.Input,
1011
+ args: [{
1012
+ isSignal: true,
1013
+ alias: "loading",
1014
+ required: false
1015
+ }]
1016
+ }],
1017
+ ariaLabel: [{
1018
+ type: i0.Input,
1019
+ args: [{
1020
+ isSignal: true,
1021
+ alias: "ariaLabel",
1022
+ required: false
1023
+ }]
1024
+ }],
1025
+ dt: [{
1026
+ type: i0.Input,
1027
+ args: [{
1028
+ isSignal: true,
1029
+ alias: "dt",
1030
+ required: false
1031
+ }]
1032
+ }],
1033
+ pt: [{
1034
+ type: i0.Input,
1035
+ args: [{
1036
+ isSignal: true,
1037
+ alias: "pt",
1038
+ required: false
1039
+ }]
1040
+ }],
1041
+ ptOptions: [{
1042
+ type: i0.Input,
1043
+ args: [{
1044
+ isSignal: true,
1045
+ alias: "ptOptions",
1046
+ required: false
1047
+ }]
1048
+ }],
1049
+ unstyled: [{
1050
+ type: i0.Input,
1051
+ args: [{
1052
+ isSignal: true,
1053
+ alias: "unstyled",
1054
+ required: false
1055
+ }]
1056
+ }],
1057
+ seriesToggle: [{
1058
+ type: i0.Output,
1059
+ args: ["seriesToggle"]
1060
+ }],
1061
+ pointClick: [{
1062
+ type: i0.Output,
1063
+ args: ["pointClick"]
1064
+ }],
1065
+ legendTemplate: [{
1066
+ type: i0.ContentChild,
1067
+ args: [i0.forwardRef(() => TxChartLegendTemplate), { isSignal: true }]
1068
+ }],
1069
+ tooltipTemplate: [{
1070
+ type: i0.ContentChild,
1071
+ args: [i0.forwardRef(() => TxChartTooltipTemplate), { isSignal: true }]
1072
+ }],
1073
+ frame: [{
1074
+ type: i0.ViewChild,
1075
+ args: [i0.forwardRef(() => TxChartFrame), { isSignal: true }]
1076
+ }]
1077
+ }
1078
+ });
1079
+ export { TxLineChart };
1080
+
1081
+ //# sourceMappingURL=tectra-ng-charts-line.mjs.map