@tectra-ng/charts 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +21 -1
  2. package/bar-list/README.md +30 -0
  3. package/boxplot/README.md +62 -0
  4. package/bullet/README.md +53 -0
  5. package/candlestick/README.md +57 -0
  6. package/column/README.md +4 -2
  7. package/combo/README.md +83 -0
  8. package/core/README.md +3 -1
  9. package/fesm2022/tectra-ng-charts-bar-list.mjs +299 -0
  10. package/fesm2022/tectra-ng-charts-bar-list.mjs.map +1 -0
  11. package/fesm2022/tectra-ng-charts-boxplot.mjs +887 -0
  12. package/fesm2022/tectra-ng-charts-boxplot.mjs.map +1 -0
  13. package/fesm2022/tectra-ng-charts-bullet.mjs +666 -0
  14. package/fesm2022/tectra-ng-charts-bullet.mjs.map +1 -0
  15. package/fesm2022/tectra-ng-charts-candlestick.mjs +778 -0
  16. package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -0
  17. package/fesm2022/tectra-ng-charts-column.mjs +149 -66
  18. package/fesm2022/tectra-ng-charts-column.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-charts-combo.mjs +1218 -0
  20. package/fesm2022/tectra-ng-charts-combo.mjs.map +1 -0
  21. package/fesm2022/tectra-ng-charts-core.mjs +1334 -49
  22. package/fesm2022/tectra-ng-charts-core.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-charts-funnel.mjs +694 -0
  24. package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -0
  25. package/fesm2022/tectra-ng-charts-gantt.mjs +947 -0
  26. package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -0
  27. package/fesm2022/tectra-ng-charts-gauge.mjs +693 -0
  28. package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -0
  29. package/fesm2022/tectra-ng-charts-heatmap.mjs +935 -0
  30. package/fesm2022/tectra-ng-charts-heatmap.mjs.map +1 -0
  31. package/fesm2022/tectra-ng-charts-line.mjs +527 -67
  32. package/fesm2022/tectra-ng-charts-line.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-charts-org-chart.mjs +2341 -0
  34. package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -0
  35. package/fesm2022/tectra-ng-charts-pie.mjs +47 -86
  36. package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-charts-radar.mjs +924 -0
  38. package/fesm2022/tectra-ng-charts-radar.mjs.map +1 -0
  39. package/fesm2022/tectra-ng-charts-radial-bar.mjs +802 -0
  40. package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -0
  41. package/fesm2022/tectra-ng-charts-range-area.mjs +933 -0
  42. package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -0
  43. package/fesm2022/tectra-ng-charts-rank-line.mjs +660 -0
  44. package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -0
  45. package/fesm2022/tectra-ng-charts-sankey.mjs +837 -0
  46. package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -0
  47. package/fesm2022/tectra-ng-charts-scatter.mjs +1174 -0
  48. package/fesm2022/tectra-ng-charts-scatter.mjs.map +1 -0
  49. package/fesm2022/tectra-ng-charts-segmented-bar.mjs +328 -0
  50. package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -0
  51. package/fesm2022/tectra-ng-charts-sunburst.mjs +733 -0
  52. package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -0
  53. package/fesm2022/tectra-ng-charts-treemap.mjs +674 -0
  54. package/fesm2022/tectra-ng-charts-treemap.mjs.map +1 -0
  55. package/fesm2022/tectra-ng-charts-waterfall.mjs +809 -0
  56. package/fesm2022/tectra-ng-charts-waterfall.mjs.map +1 -0
  57. package/funnel/README.md +53 -0
  58. package/gantt/README.md +53 -0
  59. package/gauge/README.md +41 -0
  60. package/heatmap/README.md +47 -0
  61. package/line/README.md +13 -2
  62. package/org-chart/README.md +57 -0
  63. package/package.json +114 -6
  64. package/pie/README.md +1 -0
  65. package/radar/README.md +64 -0
  66. package/radial-bar/README.md +62 -0
  67. package/range-area/README.md +66 -0
  68. package/rank-line/README.md +51 -0
  69. package/sankey/README.md +52 -0
  70. package/scatter/README.md +71 -0
  71. package/segmented-bar/README.md +35 -0
  72. package/sunburst/README.md +55 -0
  73. package/treemap/README.md +47 -0
  74. package/types/tectra-ng-charts-bar-list.d.ts +724 -0
  75. package/types/tectra-ng-charts-bar-list.d.ts.map +1 -0
  76. package/types/tectra-ng-charts-boxplot.d.ts +882 -0
  77. package/types/tectra-ng-charts-boxplot.d.ts.map +1 -0
  78. package/types/tectra-ng-charts-bullet.d.ts +833 -0
  79. package/types/tectra-ng-charts-bullet.d.ts.map +1 -0
  80. package/types/tectra-ng-charts-candlestick.d.ts +854 -0
  81. package/types/tectra-ng-charts-candlestick.d.ts.map +1 -0
  82. package/types/tectra-ng-charts-column.d.ts +486 -3
  83. package/types/tectra-ng-charts-column.d.ts.map +1 -1
  84. package/types/tectra-ng-charts-combo.d.ts +987 -0
  85. package/types/tectra-ng-charts-combo.d.ts.map +1 -0
  86. package/types/tectra-ng-charts-core.d.ts +266 -5
  87. package/types/tectra-ng-charts-core.d.ts.map +1 -1
  88. package/types/tectra-ng-charts-funnel.d.ts +857 -0
  89. package/types/tectra-ng-charts-funnel.d.ts.map +1 -0
  90. package/types/tectra-ng-charts-gantt.d.ts +884 -0
  91. package/types/tectra-ng-charts-gantt.d.ts.map +1 -0
  92. package/types/tectra-ng-charts-gauge.d.ts +859 -0
  93. package/types/tectra-ng-charts-gauge.d.ts.map +1 -0
  94. package/types/tectra-ng-charts-heatmap.d.ts +914 -0
  95. package/types/tectra-ng-charts-heatmap.d.ts.map +1 -0
  96. package/types/tectra-ng-charts-line.d.ts +556 -2
  97. package/types/tectra-ng-charts-line.d.ts.map +1 -1
  98. package/types/tectra-ng-charts-org-chart.d.ts +1017 -0
  99. package/types/tectra-ng-charts-org-chart.d.ts.map +1 -0
  100. package/types/tectra-ng-charts-pie.d.ts +477 -14
  101. package/types/tectra-ng-charts-pie.d.ts.map +1 -1
  102. package/types/tectra-ng-charts-radar.d.ts +903 -0
  103. package/types/tectra-ng-charts-radar.d.ts.map +1 -0
  104. package/types/tectra-ng-charts-radial-bar.d.ts +886 -0
  105. package/types/tectra-ng-charts-radial-bar.d.ts.map +1 -0
  106. package/types/tectra-ng-charts-range-area.d.ts +897 -0
  107. package/types/tectra-ng-charts-range-area.d.ts.map +1 -0
  108. package/types/tectra-ng-charts-rank-line.d.ts +839 -0
  109. package/types/tectra-ng-charts-rank-line.d.ts.map +1 -0
  110. package/types/tectra-ng-charts-sankey.d.ts +866 -0
  111. package/types/tectra-ng-charts-sankey.d.ts.map +1 -0
  112. package/types/tectra-ng-charts-scatter.d.ts +987 -0
  113. package/types/tectra-ng-charts-scatter.d.ts.map +1 -0
  114. package/types/tectra-ng-charts-segmented-bar.d.ts +751 -0
  115. package/types/tectra-ng-charts-segmented-bar.d.ts.map +1 -0
  116. package/types/tectra-ng-charts-sunburst.d.ts +864 -0
  117. package/types/tectra-ng-charts-sunburst.d.ts.map +1 -0
  118. package/types/tectra-ng-charts-treemap.d.ts +847 -0
  119. package/types/tectra-ng-charts-treemap.d.ts.map +1 -0
  120. package/types/tectra-ng-charts-waterfall.d.ts +869 -0
  121. package/types/tectra-ng-charts-waterfall.d.ts.map +1 -0
  122. package/waterfall/README.md +60 -0
@@ -1,18 +1,46 @@
1
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";
2
+ import { ChangeDetectionStrategy, Component, ElementRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, inject, input, linkedSignal, model, output, signal, viewChild } from "@angular/core";
3
+ import { TxChartAnnotations, TxChartAxes, TxChartFrame, TxChartLegendTemplate, TxChartTooltipTemplate, areaPath, cartesianLayout, chartAnnotationShapes, chartCategoryIndex, chartMonthNames, chartNumberFormatter, chartSummary, chartTable, cycleIndex, decimateSeries, extent, hasChartData, initialChartSize, injectChartEntrance, linePath, normalizeSeries, prefersReducedMotion, readTokenNumber, seriesColor, stackValues, stepIndex, timeInterval, timeTooltipFormatter, toTime, toggleKey } from "@tectra-ng/charts/core";
4
4
  import { uniqueId } from "@tectra-ng/core/a11y";
5
5
  import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
6
6
  import { TxLocaleService, formatMessage, injectTranslations } from "@tectra-ng/core/i18n";
7
7
  import { optionalBoolean } from "@tectra-ng/core/utils";
8
8
  import { toStyleObject } from "@tectra-ng/themes";
9
9
  const DECIMATE_RATIO = 1.5;
10
+ const OVERVIEW = 44;
11
+ const OVERVIEW_GAP = 18;
12
+ const OVERVIEW_PAD = 4;
13
+ const OVERVIEW_HANDLE = 20;
14
+ const HANDLE_REACH = 7;
15
+ const DRAG_THRESHOLD = 3;
16
+ const CLIP_PAD = 8;
17
+ const MIN_CATEGORY_SPAN = 2;
18
+ const MIN_SPAN_SHARE = .02;
19
+ const KEY_ZOOM = .7;
20
+ const KEY_PAN = .2;
21
+ const SLIDE_SECONDS = .32;
22
+ const SLIDE_EASING = "cubic-bezier(0.22, 1, 0.36, 1)";
10
23
  var TxLineChart = class TxLineChart {
11
24
  locale = inject(TxLocaleService);
12
25
  translations = injectTranslations();
13
26
  series = input([], ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
14
27
  categories = input([], ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
15
28
  xType = input("category", ...ngDevMode ? [{ debugName: "xType" }] : /* istanbul ignore next */ []);
29
+ annotations = input([], ...ngDevMode ? [{ debugName: "annotations" }] : /* istanbul ignore next */ []);
30
+ zoom = input(false, {
31
+ ...ngDevMode ? { debugName: "zoom" } : /* istanbul ignore next */ {},
32
+ transform: booleanAttribute
33
+ });
34
+ brush = input(false, {
35
+ ...ngDevMode ? { debugName: "brush" } : /* istanbul ignore next */ {},
36
+ transform: booleanAttribute
37
+ });
38
+ xRange = model(null, ...ngDevMode ? [{ debugName: "xRange" }] : /* istanbul ignore next */ []);
39
+ maxPoints = input(void 0, ...ngDevMode ? [{ debugName: "maxPoints" }] : /* istanbul ignore next */ []);
40
+ live = input(false, {
41
+ ...ngDevMode ? { debugName: "live" } : /* istanbul ignore next */ {},
42
+ transform: booleanAttribute
43
+ });
16
44
  height = input(450, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
17
45
  curve = input("smooth", ...ngDevMode ? [{ debugName: "curve" }] : /* istanbul ignore next */ []);
18
46
  area = input(true, {
@@ -56,6 +84,10 @@ var TxLineChart = class TxLineChart {
56
84
  ...ngDevMode ? { debugName: "decimation" } : /* istanbul ignore next */ {},
57
85
  transform: booleanAttribute
58
86
  });
87
+ toolbar = input(true, {
88
+ ...ngDevMode ? { debugName: "toolbar" } : /* istanbul ignore next */ {},
89
+ transform: booleanAttribute
90
+ });
59
91
  loading = input(false, {
60
92
  ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
61
93
  transform: booleanAttribute
@@ -73,6 +105,8 @@ var TxLineChart = class TxLineChart {
73
105
  legendTemplate = contentChild(TxChartLegendTemplate, ...ngDevMode ? [{ debugName: "legendTemplate" }] : /* istanbul ignore next */ []);
74
106
  tooltipTemplate = contentChild(TxChartTooltipTemplate, ...ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []);
75
107
  frame = viewChild(TxChartFrame, ...ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []);
108
+ layer = viewChild("layer", ...ngDevMode ? [{ debugName: "layer" }] : /* istanbul ignore next */ []);
109
+ host = inject(ElementRef);
76
110
  isUnstyled = injectUnstyled(this.unstyled);
77
111
  passThrough = injectPassThrough("lineChart", this, this.pt, this.ptOptions);
78
112
  tokenStyle = computed(() => toStyleObject(this.dt(), "--tx-chart"), ...ngDevMode ? [{ debugName: "tokenStyle" }] : /* istanbul ignore next */ []);
@@ -86,14 +120,72 @@ var TxLineChart = class TxLineChart {
86
120
  hidden = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
87
121
  focusedSeries = signal(null, ...ngDevMode ? [{ debugName: "focusedSeries" }] : /* istanbul ignore next */ []);
88
122
  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 */ []);
123
+ size = linkedSignal(() => initialChartSize(this.height(), this.legendShown() ? this.legendPosition() : null, void 0, this.toolbar()), ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
90
124
  intl = computed(() => this.locale.locale().intl, ...ngDevMode ? [{ debugName: "intl" }] : /* istanbul ignore next */ []);
91
125
  list = computed(() => this.series() ?? [], ...ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []);
92
- table = computed(() => {
126
+ fullTable = computed(() => {
93
127
  const categories = this.categories() ?? [];
94
128
  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 */ []);
129
+ const table = normalizeSeries(this.list(), fallback ? chartMonthNames(this.intl(), "long") : categories, this.xType());
130
+ const limit = this.maxPoints();
131
+ if (!limit || limit < 2 || table.xs.length <= limit) return table;
132
+ const from = table.xs.length - limit;
133
+ return {
134
+ labels: table.labels.slice(from),
135
+ xs: this.xType() === "category" ? table.xs.slice(from).map((_, index) => index) : table.xs.slice(from),
136
+ values: table.values.map((row) => row.slice(from))
137
+ };
138
+ }, ...ngDevMode ? [{ debugName: "fullTable" }] : /* istanbul ignore next */ []);
139
+ zoomable = computed(() => this.zoom() || this.brush(), ...ngDevMode ? [{ debugName: "zoomable" }] : /* istanbul ignore next */ []);
140
+ fullDomain = computed(() => {
141
+ const xs = this.fullTable().xs;
142
+ return xs.length ? [xs[0], xs[xs.length - 1] === xs[0] ? xs[0] + 1 : xs[xs.length - 1]] : [0, 1];
143
+ }, ...ngDevMode ? [{ debugName: "fullDomain" }] : /* istanbul ignore next */ []);
144
+ minSpan = computed(() => {
145
+ const [from, to] = this.fullDomain();
146
+ return this.xType() === "category" ? Math.min(to - from, MIN_CATEGORY_SPAN) : (to - from) * MIN_SPAN_SHARE;
147
+ }, ...ngDevMode ? [{ debugName: "minSpan" }] : /* istanbul ignore next */ []);
148
+ view = computed(() => {
149
+ const range = this.xRange();
150
+ if (!range || !this.zoomable()) return null;
151
+ const [low, high] = this.fullDomain();
152
+ const span = Math.max(this.minSpan(), Math.abs(range[1] - range[0]));
153
+ let from = Math.max(low, Math.min(range[0], range[1]));
154
+ let to = Math.min(high, from + span);
155
+ from = Math.max(low, to - span);
156
+ to = Math.min(high, from + span);
157
+ return from <= low && to >= high ? null : [from, to];
158
+ }, ...ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []);
159
+ windowed = computed(() => {
160
+ const full = this.fullTable();
161
+ const view = this.view();
162
+ if (!view) return {
163
+ table: full,
164
+ start: 0
165
+ };
166
+ const xs = full.xs;
167
+ let start;
168
+ let end;
169
+ if (this.xType() === "category") {
170
+ start = Math.max(0, Math.floor(view[0]));
171
+ end = Math.min(xs.length - 1, Math.ceil(view[1]));
172
+ } else {
173
+ const first = xs.findIndex((x) => x >= view[0]);
174
+ const last = xs.length - 1 - [...xs].reverse().findIndex((x) => x <= view[1]);
175
+ start = Math.max(0, (first < 0 ? xs.length - 1 : first) - 1);
176
+ end = Math.min(xs.length - 1, (last >= xs.length ? 0 : last) + 1);
177
+ }
178
+ return {
179
+ start,
180
+ table: {
181
+ labels: full.labels.slice(start, end + 1),
182
+ xs: this.xType() === "category" ? xs.slice(start, end + 1).map((_, index) => index) : xs.slice(start, end + 1),
183
+ values: full.values.map((row) => row.slice(start, end + 1))
184
+ }
185
+ };
186
+ }, ...ngDevMode ? [{ debugName: "windowed" }] : /* istanbul ignore next */ []);
187
+ table = computed(() => this.windowed().table, ...ngDevMode ? [{ debugName: "table" }] : /* istanbul ignore next */ []);
188
+ offset = computed(() => this.windowed().start, ...ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []);
97
189
  keys = computed(() => this.list().map((item, index) => `${index}:${item.name}`), ...ngDevMode ? [{ debugName: "keys" }] : /* istanbul ignore next */ []);
98
190
  visibleIndexes = computed(() => this.keys().flatMap((key, index) => this.hidden().has(key) ? [] : [index]), ...ngDevMode ? [{ debugName: "visibleIndexes" }] : /* istanbul ignore next */ []);
99
191
  isEmpty = computed(() => !this.list().length || !hasChartData(this.table().values), ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
@@ -125,10 +217,12 @@ var TxLineChart = class TxLineChart {
125
217
  return format ? xs.map((x) => format(x)) : labels;
126
218
  }, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
127
219
  layout = computed(() => {
128
- const { width, height } = this.size();
220
+ const { width } = this.size();
221
+ const height = this.size().height - (this.brush() ? 62 : 0);
129
222
  const { xs } = this.table();
130
223
  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];
224
+ const view = this.view();
225
+ const domain = view && this.xType() !== "category" ? view : xs.length ? [xs[0], xs[xs.length - 1] === xs[0] ? xs[0] + 1 : xs[xs.length - 1]] : [0, 1];
132
226
  return cartesianLayout({
133
227
  width,
134
228
  height,
@@ -210,6 +304,60 @@ var TxLineChart = class TxLineChart {
210
304
  };
211
305
  });
212
306
  }, ...ngDevMode ? [{ debugName: "paths" }] : /* istanbul ignore next */ []);
307
+ clip = computed(() => {
308
+ const plot = this.layout().plot;
309
+ return {
310
+ x: plot.left - CLIP_PAD,
311
+ y: plot.top - CLIP_PAD,
312
+ width: plot.width + 16,
313
+ height: plot.height + 16
314
+ };
315
+ }, ...ngDevMode ? [{ debugName: "clip" }] : /* istanbul ignore next */ []);
316
+ clipped = computed(() => this.zoomable() || this.live(), ...ngDevMode ? [{ debugName: "clipped" }] : /* istanbul ignore next */ []);
317
+ overview = computed(() => {
318
+ if (!this.brush() || this.isEmpty()) return null;
319
+ const plot = this.layout().plot;
320
+ const top = this.size().height - OVERVIEW;
321
+ const full = this.fullTable();
322
+ const [low, high] = this.fullDomain();
323
+ const span = high - low || 1;
324
+ const at = (u) => plot.left + (u - low) / span * plot.width;
325
+ const seriesIndex = this.visibleIndexes()[0] ?? 0;
326
+ const values = full.values[seriesIndex] ?? [];
327
+ const range = extent(values) ?? [0, 1];
328
+ const bottom = Math.min(0, range[0]);
329
+ const peak = range[1] === bottom ? bottom + 1 : range[1];
330
+ const points = values.map((value, index) => value === null ? null : {
331
+ x: at(full.xs[index]),
332
+ y: top + OVERVIEW - OVERVIEW_PAD - (value - bottom) / (peak - bottom) * 36
333
+ });
334
+ const base = points.map((point) => point ? {
335
+ x: point.x,
336
+ y: top + OVERVIEW
337
+ } : null);
338
+ const [from, to] = this.view() ?? [low, high];
339
+ return {
340
+ top,
341
+ height: OVERVIEW,
342
+ left: plot.left,
343
+ width: plot.width,
344
+ line: linePath(points, this.curve()),
345
+ area: areaPath(points, base, this.curve()),
346
+ x0: at(from),
347
+ x1: at(to),
348
+ color: seriesColor(this.list()[seriesIndex]?.color, seriesIndex),
349
+ handleY: top + 12,
350
+ handleHeight: OVERVIEW_HANDLE
351
+ };
352
+ }, ...ngDevMode ? [{ debugName: "overview" }] : /* istanbul ignore next */ []);
353
+ annotationShapes = computed(() => {
354
+ const layout = this.layout();
355
+ return chartAnnotationShapes(this.annotations(), {
356
+ plot: layout.plot,
357
+ x: (value) => this.xPosition(value),
358
+ y: (value) => layout.value.map(value)
359
+ });
360
+ }, ...ngDevMode ? [{ debugName: "annotationShapes" }] : /* istanbul ignore next */ []);
213
361
  legendItems = computed(() => {
214
362
  const stat = this.legendVariant() === "stat";
215
363
  const active = this.active();
@@ -278,7 +426,7 @@ var TxLineChart = class TxLineChart {
278
426
  const format = this.formatValue();
279
427
  const rows = this.visibleIndexes().filter((seriesIndex) => this.tooltipMode() === "shared" || seriesIndex === active.series).flatMap((seriesIndex) => {
280
428
  const raw = this.table().values[seriesIndex][active.index];
281
- if (raw === null) return [];
429
+ if (raw === null || raw === void 0) return [];
282
430
  return [{
283
431
  label: this.list()[seriesIndex].name,
284
432
  value: format(raw, seriesIndex, active.index),
@@ -306,21 +454,172 @@ var TxLineChart = class TxLineChart {
306
454
  summary = computed(() => {
307
455
  const t = this.translations();
308
456
  const type = this.area() ? t.chartArea : t.chartLine;
309
- const values = this.table().values.flat().filter((value) => value !== null);
457
+ const values = this.fullTable().values.flat().filter((value) => value !== null);
310
458
  const range = extent(values);
311
459
  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);
460
+ const text = chartSummary(t, this.intl(), type, this.list().length, this.fullTable().xs.length, range ? [format(range[0]), format(range[1])] : null);
313
461
  return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;
314
462
  }, ...ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []);
315
463
  dataTable = computed(() => {
316
464
  const format = this.valueFormatter();
317
- return chartTable(this.labels(), this.list().map((item, index) => ({
465
+ const full = this.fullTable();
466
+ const time = this.timeLabel();
467
+ return chartTable(time ? full.xs.map((x) => time(x)) : full.labels, this.list().map((item, index) => ({
318
468
  name: item.name,
319
- values: this.table().values[index]
469
+ values: full.values[index]
320
470
  })), format);
321
471
  }, ...ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []);
472
+ drag = null;
473
+ suppressClick = false;
474
+ anchor = null;
322
475
  constructor() {
323
476
  afterNextRender(() => setTimeout(() => this.morph.set(true), 120));
477
+ afterRenderEffect(() => this.slide());
478
+ }
479
+ resetZoom() {
480
+ this.active.set(null);
481
+ this.xRange.set(null);
482
+ }
483
+ zoomAt(px, factor) {
484
+ const [low, high] = this.fullDomain();
485
+ const current = this.view() ?? [low, high];
486
+ const plot = this.layout().plot;
487
+ const span = current[1] - current[0];
488
+ const share = Math.max(0, Math.min(1, (px - plot.left) / Math.max(1, plot.width)));
489
+ const at = current[0] + share * span;
490
+ const next = Math.max(this.minSpan(), Math.min(high - low, span * factor));
491
+ this.setRange([at - share * next, at - share * next + next]);
492
+ }
493
+ panBy(dx) {
494
+ const current = this.view();
495
+ if (!current) return;
496
+ const span = current[1] - current[0];
497
+ const du = -dx / Math.max(1, this.layout().plot.width) * span;
498
+ this.setRange([current[0] + du, current[1] + du]);
499
+ }
500
+ setRange(range) {
501
+ const [low, high] = this.fullDomain();
502
+ const span = Math.min(high - low, Math.max(this.minSpan(), range[1] - range[0]));
503
+ const from = Math.max(low, Math.min(high - span, range[0]));
504
+ this.active.set(null);
505
+ this.xRange.set(from <= low && from + span >= high ? null : [from, from + span]);
506
+ }
507
+ fromOverview(px) {
508
+ const overview = this.overview();
509
+ const [low, high] = this.fullDomain();
510
+ return overview ? low + (px - overview.left) / Math.max(1, overview.width) * (high - low) : low;
511
+ }
512
+ handleDrag(event) {
513
+ const overview = this.overview();
514
+ const inOverview = !!overview && event.y >= overview.top - OVERVIEW_GAP / 2;
515
+ if (event.type === "down") {
516
+ const current = this.view() ?? this.fullDomain();
517
+ if (overview && inOverview) {
518
+ const near = HANDLE_REACH;
519
+ let range = [current[0], current[1]];
520
+ let mode = "move";
521
+ if (Math.abs(event.x - overview.x0) <= near) mode = "start";
522
+ else if (Math.abs(event.x - overview.x1) <= near) mode = "end";
523
+ else if (event.x < overview.x0 || event.x > overview.x1) {
524
+ const centre = this.fromOverview(event.x);
525
+ const span = current[1] - current[0];
526
+ this.setRange([centre - span / 2, centre + span / 2]);
527
+ range = this.view() ?? this.fullDomain();
528
+ }
529
+ this.drag = {
530
+ mode,
531
+ x: event.x,
532
+ range,
533
+ moved: false,
534
+ overview: true
535
+ };
536
+ this.active.set(null);
537
+ return true;
538
+ }
539
+ if (this.view()) this.drag = {
540
+ mode: "pan",
541
+ x: event.x,
542
+ range: [current[0], current[1]],
543
+ moved: false,
544
+ overview: false
545
+ };
546
+ return false;
547
+ }
548
+ if (event.type === "move" && this.drag) {
549
+ if (!((event.buttons ?? 0) & 1)) {
550
+ this.drag = null;
551
+ return false;
552
+ }
553
+ const drag = this.drag;
554
+ const dx = event.x - drag.x;
555
+ if (Math.abs(dx) > DRAG_THRESHOLD) drag.moved = true;
556
+ if (!drag.moved) return drag.overview;
557
+ const [from, to] = drag.range;
558
+ if (drag.overview && overview) {
559
+ const [low, high] = this.fullDomain();
560
+ const du = dx / Math.max(1, overview.width) * (high - low);
561
+ if (drag.mode === "start") this.setRange([Math.min(from + du, to - this.minSpan()), to]);
562
+ else if (drag.mode === "end") this.setRange([from, Math.max(to + du, from + this.minSpan())]);
563
+ else this.setRange([from + du, to + du]);
564
+ } else {
565
+ const du = -dx / Math.max(1, this.layout().plot.width) * (to - from);
566
+ this.setRange([from + du, to + du]);
567
+ }
568
+ this.active.set(null);
569
+ return true;
570
+ }
571
+ if (event.type === "up") {
572
+ const drag = this.drag;
573
+ this.drag = null;
574
+ if (drag?.moved) this.suppressClick = true;
575
+ return !!drag?.overview || !!drag?.moved;
576
+ }
577
+ if (event.type === "click" && (this.suppressClick || inOverview)) {
578
+ this.suppressClick = false;
579
+ return true;
580
+ }
581
+ return false;
582
+ }
583
+ slide() {
584
+ const table = this.table();
585
+ const positions = this.xPositions();
586
+ const live = this.live();
587
+ const layer = this.layer()?.nativeElement;
588
+ const last = table.xs.length - 1;
589
+ if (last < 0) {
590
+ this.anchor = null;
591
+ return;
592
+ }
593
+ const identity = (index) => this.xType() === "category" ? table.labels[index] : String(table.xs[index]);
594
+ const anchor = this.anchor;
595
+ this.anchor = {
596
+ id: identity(last),
597
+ px: positions[last]
598
+ };
599
+ if (!live || !anchor || !layer || this.view() || prefersReducedMotion(this.host.nativeElement.ownerDocument)) return;
600
+ let at = -1;
601
+ for (let index = last; index >= 0; index--) if (identity(index) === anchor.id) {
602
+ at = index;
603
+ break;
604
+ }
605
+ if (at < 0 || at === last) return;
606
+ const dx = anchor.px - positions[at];
607
+ if (Math.abs(dx) < .5) return;
608
+ const duration = readTokenNumber(this.host.nativeElement, "--tx-chart-motion-update-duration", SLIDE_SECONDS) * 1e3;
609
+ layer.animate([{ transform: `translateX(${dx}px)` }, { transform: "translateX(0)" }], {
610
+ duration,
611
+ easing: SLIDE_EASING
612
+ });
613
+ }
614
+ xPosition(value) {
615
+ const layout = this.layout();
616
+ const { xs } = this.table();
617
+ if (this.xType() === "category") {
618
+ const index = chartCategoryIndex(value, this.fullTable().labels) - this.offset();
619
+ return index < 0 || index >= xs.length ? null : layout.categoryPosition(index, xs[index]);
620
+ }
621
+ const x = this.xType() === "time" ? toTime(value) : typeof value === "number" ? value : Number(value);
622
+ return x === null || !Number.isFinite(x) ? null : layout.categoryPosition(0, x);
324
623
  }
325
624
  pointValue(seriesIndex, index) {
326
625
  const raw = this.table().values[seriesIndex]?.[index] ?? null;
@@ -329,9 +628,11 @@ var TxLineChart = class TxLineChart {
329
628
  }
330
629
  onPointer(event) {
331
630
  if (event.type === "leave") {
631
+ this.drag = null;
332
632
  this.active.set(null);
333
633
  return;
334
634
  }
635
+ if (this.zoomable() && this.handleDrag(event)) return;
335
636
  const plot = this.layout().plot;
336
637
  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
638
  this.active.set(null);
@@ -348,12 +649,13 @@ var TxLineChart = class TxLineChart {
348
649
  });
349
650
  if (event.type === "click" && series >= 0) this.pointClick.emit({
350
651
  seriesIndex: series,
351
- dataPointIndex: index,
652
+ dataPointIndex: index + this.offset(),
352
653
  value: this.table().values[series][index],
353
654
  category: this.labels()[index] ?? ""
354
655
  });
355
656
  }
356
657
  onNavigate(event) {
658
+ if (this.zoomable() && this.zoomKey(event)) return;
357
659
  const count = this.table().xs.length;
358
660
  const current = this.active();
359
661
  if (event.key === "Escape") {
@@ -381,6 +683,18 @@ var TxLineChart = class TxLineChart {
381
683
  value: value === null ? "—" : this.formatValue()(value, series, index)
382
684
  }));
383
685
  }
686
+ zoomKey(event) {
687
+ const plot = this.layout().plot;
688
+ const active = this.active();
689
+ const focus = active ? this.xPositions()[active.index] ?? plot.left + plot.width / 2 : plot.left + plot.width / 2;
690
+ if (event.key === "+" || event.key === "=") this.zoomAt(focus, KEY_ZOOM);
691
+ else if (event.key === "-" || event.key === "_") this.zoomAt(focus, 1 / KEY_ZOOM);
692
+ else if (event.key === "0") this.resetZoom();
693
+ else if (event.shiftKey && (event.key === "ArrowLeft" || event.key === "ArrowRight") && this.view()) this.panBy((event.key === "ArrowLeft" ? 1 : -1) * plot.width * KEY_PAN);
694
+ else return false;
695
+ this.active.set(null);
696
+ return true;
697
+ }
384
698
  onLegendToggle(key) {
385
699
  const index = this.keys().indexOf(key);
386
700
  this.hidden.update((keys) => toggleKey(keys, key));
@@ -445,6 +759,48 @@ var TxLineChart = class TxLineChart {
445
759
  isRequired: false,
446
760
  transformFunction: null
447
761
  },
762
+ annotations: {
763
+ classPropertyName: "annotations",
764
+ publicName: "annotations",
765
+ isSignal: true,
766
+ isRequired: false,
767
+ transformFunction: null
768
+ },
769
+ zoom: {
770
+ classPropertyName: "zoom",
771
+ publicName: "zoom",
772
+ isSignal: true,
773
+ isRequired: false,
774
+ transformFunction: null
775
+ },
776
+ brush: {
777
+ classPropertyName: "brush",
778
+ publicName: "brush",
779
+ isSignal: true,
780
+ isRequired: false,
781
+ transformFunction: null
782
+ },
783
+ xRange: {
784
+ classPropertyName: "xRange",
785
+ publicName: "xRange",
786
+ isSignal: true,
787
+ isRequired: false,
788
+ transformFunction: null
789
+ },
790
+ maxPoints: {
791
+ classPropertyName: "maxPoints",
792
+ publicName: "maxPoints",
793
+ isSignal: true,
794
+ isRequired: false,
795
+ transformFunction: null
796
+ },
797
+ live: {
798
+ classPropertyName: "live",
799
+ publicName: "live",
800
+ isSignal: true,
801
+ isRequired: false,
802
+ transformFunction: null
803
+ },
448
804
  height: {
449
805
  classPropertyName: "height",
450
806
  publicName: "height",
@@ -620,6 +976,13 @@ var TxLineChart = class TxLineChart {
620
976
  isRequired: false,
621
977
  transformFunction: null
622
978
  },
979
+ toolbar: {
980
+ classPropertyName: "toolbar",
981
+ publicName: "toolbar",
982
+ isSignal: true,
983
+ isRequired: false,
984
+ transformFunction: null
985
+ },
623
986
  loading: {
624
987
  classPropertyName: "loading",
625
988
  publicName: "loading",
@@ -664,6 +1027,7 @@ var TxLineChart = class TxLineChart {
664
1027
  }
665
1028
  },
666
1029
  outputs: {
1030
+ xRange: "xRangeChange",
667
1031
  seriesToggle: "seriesToggle",
668
1032
  pointClick: "pointClick"
669
1033
  },
@@ -677,7 +1041,8 @@ var TxLineChart = class TxLineChart {
677
1041
  "class.tx-line-chart--fill": "typeof height() === \"string\"",
678
1042
  "class.tx-line-chart--entering": "entrance.active()",
679
1043
  "class.tx-line-chart--morph": "morph()",
680
- "class.tx-line-chart--focused": "focusedSeries() !== null"
1044
+ "class.tx-line-chart--focused": "focusedSeries() !== null",
1045
+ "class.tx-line-chart--live": "live()"
681
1046
  },
682
1047
  classAttribute: "tx-line-chart"
683
1048
  },
@@ -700,56 +1065,83 @@ var TxLineChart = class TxLineChart {
700
1065
  predicate: TxChartFrame,
701
1066
  descendants: true,
702
1067
  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
1068
  }, {
744
- kind: "component",
745
- type: TxChartAxes,
746
- selector: "g[tx-chart-axes]",
747
- inputs: [
748
- "tx-chart-axes",
749
- "gridPart",
750
- "axisPart"
751
- ]
1069
+ propertyName: "layer",
1070
+ first: true,
1071
+ predicate: ["layer"],
1072
+ descendants: true,
1073
+ isSignal: true
752
1074
  }],
1075
+ ngImport: i0,
1076
+ 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 [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\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 [zoomable]=\"zoomable()\"\n [zoomedIn]=\"!!view()\"\n (zoomed)=\"zoomAt($event.x, $event.factor)\"\n (panned)=\"panBy($event.dx)\"\n (zoomReset)=\"resetZoom()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (legendToggled)=\"onLegendToggle($event)\"\n (legendHovered)=\"onLegendHover($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n @if (clipped()) {\n <svg:clipPath [attr.id]=\"uid + '-clip'\">\n <svg:rect [attr.x]=\"clip().x\" [attr.y]=\"clip().y\" [attr.width]=\"clip().width\" [attr.height]=\"clip().height\" />\n </svg:clipPath>\n }\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n <svg:g [tx-chart-annotations]=\"annotationShapes()\" layer=\"back\" [part]=\"passThrough().annotation\" />\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 <svg:g #layer class=\"tx-line-chart__layer\" [attr.clip-path]=\"clipped() ? 'url(#' + uid + '-clip)' : null\">\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 </svg:g>\n <svg:g [tx-chart-annotations]=\"annotationShapes()\" layer=\"front\" [part]=\"passThrough().annotation\" />\n @if (overview(); as strip) {\n <svg:g class=\"tx-line-chart__overview\" [class]=\"passThrough().brush?.class\" [style]=\"passThrough().brush?.style\" [style.--tx-line-chart-color]=\"strip.color\">\n <svg:rect class=\"tx-line-chart__overview-track\" [attr.x]=\"strip.left\" [attr.y]=\"strip.top\" [attr.width]=\"strip.width\" [attr.height]=\"strip.height\" />\n <svg:path class=\"tx-line-chart__overview-area\" [attr.d]=\"strip.area\" />\n <svg:path class=\"tx-line-chart__overview-line\" [attr.d]=\"strip.line\" />\n <svg:rect class=\"tx-line-chart__overview-mask\" [attr.x]=\"strip.left\" [attr.y]=\"strip.top\" [attr.width]=\"strip.x0 - strip.left\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-mask\" [attr.x]=\"strip.x1\" [attr.y]=\"strip.top\" [attr.width]=\"strip.left + strip.width - strip.x1\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-window\" [attr.x]=\"strip.x0\" [attr.y]=\"strip.top\" [attr.width]=\"strip.x1 - strip.x0\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-handle\" [attr.x]=\"strip.x0 - 3\" [attr.y]=\"strip.handleY\" width=\"6\" [attr.height]=\"strip.handleHeight\" />\n <svg:rect class=\"tx-line-chart__overview-handle\" [attr.x]=\"strip.x1 - 3\" [attr.y]=\"strip.handleY\" width=\"6\" [attr.height]=\"strip.handleHeight\" />\n </svg:g>\n }\n</tx-chart-frame>\n",
1077
+ 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__overview{cursor:pointer}.tx-line-chart__overview-track{fill:transparent}.tx-line-chart__overview-area{fill:var(--tx-line-chart-color);fill-opacity:.2}.tx-line-chart__overview-line{fill:none;stroke:var(--tx-line-chart-color)}.tx-line-chart__overview-mask{fill:currentColor;fill-opacity:.08}.tx-line-chart__overview-window{fill:none;stroke:currentColor;cursor:grab}.tx-line-chart__overview-handle{fill:currentColor;cursor:ew-resize}.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)}}:host([data-styled]) .tx-line-chart__overview-track{fill:var(--tx-chart-brush-track-background);rx:var(--tx-chart-brush-radius)}:host([data-styled]) .tx-line-chart__overview-area{fill-opacity:var(--tx-chart-brush-area-opacity)}:host([data-styled]) .tx-line-chart__overview-line{stroke-width:var(--tx-chart-brush-line-width)}:host([data-styled]) .tx-line-chart__overview-mask{fill:var(--tx-chart-brush-mask-color);fill-opacity:1}:host([data-styled]) .tx-line-chart__overview-window{stroke:var(--tx-chart-brush-window-border-color);stroke-width:var(--tx-chart-brush-window-border-width);rx:var(--tx-chart-brush-radius)}:host([data-styled]) .tx-line-chart__overview-handle{fill:var(--tx-chart-brush-handle-color);stroke:var(--tx-chart-brush-handle-border-color);rx:var(--tx-chart-brush-handle-radius)}:host([data-styled].tx-line-chart--live) .tx-line-chart__line,:host([data-styled].tx-line-chart--live) .tx-line-chart__area,:host([data-styled].tx-line-chart--live) .tx-line-chart__point{transition:none}@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"],
1078
+ dependencies: [
1079
+ {
1080
+ kind: "component",
1081
+ type: TxChartFrame,
1082
+ selector: "tx-chart-frame",
1083
+ inputs: [
1084
+ "height",
1085
+ "size",
1086
+ "legendItems",
1087
+ "showLegend",
1088
+ "legendPosition",
1089
+ "legendAlign",
1090
+ "legendVariant",
1091
+ "legendToggle",
1092
+ "legendTemplate",
1093
+ "empty",
1094
+ "loading",
1095
+ "emptyIcon",
1096
+ "summary",
1097
+ "table",
1098
+ "tooltip",
1099
+ "tooltipTemplate",
1100
+ "tooltipPlacement",
1101
+ "panelStyle",
1102
+ "parts",
1103
+ "styled",
1104
+ "interactive",
1105
+ "actionKeys",
1106
+ "zoomable",
1107
+ "zoomedIn",
1108
+ "plotHeight",
1109
+ "toolbar",
1110
+ "exportName"
1111
+ ],
1112
+ outputs: [
1113
+ "sizeChange",
1114
+ "pointer",
1115
+ "navigate",
1116
+ "legendToggled",
1117
+ "legendHovered",
1118
+ "tooltipClosed",
1119
+ "zoomed",
1120
+ "panned",
1121
+ "zoomReset"
1122
+ ]
1123
+ },
1124
+ {
1125
+ kind: "component",
1126
+ type: TxChartAxes,
1127
+ selector: "g[tx-chart-axes]",
1128
+ inputs: [
1129
+ "tx-chart-axes",
1130
+ "gridPart",
1131
+ "axisPart"
1132
+ ]
1133
+ },
1134
+ {
1135
+ kind: "component",
1136
+ type: TxChartAnnotations,
1137
+ selector: "g[tx-chart-annotations]",
1138
+ inputs: [
1139
+ "tx-chart-annotations",
1140
+ "part",
1141
+ "layer"
1142
+ ]
1143
+ }
1144
+ ],
753
1145
  changeDetection: i0.ChangeDetectionStrategy.OnPush
754
1146
  });
755
1147
  };
@@ -762,7 +1154,11 @@ i0.ɵɵngDeclareClassMetadata({
762
1154
  type: Component,
763
1155
  args: [{
764
1156
  selector: "tx-line-chart",
765
- imports: [TxChartFrame, TxChartAxes],
1157
+ imports: [
1158
+ TxChartFrame,
1159
+ TxChartAxes,
1160
+ TxChartAnnotations
1161
+ ],
766
1162
  changeDetection: ChangeDetectionStrategy.OnPush,
767
1163
  host: {
768
1164
  class: "tx-line-chart",
@@ -774,10 +1170,11 @@ i0.ɵɵngDeclareClassMetadata({
774
1170
  "[class.tx-line-chart--fill]": "typeof height() === \"string\"",
775
1171
  "[class.tx-line-chart--entering]": "entrance.active()",
776
1172
  "[class.tx-line-chart--morph]": "morph()",
777
- "[class.tx-line-chart--focused]": "focusedSeries() !== null"
1173
+ "[class.tx-line-chart--focused]": "focusedSeries() !== null",
1174
+ "[class.tx-line-chart--live]": "live()"
778
1175
  },
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"]
1176
+ 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 [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\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 [zoomable]=\"zoomable()\"\n [zoomedIn]=\"!!view()\"\n (zoomed)=\"zoomAt($event.x, $event.factor)\"\n (panned)=\"panBy($event.dx)\"\n (zoomReset)=\"resetZoom()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (legendToggled)=\"onLegendToggle($event)\"\n (legendHovered)=\"onLegendHover($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n @if (clipped()) {\n <svg:clipPath [attr.id]=\"uid + '-clip'\">\n <svg:rect [attr.x]=\"clip().x\" [attr.y]=\"clip().y\" [attr.width]=\"clip().width\" [attr.height]=\"clip().height\" />\n </svg:clipPath>\n }\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n <svg:g [tx-chart-annotations]=\"annotationShapes()\" layer=\"back\" [part]=\"passThrough().annotation\" />\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 <svg:g #layer class=\"tx-line-chart__layer\" [attr.clip-path]=\"clipped() ? 'url(#' + uid + '-clip)' : null\">\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 </svg:g>\n <svg:g [tx-chart-annotations]=\"annotationShapes()\" layer=\"front\" [part]=\"passThrough().annotation\" />\n @if (overview(); as strip) {\n <svg:g class=\"tx-line-chart__overview\" [class]=\"passThrough().brush?.class\" [style]=\"passThrough().brush?.style\" [style.--tx-line-chart-color]=\"strip.color\">\n <svg:rect class=\"tx-line-chart__overview-track\" [attr.x]=\"strip.left\" [attr.y]=\"strip.top\" [attr.width]=\"strip.width\" [attr.height]=\"strip.height\" />\n <svg:path class=\"tx-line-chart__overview-area\" [attr.d]=\"strip.area\" />\n <svg:path class=\"tx-line-chart__overview-line\" [attr.d]=\"strip.line\" />\n <svg:rect class=\"tx-line-chart__overview-mask\" [attr.x]=\"strip.left\" [attr.y]=\"strip.top\" [attr.width]=\"strip.x0 - strip.left\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-mask\" [attr.x]=\"strip.x1\" [attr.y]=\"strip.top\" [attr.width]=\"strip.left + strip.width - strip.x1\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-window\" [attr.x]=\"strip.x0\" [attr.y]=\"strip.top\" [attr.width]=\"strip.x1 - strip.x0\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-handle\" [attr.x]=\"strip.x0 - 3\" [attr.y]=\"strip.handleY\" width=\"6\" [attr.height]=\"strip.handleHeight\" />\n <svg:rect class=\"tx-line-chart__overview-handle\" [attr.x]=\"strip.x1 - 3\" [attr.y]=\"strip.handleY\" width=\"6\" [attr.height]=\"strip.handleHeight\" />\n </svg:g>\n }\n</tx-chart-frame>\n",
1177
+ 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__overview{cursor:pointer}.tx-line-chart__overview-track{fill:transparent}.tx-line-chart__overview-area{fill:var(--tx-line-chart-color);fill-opacity:.2}.tx-line-chart__overview-line{fill:none;stroke:var(--tx-line-chart-color)}.tx-line-chart__overview-mask{fill:currentColor;fill-opacity:.08}.tx-line-chart__overview-window{fill:none;stroke:currentColor;cursor:grab}.tx-line-chart__overview-handle{fill:currentColor;cursor:ew-resize}.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)}}:host([data-styled]) .tx-line-chart__overview-track{fill:var(--tx-chart-brush-track-background);rx:var(--tx-chart-brush-radius)}:host([data-styled]) .tx-line-chart__overview-area{fill-opacity:var(--tx-chart-brush-area-opacity)}:host([data-styled]) .tx-line-chart__overview-line{stroke-width:var(--tx-chart-brush-line-width)}:host([data-styled]) .tx-line-chart__overview-mask{fill:var(--tx-chart-brush-mask-color);fill-opacity:1}:host([data-styled]) .tx-line-chart__overview-window{stroke:var(--tx-chart-brush-window-border-color);stroke-width:var(--tx-chart-brush-window-border-width);rx:var(--tx-chart-brush-radius)}:host([data-styled]) .tx-line-chart__overview-handle{fill:var(--tx-chart-brush-handle-color);stroke:var(--tx-chart-brush-handle-border-color);rx:var(--tx-chart-brush-handle-radius)}:host([data-styled].tx-line-chart--live) .tx-line-chart__line,:host([data-styled].tx-line-chart--live) .tx-line-chart__area,:host([data-styled].tx-line-chart--live) .tx-line-chart__point{transition:none}@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
1178
  }]
782
1179
  }],
783
1180
  ctorParameters: () => [],
@@ -806,6 +1203,57 @@ i0.ɵɵngDeclareClassMetadata({
806
1203
  required: false
807
1204
  }]
808
1205
  }],
1206
+ annotations: [{
1207
+ type: i0.Input,
1208
+ args: [{
1209
+ isSignal: true,
1210
+ alias: "annotations",
1211
+ required: false
1212
+ }]
1213
+ }],
1214
+ zoom: [{
1215
+ type: i0.Input,
1216
+ args: [{
1217
+ isSignal: true,
1218
+ alias: "zoom",
1219
+ required: false
1220
+ }]
1221
+ }],
1222
+ brush: [{
1223
+ type: i0.Input,
1224
+ args: [{
1225
+ isSignal: true,
1226
+ alias: "brush",
1227
+ required: false
1228
+ }]
1229
+ }],
1230
+ xRange: [{
1231
+ type: i0.Input,
1232
+ args: [{
1233
+ isSignal: true,
1234
+ alias: "xRange",
1235
+ required: false
1236
+ }]
1237
+ }, {
1238
+ type: i0.Output,
1239
+ args: ["xRangeChange"]
1240
+ }],
1241
+ maxPoints: [{
1242
+ type: i0.Input,
1243
+ args: [{
1244
+ isSignal: true,
1245
+ alias: "maxPoints",
1246
+ required: false
1247
+ }]
1248
+ }],
1249
+ live: [{
1250
+ type: i0.Input,
1251
+ args: [{
1252
+ isSignal: true,
1253
+ alias: "live",
1254
+ required: false
1255
+ }]
1256
+ }],
809
1257
  height: [{
810
1258
  type: i0.Input,
811
1259
  args: [{
@@ -1006,6 +1454,14 @@ i0.ɵɵngDeclareClassMetadata({
1006
1454
  required: false
1007
1455
  }]
1008
1456
  }],
1457
+ toolbar: [{
1458
+ type: i0.Input,
1459
+ args: [{
1460
+ isSignal: true,
1461
+ alias: "toolbar",
1462
+ required: false
1463
+ }]
1464
+ }],
1009
1465
  loading: [{
1010
1466
  type: i0.Input,
1011
1467
  args: [{
@@ -1073,6 +1529,10 @@ i0.ɵɵngDeclareClassMetadata({
1073
1529
  frame: [{
1074
1530
  type: i0.ViewChild,
1075
1531
  args: [i0.forwardRef(() => TxChartFrame), { isSignal: true }]
1532
+ }],
1533
+ layer: [{
1534
+ type: i0.ViewChild,
1535
+ args: ["layer", { isSignal: true }]
1076
1536
  }]
1077
1537
  }
1078
1538
  });