@tectra-ng/charts 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bar-list/README.md +1 -1
- package/boxplot/README.md +1 -1
- package/bullet/README.md +1 -1
- package/candlestick/README.md +1 -1
- package/column/README.md +3 -3
- package/combo/README.md +1 -1
- package/core/README.md +8 -6
- package/fesm2022/tectra-ng-charts-bar-list.mjs +3 -3
- package/fesm2022/tectra-ng-charts-boxplot.mjs +3 -3
- package/fesm2022/tectra-ng-charts-bullet.mjs +3 -3
- package/fesm2022/tectra-ng-charts-candlestick.mjs +26 -10
- package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-column.mjs +4 -4
- package/fesm2022/tectra-ng-charts-column.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-combo.mjs +3 -3
- package/fesm2022/tectra-ng-charts-core.mjs +107 -44
- package/fesm2022/tectra-ng-charts-core.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-funnel.mjs +37 -13
- package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-gantt.mjs +490 -30
- package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-gauge.mjs +82 -37
- package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-heatmap.mjs +15 -15
- package/fesm2022/tectra-ng-charts-line.mjs +3 -3
- package/fesm2022/tectra-ng-charts-org-chart.mjs +57 -29
- package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-pie.mjs +50 -20
- package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-radar.mjs +3 -3
- package/fesm2022/tectra-ng-charts-radial-bar.mjs +8 -7
- package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-range-area.mjs +116 -61
- package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-rank-line.mjs +82 -34
- package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-sankey.mjs +102 -21
- package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-scatter.mjs +3 -3
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs +56 -10
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-sunburst.mjs +34 -6
- package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-treemap.mjs +6 -6
- package/fesm2022/tectra-ng-charts-waterfall.mjs +60 -23
- package/fesm2022/tectra-ng-charts-waterfall.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts.mjs +1 -1
- package/funnel/README.md +2 -2
- package/gantt/README.md +12 -8
- package/gauge/README.md +3 -3
- package/line/README.md +1 -1
- package/org-chart/README.md +1 -0
- package/package.json +5 -5
- package/pie/README.md +5 -4
- package/radar/README.md +1 -1
- package/radial-bar/README.md +2 -2
- package/range-area/README.md +2 -1
- package/rank-line/README.md +3 -2
- package/sankey/README.md +1 -1
- package/segmented-bar/README.md +2 -1
- package/treemap/README.md +1 -1
- package/types/tectra-ng-charts-bar-list.d.ts +1 -1
- package/types/tectra-ng-charts-boxplot.d.ts +1 -1
- package/types/tectra-ng-charts-bullet.d.ts +1 -1
- package/types/tectra-ng-charts-candlestick.d.ts +7 -3
- package/types/tectra-ng-charts-candlestick.d.ts.map +1 -1
- package/types/tectra-ng-charts-column.d.ts +3 -3
- package/types/tectra-ng-charts-combo.d.ts +1 -1
- package/types/tectra-ng-charts-core.d.ts +45 -10
- package/types/tectra-ng-charts-core.d.ts.map +1 -1
- package/types/tectra-ng-charts-funnel.d.ts +9 -2
- package/types/tectra-ng-charts-funnel.d.ts.map +1 -1
- package/types/tectra-ng-charts-gantt.d.ts +166 -10
- package/types/tectra-ng-charts-gantt.d.ts.map +1 -1
- package/types/tectra-ng-charts-gauge.d.ts +21 -6
- package/types/tectra-ng-charts-gauge.d.ts.map +1 -1
- package/types/tectra-ng-charts-line.d.ts +1 -1
- package/types/tectra-ng-charts-org-chart.d.ts +13 -2
- package/types/tectra-ng-charts-org-chart.d.ts.map +1 -1
- package/types/tectra-ng-charts-pie.d.ts +13 -4
- package/types/tectra-ng-charts-pie.d.ts.map +1 -1
- package/types/tectra-ng-charts-radar.d.ts +1 -1
- package/types/tectra-ng-charts-radial-bar.d.ts +3 -2
- package/types/tectra-ng-charts-radial-bar.d.ts.map +1 -1
- package/types/tectra-ng-charts-range-area.d.ts +12 -3
- package/types/tectra-ng-charts-range-area.d.ts.map +1 -1
- package/types/tectra-ng-charts-rank-line.d.ts +28 -10
- package/types/tectra-ng-charts-rank-line.d.ts.map +1 -1
- package/types/tectra-ng-charts-sankey.d.ts +36 -9
- package/types/tectra-ng-charts-sankey.d.ts.map +1 -1
- package/types/tectra-ng-charts-segmented-bar.d.ts +11 -2
- package/types/tectra-ng-charts-segmented-bar.d.ts.map +1 -1
- package/types/tectra-ng-charts-sunburst.d.ts +10 -0
- package/types/tectra-ng-charts-sunburst.d.ts.map +1 -1
- package/types/tectra-ng-charts-treemap.d.ts +1 -1
- package/types/tectra-ng-charts-waterfall.d.ts +25 -6
- package/types/tectra-ng-charts-waterfall.d.ts.map +1 -1
- package/types/tectra-ng-charts.d.ts +1 -1
- package/waterfall/README.md +5 -5
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { ChangeDetectionStrategy, Component, ElementRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, inject, input, linkedSignal, output, signal, viewChild } from "@angular/core";
|
|
3
|
-
import { TxChartAxes, TxChartFrame, TxChartHoverBand, TxChartTooltipTemplate, cartesianLayout, chartBandRect, chartNumberFormatter, chartSummary, initialChartSize, injectChartEntrance, readTokenNumber, stepIndex } from "@tectra-ng/charts/core";
|
|
3
|
+
import { TxChartAxes, TxChartFrame, TxChartHoverBand, TxChartTooltipTemplate, cartesianLayout, chartBandRect, chartNumberFormatter, chartSummary, compactValueFormatter, initialChartSize, injectChartEntrance, readTokenNumber, stepIndex, textWidth } from "@tectra-ng/charts/core";
|
|
4
4
|
import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
|
|
5
5
|
import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
|
|
6
6
|
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
7
7
|
import { chartTokens, toStyleObject } from "@tectra-ng/themes";
|
|
8
8
|
import { provideTxIconDefaults, txIconChartBar } from "@tectra-ng/icons";
|
|
9
|
+
function finite(value) {
|
|
10
|
+
return value !== null && value !== void 0 && Number.isFinite(value);
|
|
11
|
+
}
|
|
9
12
|
function waterfallSteps(items) {
|
|
10
13
|
let running = 0;
|
|
11
14
|
return items.map((item, index) => {
|
|
12
|
-
if (item.total)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
if (item.total) {
|
|
16
|
+
running = finite(item.value) ? item.value : running;
|
|
17
|
+
return {
|
|
18
|
+
index,
|
|
19
|
+
label: item.label,
|
|
20
|
+
kind: "total",
|
|
21
|
+
change: running,
|
|
22
|
+
from: 0,
|
|
23
|
+
to: running,
|
|
24
|
+
color: item.color ?? null
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const change = finite(item.value) ? item.value : 0;
|
|
22
28
|
const from = running;
|
|
23
29
|
running += change;
|
|
24
30
|
return {
|
|
@@ -41,10 +47,27 @@ function waterfallExtent(steps) {
|
|
|
41
47
|
}
|
|
42
48
|
return [min, max];
|
|
43
49
|
}
|
|
50
|
+
function visibleLabels(boxes, gap = 4) {
|
|
51
|
+
const order = boxes.map((_, index) => index).sort((a, b) => Number(boxes[b].total) - Number(boxes[a].total) || a - b);
|
|
52
|
+
const kept = [];
|
|
53
|
+
const visible = boxes.map(() => false);
|
|
54
|
+
for (const index of order) {
|
|
55
|
+
const box = boxes[index];
|
|
56
|
+
if (!kept.some((other) => Math.abs(other.x - box.x) < (other.width + box.width) / 2 + gap && box.top < other.bottom && other.top < box.bottom)) {
|
|
57
|
+
kept.push(box);
|
|
58
|
+
visible[index] = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return visible;
|
|
62
|
+
}
|
|
44
63
|
const WATERFALL_ICON_DEFAULTS = { "chart-bar": txIconChartBar };
|
|
45
64
|
const WATERFALL_THEME = { chart: chartTokens };
|
|
46
65
|
const DEFAULT_WIDTH = .56;
|
|
47
66
|
const LABEL_GAP = 4;
|
|
67
|
+
const LABEL_FONT_SIZE = 11;
|
|
68
|
+
function signedFormat(format) {
|
|
69
|
+
return (value) => value > 0 ? `+${format(value)}` : value < 0 ? `−${format(-value)}` : format(value);
|
|
70
|
+
}
|
|
48
71
|
var TxWaterfallChart = class TxWaterfallChart {
|
|
49
72
|
waterfallTheme = injectTokens(WATERFALL_THEME);
|
|
50
73
|
locale = inject(TxLocaleService);
|
|
@@ -116,10 +139,9 @@ var TxWaterfallChart = class TxWaterfallChart {
|
|
|
116
139
|
legendShown = computed(() => this.showLegend() && this.kinds().size > 1, ...ngDevMode ? [{ debugName: "legendShown" }] : /* istanbul ignore next */ []);
|
|
117
140
|
size = linkedSignal(() => initialChartSize(this.height(), this.legendShown() ? this.legendPosition() : null, void 0, this.toolbar()), ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
118
141
|
valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()), ...ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []);
|
|
119
|
-
signed = computed(() => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}, ...ngDevMode ? [{ debugName: "signed" }] : /* istanbul ignore next */ []);
|
|
142
|
+
signed = computed(() => signedFormat(this.valueFormatter()), ...ngDevMode ? [{ debugName: "signed" }] : /* istanbul ignore next */ []);
|
|
143
|
+
shortFormatter = computed(() => compactValueFormatter(this.intl(), this.valueFormat()), ...ngDevMode ? [{ debugName: "shortFormatter" }] : /* istanbul ignore next */ []);
|
|
144
|
+
shortSigned = computed(() => signedFormat(this.shortFormatter()), ...ngDevMode ? [{ debugName: "shortSigned" }] : /* istanbul ignore next */ []);
|
|
123
145
|
layout = computed(() => {
|
|
124
146
|
const { width, height } = this.size();
|
|
125
147
|
const labels = this.steps().map((step) => step.label);
|
|
@@ -151,7 +173,7 @@ var TxWaterfallChart = class TxWaterfallChart {
|
|
|
151
173
|
const band = layout.category;
|
|
152
174
|
const width = band.bandwidth * Math.min(1, Math.max(.05, this.barWidth()));
|
|
153
175
|
const scale = layout.value;
|
|
154
|
-
|
|
176
|
+
const bars = this.steps().map((step) => {
|
|
155
177
|
const a = scale.map(step.from);
|
|
156
178
|
const b = scale.map(step.to);
|
|
157
179
|
const y = Math.min(a, b);
|
|
@@ -164,11 +186,22 @@ var TxWaterfallChart = class TxWaterfallChart {
|
|
|
164
186
|
y,
|
|
165
187
|
width,
|
|
166
188
|
height,
|
|
167
|
-
text: this.dataLabels() ? step.kind === "total" ?
|
|
189
|
+
text: this.dataLabels() ? this.labelText(step.kind === "total", step.kind === "total" ? step.to : step.change, band.step) : null,
|
|
168
190
|
textY: above ? y - LABEL_GAP : y + height + LABEL_GAP,
|
|
169
191
|
above
|
|
170
192
|
};
|
|
171
193
|
});
|
|
194
|
+
const visible = visibleLabels(bars.map((bar) => ({
|
|
195
|
+
x: bar.x + bar.width / 2,
|
|
196
|
+
width: textWidth(bar.text ?? "", LABEL_FONT_SIZE),
|
|
197
|
+
top: bar.above ? bar.textY - LABEL_FONT_SIZE : bar.textY,
|
|
198
|
+
bottom: bar.above ? bar.textY : bar.textY + LABEL_FONT_SIZE,
|
|
199
|
+
total: bar.kind === "total"
|
|
200
|
+
})));
|
|
201
|
+
return bars.map((bar, index) => visible[index] ? bar : {
|
|
202
|
+
...bar,
|
|
203
|
+
text: null
|
|
204
|
+
});
|
|
172
205
|
}, ...ngDevMode ? [{ debugName: "bars" }] : /* istanbul ignore next */ []);
|
|
173
206
|
hoverBand = computed(() => {
|
|
174
207
|
const index = this.active();
|
|
@@ -306,9 +339,13 @@ var TxWaterfallChart = class TxWaterfallChart {
|
|
|
306
339
|
const t = this.translations();
|
|
307
340
|
this.frame()?.announce(step.kind === "total" ? `${step.label}: ${t.chartTotal} ${this.valueFormatter()(step.to)}` : `${step.label}: ${this.signed()(step.change)}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(step.to)}`);
|
|
308
341
|
}
|
|
342
|
+
labelText(total, value, room) {
|
|
343
|
+
const full = total ? this.valueFormatter()(value) : this.signed()(value);
|
|
344
|
+
return textWidth(full, LABEL_FONT_SIZE) <= room - LABEL_GAP ? full : total ? this.shortFormatter()(value) : this.shortSigned()(value);
|
|
345
|
+
}
|
|
309
346
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
310
347
|
minVersion: "12.0.0",
|
|
311
|
-
version: "22.2.
|
|
348
|
+
version: "22.2.6",
|
|
312
349
|
ngImport: i0,
|
|
313
350
|
type: TxWaterfallChart,
|
|
314
351
|
deps: [],
|
|
@@ -316,7 +353,7 @@ var TxWaterfallChart = class TxWaterfallChart {
|
|
|
316
353
|
});
|
|
317
354
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
318
355
|
minVersion: "17.0.0",
|
|
319
|
-
version: "22.2.
|
|
356
|
+
version: "22.2.6",
|
|
320
357
|
type: TxWaterfallChart,
|
|
321
358
|
isStandalone: true,
|
|
322
359
|
selector: "tx-waterfall-chart",
|
|
@@ -511,7 +548,7 @@ var TxWaterfallChart = class TxWaterfallChart {
|
|
|
511
548
|
isSignal: true
|
|
512
549
|
}],
|
|
513
550
|
ngImport: i0,
|
|
514
|
-
template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\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 (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n <svg:text\n
|
|
551
|
+
template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\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 (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n @if (bar.text) {\n <svg:text\n class=\"tx-waterfall-chart__label\"\n [class]=\"passThrough().dataLabel?.class\"\n [style]=\"passThrough().dataLabel?.style\"\n [attr.data-kind]=\"bar.kind\"\n text-anchor=\"middle\"\n [attr.dominant-baseline]=\"bar.above ? 'auto' : 'hanging'\"\n [attr.x]=\"bar.x + bar.width / 2\"\n [attr.y]=\"bar.textY\"\n >\n {{ bar.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n</tx-chart-frame>\n",
|
|
515
552
|
styles: [":host{display:block;min-width:0}:host(.tx-waterfall-chart--fill){height:100%}.tx-waterfall-chart__bar{fill:var(--tx-waterfall-chart-own, currentColor);transform-box:fill-box}.tx-waterfall-chart__bar[data-dir=up]{transform-origin:50% 100%}.tx-waterfall-chart__bar[data-dir=down]{transform-origin:50% 0}.tx-waterfall-chart__connector{stroke:currentColor;stroke-opacity:.4}.tx-waterfall-chart__connectors,.tx-waterfall-chart__labels{pointer-events:none}:host([data-styled]) .tx-waterfall-chart__bar{clip-path:inset(0 round var(--tx-chart-bar-radius));transition:fill var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-waterfall-chart__bar[data-kind=up]{fill:var(--tx-waterfall-chart-own, var(--tx-chart-waterfall-up-color))}:host([data-styled]) .tx-waterfall-chart__bar[data-kind=down]{fill:var(--tx-waterfall-chart-own, var(--tx-chart-waterfall-down-color))}:host([data-styled]) .tx-waterfall-chart__bar[data-kind=total]{fill:var(--tx-waterfall-chart-own, var(--tx-chart-waterfall-total-color))}:host([data-styled]) .tx-waterfall-chart__connector{stroke:var(--tx-chart-waterfall-connector-color);stroke-opacity:1;stroke-width:var(--tx-chart-waterfall-connector-width);stroke-dasharray:var(--tx-chart-waterfall-connector-dash)}:host([data-styled]) .tx-waterfall-chart__label{fill:var(--tx-chart-bar-outside-label-color);font-size:var(--tx-chart-bar-label-font-size);font-weight:var(--tx-chart-bar-label-font-weight);font-variant-numeric:tabular-nums}:host([data-styled].tx-waterfall-chart--active) .tx-waterfall-chart__bar:not(.tx-waterfall-chart__bar--active){opacity:var(--tx-chart-waterfall-dimmed-opacity)}:host([data-styled].tx-waterfall-chart--active) .tx-waterfall-chart__bar{transition:fill var(--tx-chart-motion-hover-duration) ease,opacity var(--tx-chart-motion-hover-duration) ease}:host([data-styled].tx-waterfall-chart--morph) .tx-waterfall-chart__bar{transition:fill var(--tx-chart-motion-hover-duration) ease,opacity var(--tx-chart-motion-hover-duration) ease,x var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),y var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),width var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),height var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-waterfall-chart--entering) .tx-waterfall-chart__bar{animation:tx-waterfall-chart-grow var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both;animation-delay:calc(var(--tx-waterfall-chart-order, 0) * var(--tx-chart-motion-stagger) * 2)}:host([data-styled].tx-waterfall-chart--entering) .tx-waterfall-chart__connectors,:host([data-styled].tx-waterfall-chart--entering) .tx-waterfall-chart__labels{animation:tx-waterfall-chart-fade var(--tx-chart-motion-enter-duration) ease both}@keyframes tx-waterfall-chart-grow{0%{transform:scaleY(0)}to{transform:scaleY(1)}}@keyframes tx-waterfall-chart-fade{0%,60%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-waterfall-chart__bar,:host([data-styled]) .tx-waterfall-chart__connectors,:host([data-styled]) .tx-waterfall-chart__labels{transition:none;animation:none}}\n"],
|
|
516
553
|
dependencies: [
|
|
517
554
|
{
|
|
@@ -582,7 +619,7 @@ var TxWaterfallChart = class TxWaterfallChart {
|
|
|
582
619
|
};
|
|
583
620
|
i0.ɵɵngDeclareClassMetadata({
|
|
584
621
|
minVersion: "12.0.0",
|
|
585
|
-
version: "22.2.
|
|
622
|
+
version: "22.2.6",
|
|
586
623
|
ngImport: i0,
|
|
587
624
|
type: TxWaterfallChart,
|
|
588
625
|
decorators: [{
|
|
@@ -606,7 +643,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
606
643
|
"[class.tx-waterfall-chart--active]": "active() !== null"
|
|
607
644
|
},
|
|
608
645
|
viewProviders: [provideTxIconDefaults(WATERFALL_ICON_DEFAULTS)],
|
|
609
|
-
template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\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 (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n <svg:text\n
|
|
646
|
+
template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\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 (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n @if (bar.text) {\n <svg:text\n class=\"tx-waterfall-chart__label\"\n [class]=\"passThrough().dataLabel?.class\"\n [style]=\"passThrough().dataLabel?.style\"\n [attr.data-kind]=\"bar.kind\"\n text-anchor=\"middle\"\n [attr.dominant-baseline]=\"bar.above ? 'auto' : 'hanging'\"\n [attr.x]=\"bar.x + bar.width / 2\"\n [attr.y]=\"bar.textY\"\n >\n {{ bar.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n</tx-chart-frame>\n",
|
|
610
647
|
styles: [":host{display:block;min-width:0}:host(.tx-waterfall-chart--fill){height:100%}.tx-waterfall-chart__bar{fill:var(--tx-waterfall-chart-own, currentColor);transform-box:fill-box}.tx-waterfall-chart__bar[data-dir=up]{transform-origin:50% 100%}.tx-waterfall-chart__bar[data-dir=down]{transform-origin:50% 0}.tx-waterfall-chart__connector{stroke:currentColor;stroke-opacity:.4}.tx-waterfall-chart__connectors,.tx-waterfall-chart__labels{pointer-events:none}:host([data-styled]) .tx-waterfall-chart__bar{clip-path:inset(0 round var(--tx-chart-bar-radius));transition:fill var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-waterfall-chart__bar[data-kind=up]{fill:var(--tx-waterfall-chart-own, var(--tx-chart-waterfall-up-color))}:host([data-styled]) .tx-waterfall-chart__bar[data-kind=down]{fill:var(--tx-waterfall-chart-own, var(--tx-chart-waterfall-down-color))}:host([data-styled]) .tx-waterfall-chart__bar[data-kind=total]{fill:var(--tx-waterfall-chart-own, var(--tx-chart-waterfall-total-color))}:host([data-styled]) .tx-waterfall-chart__connector{stroke:var(--tx-chart-waterfall-connector-color);stroke-opacity:1;stroke-width:var(--tx-chart-waterfall-connector-width);stroke-dasharray:var(--tx-chart-waterfall-connector-dash)}:host([data-styled]) .tx-waterfall-chart__label{fill:var(--tx-chart-bar-outside-label-color);font-size:var(--tx-chart-bar-label-font-size);font-weight:var(--tx-chart-bar-label-font-weight);font-variant-numeric:tabular-nums}:host([data-styled].tx-waterfall-chart--active) .tx-waterfall-chart__bar:not(.tx-waterfall-chart__bar--active){opacity:var(--tx-chart-waterfall-dimmed-opacity)}:host([data-styled].tx-waterfall-chart--active) .tx-waterfall-chart__bar{transition:fill var(--tx-chart-motion-hover-duration) ease,opacity var(--tx-chart-motion-hover-duration) ease}:host([data-styled].tx-waterfall-chart--morph) .tx-waterfall-chart__bar{transition:fill var(--tx-chart-motion-hover-duration) ease,opacity var(--tx-chart-motion-hover-duration) ease,x var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),y var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),width var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),height var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-waterfall-chart--entering) .tx-waterfall-chart__bar{animation:tx-waterfall-chart-grow var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both;animation-delay:calc(var(--tx-waterfall-chart-order, 0) * var(--tx-chart-motion-stagger) * 2)}:host([data-styled].tx-waterfall-chart--entering) .tx-waterfall-chart__connectors,:host([data-styled].tx-waterfall-chart--entering) .tx-waterfall-chart__labels{animation:tx-waterfall-chart-fade var(--tx-chart-motion-enter-duration) ease both}@keyframes tx-waterfall-chart-grow{0%{transform:scaleY(0)}to{transform:scaleY(1)}}@keyframes tx-waterfall-chart-fade{0%,60%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-waterfall-chart__bar,:host([data-styled]) .tx-waterfall-chart__connectors,:host([data-styled]) .tx-waterfall-chart__labels{transition:none;animation:none}}\n"]
|
|
611
648
|
}]
|
|
612
649
|
}],
|
|
@@ -810,6 +847,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
810
847
|
}]
|
|
811
848
|
}
|
|
812
849
|
});
|
|
813
|
-
export { TxWaterfallChart, waterfallExtent, waterfallSteps };
|
|
850
|
+
export { TxWaterfallChart, visibleLabels, waterfallExtent, waterfallSteps };
|
|
814
851
|
|
|
815
852
|
//# sourceMappingURL=tectra-ng-charts-waterfall.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-charts-waterfall.mjs","names":[],"sources":["../../../../packages/charts/waterfall/src/waterfall-layout.ts","../../../../packages/charts/waterfall/src/waterfall.icons.ts","../../../../packages/charts/waterfall/src/waterfall.theme.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.html"],"sourcesContent":["import { TxWaterfallItem, TxWaterfallStep } from './waterfall-chart.types';\n\n/**\n * Turns items into steps with a running total; a total item shows the sum so far and missing values count as zero.\n */\nexport function waterfallSteps(items: readonly TxWaterfallItem[]): TxWaterfallStep[] {\n let running = 0;\n return items.map((item, index) => {\n if (item.total) {\n return { index, label: item.label, kind: 'total', change: running, from: 0, to: running, color: item.color ?? null };\n }\n const change = item.value !== null && item.value !== undefined && Number.isFinite(item.value) ? item.value : 0;\n const from = running;\n running += change;\n return { index, label: item.label, kind: change < 0 ? 'down' : 'up', change, from, to: running, color: item.color ?? null };\n });\n}\n\n/** Smallest and largest running total, always including 0. */\nexport function waterfallExtent(steps: readonly TxWaterfallStep[]): [number, number] {\n let min = 0;\n let max = 0;\n for (const step of steps) {\n min = Math.min(min, step.from, step.to);\n max = Math.max(max, step.from, step.to);\n }\n return [min, max];\n}\n","import { TxIconSet, txIconChartBar } from '@tectra-ng/icons';\n\nexport const WATERFALL_ICON_DEFAULTS: TxIconSet = {\n 'chart-bar': txIconChartBar,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const WATERFALL_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxBandScale,\n TxChartAxes,\n TxChartFrame,\n TxChartHoverBand,\n TxChartGridMode,\n TxChartHeight,\n TxChartLabelMode,\n TxChartLegendAlign,\n TxChartLegendItem,\n TxChartLegendPosition,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n cartesianLayout,\n chartBandRect,\n chartNumberFormatter,\n chartSummary,\n initialChartSize,\n injectChartEntrance,\n readTokenNumber,\n stepIndex,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { waterfallExtent, waterfallSteps } from './waterfall-layout';\nimport { TxWaterfallBarEvent, TxWaterfallChartBar, TxWaterfallChartPart, TxWaterfallConnector, TxWaterfallItem, TxWaterfallKind } from './waterfall-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { WATERFALL_ICON_DEFAULTS } from './waterfall.icons';\nimport { WATERFALL_THEME } from './waterfall.theme';\n\nconst DEFAULT_WIDTH = 0.56;\nconst LABEL_GAP = 4;\n\n@Component({\n selector: 'tx-waterfall-chart',\n imports: [TxChartFrame, TxChartAxes, TxChartHoverBand],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-waterfall-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-waterfall-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-waterfall-chart--entering]': 'entrance.active()',\n '[class.tx-waterfall-chart--morph]': 'morph()',\n '[class.tx-waterfall-chart--active]': 'active() !== null',\n },\n viewProviders: [provideTxIconDefaults(WATERFALL_ICON_DEFAULTS)],\n})\nexport class TxWaterfallChart {\n private readonly waterfallTheme = injectTokens(WATERFALL_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxWaterfallItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(350);\n readonly dataLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly connectors = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly legendPosition = input<TxChartLegendPosition>('top');\n readonly legendAlign = input<TxChartLegendAlign>('start');\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly yMin = input<number | undefined>(undefined);\n readonly yMax = input<number | undefined>(undefined);\n readonly xAxisTitle = input('');\n readonly yAxisTitle = input('');\n readonly grid = input<TxChartGridMode>('value');\n readonly labelMode = input<TxChartLabelMode>('auto');\n readonly maxLabelWidth = input(220);\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxWaterfallChartPart, TxWaterfallChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly barClick = output<TxWaterfallBarEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('waterfallChart', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n readonly morph = signal(false);\n readonly active = signal<number | null>(null);\n readonly barWidth = signal(DEFAULT_WIDTH);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.items() ?? []);\n readonly steps = computed(() => waterfallSteps(this.list()));\n readonly isEmpty = computed(() => !this.list().length);\n readonly kinds = computed(() => new Set(this.steps().map((step) => step.kind)));\n readonly legendShown = computed(() => this.showLegend() && this.kinds().size > 1);\n readonly size = linkedSignal(() => initialChartSize(this.height(), this.legendShown() ? this.legendPosition() : null, undefined, this.toolbar()));\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly signed = computed(() => {\n const format = this.valueFormatter();\n return (value: number) => (value > 0 ? `+${format(value)}` : value < 0 ? `−${format(-value)}` : format(value));\n });\n\n readonly layout = computed(() => {\n const { width, height } = this.size();\n const labels = this.steps().map((step) => step.label);\n return cartesianLayout({\n width,\n height,\n intl: this.intl(),\n category: {\n kind: 'band',\n labels,\n count: labels.length,\n labelMode: this.labelMode(),\n maxLabelWidth: this.maxLabelWidth(),\n title: this.xAxisTitle() || undefined,\n },\n value: {\n extent: waterfallExtent(this.steps()),\n format: this.valueFormat(),\n includeZero: true,\n min: this.yMin(),\n max: this.yMax(),\n title: this.yAxisTitle() || undefined,\n },\n grid: this.grid(),\n });\n });\n\n readonly bars = computed<TxWaterfallChartBar[]>(() => {\n const layout = this.layout();\n const band = layout.category as TxBandScale;\n const width = band.bandwidth * Math.min(1, Math.max(0.05, this.barWidth()));\n const scale = layout.value;\n return this.steps().map((step) => {\n const a = scale.map(step.from);\n const b = scale.map(step.to);\n const y = Math.min(a, b);\n const height = Math.max(1, Math.abs(b - a));\n const above = step.kind === 'total' ? step.to >= 0 : step.change >= 0;\n return {\n ...step,\n key: `${step.index}:${step.label}`,\n x: band.center(step.index) - width / 2,\n y,\n width,\n height,\n text: this.dataLabels() ? (step.kind === 'total' ? this.valueFormatter()(step.to) : this.signed()(step.change)) : null,\n textY: above ? y - LABEL_GAP : y + height + LABEL_GAP,\n above,\n };\n });\n });\n\n readonly hoverBand = computed(() => {\n const index = this.active();\n return index === null ? null : chartBandRect(this.layout().category as TxBandScale, index, this.layout().plot);\n });\n\n readonly connectorLines = computed<TxWaterfallConnector[]>(() => {\n if (!this.connectors()) return [];\n const bars = this.bars();\n const scale = this.layout().value;\n return bars.slice(0, -1).map((bar, index) => {\n const next = bars[index + 1];\n return { key: `${bar.key}>${next.key}`, x1: bar.x + bar.width, x2: next.x, y: scale.map(bar.to) };\n });\n });\n\n readonly legendItems = computed<TxChartLegendItem[]>(() => {\n const t = this.translations();\n const names: Record<TxWaterfallKind, string> = { up: t.chartIncrease, down: t.chartDecrease, total: t.chartTotal };\n return (['up', 'down', 'total'] as const)\n .filter((kind) => this.kinds().has(kind))\n .map((kind) => ({ key: kind, label: names[kind], color: `var(--tx-chart-waterfall-${kind}-color)` }));\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.active();\n if (index === null || !this.showTooltip()) return null;\n const bar = this.bars()[index];\n if (!bar) return null;\n const t = this.translations();\n const color = bar.color ?? `var(--tx-chart-waterfall-${bar.kind}-color)`;\n const rows =\n bar.kind === 'total'\n ? [{ label: t.chartTotal, value: this.valueFormatter()(bar.to), color, raw: bar.to, seriesIndex: 0, active: true }]\n : [\n { label: t.chartChange, value: this.signed()(bar.change), color, raw: bar.change, seriesIndex: 0, active: true },\n { label: t.chartTotal, value: this.valueFormatter()(bar.to), color: 'transparent', raw: bar.to, seriesIndex: 1 },\n ];\n return { title: bar.label, rows, index, x: bar.x + bar.width / 2, y: bar.above ? bar.y : bar.y + bar.height, placement: bar.above ? 'top' : 'bottom' };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const steps = this.steps();\n const last = steps[steps.length - 1];\n const text = chartSummary(t, this.intl(), t.chartWaterfall, 1, steps.length, null);\n const withTotal = last ? `${text}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(last.to)}` : text;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${withTotal}` : withTotal;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'change', label: t.chartChange },\n { key: 'total', label: t.chartTotal },\n ],\n rows: this.steps().map((step) => ({\n label: step.label,\n cells: [step.kind === 'total' ? '—' : this.signed()(step.change), this.valueFormatter()(step.to)],\n })),\n };\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n const next = readTokenNumber(this.host.nativeElement, '--tx-chart-bar-width', DEFAULT_WIDTH);\n if (next !== this.barWidth()) this.barWidth.set(next);\n });\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const plot = this.layout().plot;\n const band = this.layout().category as TxBandScale;\n const inside = event.x >= plot.left && event.x <= plot.left + plot.width && event.y >= plot.top - 8 && event.y <= plot.top + plot.height + 8;\n const index = inside ? band.indexAt(event.x) : -1;\n this.active.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const step = this.steps()[index];\n this.barClick.emit({ index, label: step.label, change: step.change, total: step.to, kind: step.kind });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.active.set(null);\n return;\n }\n const index = stepIndex(event.key, this.active() ?? -1, this.steps().length);\n if (index < 0) return;\n this.active.set(index);\n const step = this.steps()[index];\n const t = this.translations();\n this.frame()?.announce(\n step.kind === 'total'\n ? `${step.label}: ${t.chartTotal} ${this.valueFormatter()(step.to)}`\n : `${step.label}: ${this.signed()(step.change)}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(step.to)}`,\n );\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\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 (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n <svg:text\n class=\"tx-waterfall-chart__label\"\n [class]=\"passThrough().dataLabel?.class\"\n [style]=\"passThrough().dataLabel?.style\"\n [attr.data-kind]=\"bar.kind\"\n text-anchor=\"middle\"\n [attr.dominant-baseline]=\"bar.above ? 'auto' : 'hanging'\"\n [attr.x]=\"bar.x + bar.width / 2\"\n [attr.y]=\"bar.textY\"\n >\n {{ bar.text }}\n </svg:text>\n }\n </svg:g>\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAKA,SAAgB,eAAe,OAAiC;CAC9D,IAAI,UAAU;CACd,OAAO,MAAM,KAAK,MAAM,UAAS;EAC/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A,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,sBAAsB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC3B,YAAY,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-charts-waterfall.mjs","names":[],"sources":["../../../../packages/charts/waterfall/src/waterfall-layout.ts","../../../../packages/charts/waterfall/src/waterfall.icons.ts","../../../../packages/charts/waterfall/src/waterfall.theme.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.html"],"sourcesContent":["import { TxWaterfallItem, TxWaterfallStep } from './waterfall-chart.types';\n\nfunction finite(value: number | null | undefined): value is number {\n return value !== null && value !== undefined && Number.isFinite(value);\n}\n\n/**\n * Turns items into steps with a running total; a total item shows the sum so far, or its own value\n * (an opening balance, a measured subtotal) that the next steps start from. Missing values count as zero.\n */\nexport function waterfallSteps(items: readonly TxWaterfallItem[]): TxWaterfallStep[] {\n let running = 0;\n return items.map((item, index) => {\n if (item.total) {\n running = finite(item.value) ? item.value : running;\n return { index, label: item.label, kind: 'total', change: running, from: 0, to: running, color: item.color ?? null };\n }\n const change = finite(item.value) ? item.value : 0;\n const from = running;\n running += change;\n return { index, label: item.label, kind: change < 0 ? 'down' : 'up', change, from, to: running, color: item.color ?? null };\n });\n}\n\n/** Smallest and largest running total, always including 0. */\nexport function waterfallExtent(steps: readonly TxWaterfallStep[]): [number, number] {\n let min = 0;\n let max = 0;\n for (const step of steps) {\n min = Math.min(min, step.from, step.to);\n max = Math.max(max, step.from, step.to);\n }\n return [min, max];\n}\n\n/** Box of a data label: horizontal centre, width, top and bottom in px. */\nexport interface TxWaterfallLabelBox {\n /** Horizontal centre, in px. */\n x: number;\n /** Width, in px. */\n width: number;\n /** Top edge, in px. */\n top: number;\n /** Bottom edge, in px. */\n bottom: number;\n /** Totals are placed first, so they win a collision. */\n total: boolean;\n}\n\n/** Which data labels to draw: totals first, then left to right, leaving out any label that overlaps a kept one. */\nexport function visibleLabels(boxes: readonly TxWaterfallLabelBox[], gap = 4): boolean[] {\n const order = boxes.map((_, index) => index).sort((a, b) => Number(boxes[b].total) - Number(boxes[a].total) || a - b);\n const kept: TxWaterfallLabelBox[] = [];\n const visible = boxes.map(() => false);\n for (const index of order) {\n const box = boxes[index];\n const hits = kept.some(\n (other) => Math.abs(other.x - box.x) < (other.width + box.width) / 2 + gap && box.top < other.bottom && other.top < box.bottom,\n );\n if (!hits) {\n kept.push(box);\n visible[index] = true;\n }\n }\n return visible;\n}\n","import { TxIconSet, txIconChartBar } from '@tectra-ng/icons';\n\nexport const WATERFALL_ICON_DEFAULTS: TxIconSet = {\n 'chart-bar': txIconChartBar,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const WATERFALL_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxBandScale,\n TxChartAxes,\n TxChartFrame,\n TxChartHoverBand,\n TxChartGridMode,\n TxChartHeight,\n TxChartLabelMode,\n TxChartLegendAlign,\n TxChartLegendItem,\n TxChartLegendPosition,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n cartesianLayout,\n chartBandRect,\n chartNumberFormatter,\n chartSummary,\n compactValueFormatter,\n initialChartSize,\n injectChartEntrance,\n readTokenNumber,\n stepIndex,\n textWidth,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { visibleLabels, waterfallExtent, waterfallSteps } from './waterfall-layout';\nimport { TxWaterfallBarEvent, TxWaterfallChartBar, TxWaterfallChartPart, TxWaterfallConnector, TxWaterfallItem, TxWaterfallKind } from './waterfall-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { WATERFALL_ICON_DEFAULTS } from './waterfall.icons';\nimport { WATERFALL_THEME } from './waterfall.theme';\n\nconst DEFAULT_WIDTH = 0.56;\nconst LABEL_GAP = 4;\nconst LABEL_FONT_SIZE = 11;\n\nfunction signedFormat(format: (value: number) => string): (value: number) => string {\n return (value) => (value > 0 ? `+${format(value)}` : value < 0 ? `−${format(-value)}` : format(value));\n}\n\n@Component({\n selector: 'tx-waterfall-chart',\n imports: [TxChartFrame, TxChartAxes, TxChartHoverBand],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-waterfall-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-waterfall-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-waterfall-chart--entering]': 'entrance.active()',\n '[class.tx-waterfall-chart--morph]': 'morph()',\n '[class.tx-waterfall-chart--active]': 'active() !== null',\n },\n viewProviders: [provideTxIconDefaults(WATERFALL_ICON_DEFAULTS)],\n})\nexport class TxWaterfallChart {\n private readonly waterfallTheme = injectTokens(WATERFALL_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxWaterfallItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(350);\n readonly dataLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly connectors = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly legendPosition = input<TxChartLegendPosition>('top');\n readonly legendAlign = input<TxChartLegendAlign>('start');\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly yMin = input<number | undefined>(undefined);\n readonly yMax = input<number | undefined>(undefined);\n readonly xAxisTitle = input('');\n readonly yAxisTitle = input('');\n readonly grid = input<TxChartGridMode>('value');\n readonly labelMode = input<TxChartLabelMode>('auto');\n readonly maxLabelWidth = input(220);\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxWaterfallChartPart, TxWaterfallChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly barClick = output<TxWaterfallBarEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('waterfallChart', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n readonly morph = signal(false);\n readonly active = signal<number | null>(null);\n readonly barWidth = signal(DEFAULT_WIDTH);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.items() ?? []);\n readonly steps = computed(() => waterfallSteps(this.list()));\n readonly isEmpty = computed(() => !this.list().length);\n readonly kinds = computed(() => new Set(this.steps().map((step) => step.kind)));\n readonly legendShown = computed(() => this.showLegend() && this.kinds().size > 1);\n readonly size = linkedSignal(() => initialChartSize(this.height(), this.legendShown() ? this.legendPosition() : null, undefined, this.toolbar()));\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly signed = computed(() => signedFormat(this.valueFormatter()));\n private readonly shortFormatter = computed(() => compactValueFormatter(this.intl(), this.valueFormat()));\n private readonly shortSigned = computed(() => signedFormat(this.shortFormatter()));\n\n readonly layout = computed(() => {\n const { width, height } = this.size();\n const labels = this.steps().map((step) => step.label);\n return cartesianLayout({\n width,\n height,\n intl: this.intl(),\n category: {\n kind: 'band',\n labels,\n count: labels.length,\n labelMode: this.labelMode(),\n maxLabelWidth: this.maxLabelWidth(),\n title: this.xAxisTitle() || undefined,\n },\n value: {\n extent: waterfallExtent(this.steps()),\n format: this.valueFormat(),\n includeZero: true,\n min: this.yMin(),\n max: this.yMax(),\n title: this.yAxisTitle() || undefined,\n },\n grid: this.grid(),\n });\n });\n\n readonly bars = computed<TxWaterfallChartBar[]>(() => {\n const layout = this.layout();\n const band = layout.category as TxBandScale;\n const width = band.bandwidth * Math.min(1, Math.max(0.05, this.barWidth()));\n const scale = layout.value;\n const bars = this.steps().map((step) => {\n const a = scale.map(step.from);\n const b = scale.map(step.to);\n const y = Math.min(a, b);\n const height = Math.max(1, Math.abs(b - a));\n const above = step.kind === 'total' ? step.to >= 0 : step.change >= 0;\n return {\n ...step,\n key: `${step.index}:${step.label}`,\n x: band.center(step.index) - width / 2,\n y,\n width,\n height,\n text: this.dataLabels() ? this.labelText(step.kind === 'total', step.kind === 'total' ? step.to : step.change, band.step) : null,\n textY: above ? y - LABEL_GAP : y + height + LABEL_GAP,\n above,\n };\n });\n const visible = visibleLabels(\n bars.map((bar) => ({\n x: bar.x + bar.width / 2,\n width: textWidth(bar.text ?? '', LABEL_FONT_SIZE),\n top: bar.above ? bar.textY - LABEL_FONT_SIZE : bar.textY,\n bottom: bar.above ? bar.textY : bar.textY + LABEL_FONT_SIZE,\n total: bar.kind === 'total',\n })),\n );\n return bars.map((bar, index) => (visible[index] ? bar : { ...bar, text: null }));\n });\n\n readonly hoverBand = computed(() => {\n const index = this.active();\n return index === null ? null : chartBandRect(this.layout().category as TxBandScale, index, this.layout().plot);\n });\n\n readonly connectorLines = computed<TxWaterfallConnector[]>(() => {\n if (!this.connectors()) return [];\n const bars = this.bars();\n const scale = this.layout().value;\n return bars.slice(0, -1).map((bar, index) => {\n const next = bars[index + 1];\n return { key: `${bar.key}>${next.key}`, x1: bar.x + bar.width, x2: next.x, y: scale.map(bar.to) };\n });\n });\n\n readonly legendItems = computed<TxChartLegendItem[]>(() => {\n const t = this.translations();\n const names: Record<TxWaterfallKind, string> = { up: t.chartIncrease, down: t.chartDecrease, total: t.chartTotal };\n return (['up', 'down', 'total'] as const)\n .filter((kind) => this.kinds().has(kind))\n .map((kind) => ({ key: kind, label: names[kind], color: `var(--tx-chart-waterfall-${kind}-color)` }));\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.active();\n if (index === null || !this.showTooltip()) return null;\n const bar = this.bars()[index];\n if (!bar) return null;\n const t = this.translations();\n const color = bar.color ?? `var(--tx-chart-waterfall-${bar.kind}-color)`;\n const rows =\n bar.kind === 'total'\n ? [{ label: t.chartTotal, value: this.valueFormatter()(bar.to), color, raw: bar.to, seriesIndex: 0, active: true }]\n : [\n { label: t.chartChange, value: this.signed()(bar.change), color, raw: bar.change, seriesIndex: 0, active: true },\n { label: t.chartTotal, value: this.valueFormatter()(bar.to), color: 'transparent', raw: bar.to, seriesIndex: 1 },\n ];\n return { title: bar.label, rows, index, x: bar.x + bar.width / 2, y: bar.above ? bar.y : bar.y + bar.height, placement: bar.above ? 'top' : 'bottom' };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const steps = this.steps();\n const last = steps[steps.length - 1];\n const text = chartSummary(t, this.intl(), t.chartWaterfall, 1, steps.length, null);\n const withTotal = last ? `${text}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(last.to)}` : text;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${withTotal}` : withTotal;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'change', label: t.chartChange },\n { key: 'total', label: t.chartTotal },\n ],\n rows: this.steps().map((step) => ({\n label: step.label,\n cells: [step.kind === 'total' ? '—' : this.signed()(step.change), this.valueFormatter()(step.to)],\n })),\n };\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n const next = readTokenNumber(this.host.nativeElement, '--tx-chart-bar-width', DEFAULT_WIDTH);\n if (next !== this.barWidth()) this.barWidth.set(next);\n });\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const plot = this.layout().plot;\n const band = this.layout().category as TxBandScale;\n const inside = event.x >= plot.left && event.x <= plot.left + plot.width && event.y >= plot.top - 8 && event.y <= plot.top + plot.height + 8;\n const index = inside ? band.indexAt(event.x) : -1;\n this.active.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const step = this.steps()[index];\n this.barClick.emit({ index, label: step.label, change: step.change, total: step.to, kind: step.kind });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.active.set(null);\n return;\n }\n const index = stepIndex(event.key, this.active() ?? -1, this.steps().length);\n if (index < 0) return;\n this.active.set(index);\n const step = this.steps()[index];\n const t = this.translations();\n this.frame()?.announce(\n step.kind === 'total'\n ? `${step.label}: ${t.chartTotal} ${this.valueFormatter()(step.to)}`\n : `${step.label}: ${this.signed()(step.change)}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(step.to)}`,\n );\n }\n\n private labelText(total: boolean, value: number, room: number): string {\n const full = total ? this.valueFormatter()(value) : this.signed()(value);\n return textWidth(full, LABEL_FONT_SIZE) <= room - LABEL_GAP ? full : total ? this.shortFormatter()(value) : this.shortSigned()(value);\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\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 (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n @if (bar.text) {\n <svg:text\n class=\"tx-waterfall-chart__label\"\n [class]=\"passThrough().dataLabel?.class\"\n [style]=\"passThrough().dataLabel?.style\"\n [attr.data-kind]=\"bar.kind\"\n text-anchor=\"middle\"\n [attr.dominant-baseline]=\"bar.above ? 'auto' : 'hanging'\"\n [attr.x]=\"bar.x + bar.width / 2\"\n [attr.y]=\"bar.textY\"\n >\n {{ bar.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAEA,SAAS,OAAO,OAAgC;CAC9C,OAAO,UAAU,QAAQ,UAAU,UAAa,OAAO,SAAS,KAAK;AACvE;AAMA,SAAgB,eAAe,OAAiC;CAC9D,IAAI,UAAU;CACd,OAAO,MAAM,KAAK,MAAM,UAAS;EAC/B,IAAI,KAAK,OAAO;GACd,UAAU,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ;GAC5C,OAAO;IAAE;IAAO,OAAO,KAAK;IAAO,MAAM;IAAS,QAAQ;IAAS,MAAM;IAAG,IAAI;IAAS,OAAO,KAAK,SAAS;GAAI;EACpH;EACA,MAAM,SAAS,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ;EACjD,MAAM,OAAO;EACb,WAAW;EACX,OAAO;GAAE;GAAO,OAAO,KAAK;GAAO,MAAM,SAAS,IAAI,SAAS;GAAM;GAAQ;GAAM,IAAI;GAAS,OAAO,KAAK,SAAS;EAAI;CAC3H,CAAC;AACH;AAGA,SAAgB,gBAAgB,OAAiC;CAC/D,IAAI,MAAM;CACV,IAAI,MAAM;CACV,KAAK,MAAM,QAAQ,OA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AA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
package/funnel/README.md
CHANGED
|
@@ -16,12 +16,12 @@ import { TxFunnelChart } from '@tectra-ng/charts/funnel';
|
|
|
16
16
|
| items | `{ label, value, color? }[]` — the steps from the top. An empty list shows "No data" |
|
|
17
17
|
| height | Height in px (320), or a CSS size such as `'100%'` of a parent with a definite height |
|
|
18
18
|
| colorful | Gives every step its own palette colour; by default the funnel is one colour |
|
|
19
|
-
| showLabels | Writes the step names in a column on the left (on by default) |
|
|
19
|
+
| showLabels | Writes the step names in a column on the left (on by default), as wide as the longest name up to 40% of the chart (`chart.funnel.labelWidth`); a longer name wraps onto two lines between words, then is cut with the full name in a hint |
|
|
20
20
|
| showValues | Writes the values on the bars, or beside a bar that is too narrow (on by default) |
|
|
21
21
|
| showConversion | Writes the conversion from the step before between the bars (on by default) |
|
|
22
22
|
| connectors | Draws the soft shapes that join the bars (on by default) |
|
|
23
23
|
| showTooltip | Shows the value, the share of the first step and the conversion on hover and keyboard focus |
|
|
24
|
-
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent` or a function |
|
|
24
|
+
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
25
25
|
| toolbar | Shows the chart menu: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
26
26
|
| loading | Shows a skeleton of the same size |
|
|
27
27
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
package/gantt/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gantt Chart
|
|
2
2
|
|
|
3
|
-
`<tx-gantt-chart>` — tasks as bars on a calendar: groups that fold, progress, milestones, a line for today, a scale from days to quarters with horizontal scrolling and zoom. The `timeline` layout puts all tasks of a group on one lane — bookings, shifts, releases. Built in HTML on the design tokens, rendered on the server.
|
|
3
|
+
`<tx-gantt-chart>` — tasks as bars on a calendar: groups that fold, progress, milestones, dependency arrows, a line for today, a scale from days to quarters with horizontal scrolling and zoom. The `timeline` layout puts all tasks of a group on one lane — bookings, shifts, releases. Built in HTML on the design tokens, rendered on the server.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { TxGanttChart } from '@tectra-ng/charts/gantt';
|
|
@@ -13,21 +13,23 @@ import { TxGanttChart } from '@tectra-ng/charts/gantt';
|
|
|
13
13
|
## Inputs
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
|
-
| tasks | `{ id, label, start, end?, group?, progress?, milestone?, color? }[]`; dates are `Date`, timestamps or ISO strings. A date-only `end` (`'2026-03-06'`) includes that day; without `end` a task lasts one day. `milestone: true` draws a diamond at `start`. An empty list shows "No data" |
|
|
17
|
-
| layout | `tasks` (default) — a row per task under its group, groups fold; `timeline` — a lane per group with all its tasks |
|
|
16
|
+
| tasks | `{ id, label, start, end?, group?, progress?, milestone?, color?, dependsOn? }[]`; dates are `Date`, timestamps or ISO strings. A date-only `end` (`'2026-03-06'`) includes that day; without `end` a task lasts one day. `milestone: true` draws a diamond at `start`. `dependsOn` lists the tasks it waits for: ids (finish-to-start) or `{ id, type }` with `finish-to-start`, `start-to-start`, `finish-to-finish` or `start-to-finish`; unknown ids, self links and links that close a cycle are left out. An empty list shows "No data" |
|
|
17
|
+
| layout | `tasks` (default) — a row per task under its group, groups fold; `timeline` — a lane per group with all its tasks; overlapping tasks of a lane get their own sub-rows |
|
|
18
18
|
| zoom | Two-way: `day`, `week` (default), `month` or `quarter` |
|
|
19
19
|
| start | First date of the scale; the earliest task minus `padding` by default |
|
|
20
|
-
| end | Last date of the scale; the latest task plus `padding` by default |
|
|
20
|
+
| end | Last date of the scale; the latest task plus `padding` by default. The scale always runs to the end of a whole header cell and, when the range is short, on to the edge of the chart |
|
|
21
21
|
| padding | Days of air before the first and after the last task (3) |
|
|
22
22
|
| today | Date of the today line; the current moment by default, `null` hides it. On first render the chart scrolls so that today is in view |
|
|
23
|
-
| barLabels | Task names: `auto` (beside the bar for `tasks`, inside for `timeline`), `outside`, `inside` or `none
|
|
23
|
+
| barLabels | Task names: `auto` (beside the bar for `tasks`, inside for `timeline`), `outside`, `inside` or `none`; a name whose bar starts left of the view sticks to its left edge |
|
|
24
|
+
| showDependencies | Draws the `dependsOn` arrows between the bars (on by default) |
|
|
25
|
+
| dependencyHighlight | Hovering or focusing a task lights up its dependency chain — everything it waits for and everything that waits for it — and dims the rest (on by default) |
|
|
24
26
|
| toolbar | Shows the zoom buttons and the "Today" button (on by default) |
|
|
25
27
|
| maxHeight | Height after which the rows scroll under the sticky header (the `chart.gantt.maxHeight` token by default) |
|
|
26
28
|
| labelHeader | Text of the corner over the names; "Task" or "Timeline" by default |
|
|
27
29
|
| loading | Shows skeleton rows |
|
|
28
30
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
|
29
|
-
| dt | Design tokens of this chart (`chart`) — row and header height, label column, bars, progress, milestones, weekends, today line, folding |
|
|
30
|
-
| pt | Classes and styles of the parts: `root`, `toolbar`, `scroll`, `head`, `corner`, `scale`, `row`, `group`, `label`, `lane`, `bar`, `milestone`, `today`, `empty` |
|
|
31
|
+
| dt | Design tokens of this chart (`chart`) — row and header height, label column, bars, progress, milestones, dependency arrows, dimming, weekends, today line, folding |
|
|
32
|
+
| pt | Classes and styles of the parts: `root`, `toolbar`, `scroll`, `head`, `corner`, `scale`, `row`, `group`, `label`, `lane`, `bar`, `milestone`, `dependency`, `today`, `empty` |
|
|
31
33
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
32
34
|
| unstyled | Removes the tectra styles and keeps the layout and the behaviour |
|
|
33
35
|
|
|
@@ -50,4 +52,6 @@ import { TxGanttChart } from '@tectra-ng/charts/gantt';
|
|
|
50
52
|
|
|
51
53
|
## Notes
|
|
52
54
|
|
|
53
|
-
The names stay in a sticky column and the scale in a sticky header while you scroll both ways. Ctrl (⌘ on a Mac) and the wheel zoom at the pointer, keeping the date under it in place; the zoom buttons keep the centre. A group folds and unfolds with a height animation (none under reduced motion); the tasks of a folded group leave the tab order and the arrow keys skip them. A focused bar scrolls into view. Weekends are shaded on the day scale. Each bar has a tooltip and an accessible name with its dates, length and
|
|
55
|
+
The names stay in a sticky column and the scale in a sticky header while you scroll both ways. Ctrl (⌘ on a Mac) and the wheel zoom at the pointer, keeping the date under it in place; the zoom buttons keep the centre. A group folds and unfolds with a height animation (none under reduced motion); the tasks of a folded group leave the tab order and the arrow keys skip them. A focused bar scrolls into view. Weekends are shaded on the day scale. Each bar has a tooltip and an accessible name with its dates, length, progress and dependencies ("Depends on: …", "Required by: …").
|
|
56
|
+
|
|
57
|
+
Dependency arrows are orthogonal: a short stub out of the predecessor's edge (its end for `finish-…`, its start for `start-…`), a vertical run and a stub with an arrowhead into the successor's start or end; a milestone links from the tips of its diamond. A name beside a bar moves aside for an arrow on that edge. Among the possible routes the chart takes the one that crosses the fewest other bars and names, and when the successor starts before the stub of the predecessor ends the arrow goes around through the gap between the rows. Arrows sit over the grid and under the bars and names. In a folded group the arrows of its tasks move to the summary bar, arrows between two tasks of the same folded group are hidden, and arrows that meet on the same ends are drawn once. The tokens `gantt.dependencyColor`, `dependencyWidth`, `dependencyActiveColor`, `dependencyActiveWidth` and `dimmedOpacity` style them; the highlight fades with the hover duration and without motion under reduced motion.
|
package/gauge/README.md
CHANGED
|
@@ -23,10 +23,10 @@ import { TxGauge } from '@tectra-ng/charts/gauge';
|
|
|
23
23
|
| startAngle | Start of the scale in degrees clockwise from the top (-120) |
|
|
24
24
|
| endAngle | End of the scale (120); `-90` / `90` draws a half circle |
|
|
25
25
|
| label | Caption under the value |
|
|
26
|
-
| valueFormat | Format of the value and the ticks: `number`, `integer`, `compact`, `percent` or a function |
|
|
26
|
+
| valueFormat | Format of the value and the ticks: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
27
27
|
| ticks | Number of ticks to aim for (5) |
|
|
28
|
-
| showTicks | Draws the ticks with their values around the arc |
|
|
29
|
-
| showValue | Writes the value and the caption in the middle |
|
|
28
|
+
| showTicks | Draws the ticks with their values around the arc; labels that would shrink the arc too much turn compact (`2M`), and when even those do not fit only the tick lines stay |
|
|
29
|
+
| showValue | Writes the value and the caption in the middle; a long value gets a smaller font so it stays inside the arc |
|
|
30
30
|
| height | Height in px (220), or a CSS size such as `'100%'` of a parent with a definite height |
|
|
31
31
|
| toolbar | Shows the chart menu: download SVG or PNG (the file is named after `ariaLabel` or `label`) |
|
|
32
32
|
| loading | Shows a skeleton of the same size |
|
package/line/README.md
CHANGED
|
@@ -35,7 +35,7 @@ import { TxLineChart } from '@tectra-ng/charts/line';
|
|
|
35
35
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
36
36
|
| tooltipMode | `shared` (every series at the point) or `single` (the nearest series) |
|
|
37
37
|
| tooltipFormatter | `(value, { seriesIndex, dataPointIndex }) => string` for tooltip values; default — whole numbers in the locale |
|
|
38
|
-
| valueFormat | Value axis format: `number`, `integer`, `compact`, `percent` or a function |
|
|
38
|
+
| valueFormat | Value axis format: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
39
39
|
| yScale | `linear` or `log` |
|
|
40
40
|
| yMin | Fixed bottom of the value axis |
|
|
41
41
|
| yMax | Fixed top of the value axis |
|
package/org-chart/README.md
CHANGED
|
@@ -24,6 +24,7 @@ The chart does not change `nodes` itself: handle `nodeToggle`, `expandAll`, `col
|
|
|
24
24
|
| height | Height of the canvas (`calc(100vh - 15rem)`) |
|
|
25
25
|
| busy | Dims the canvas and blocks it while data loads |
|
|
26
26
|
| pathKinds | Node `kind`s that draw the path to the root on hover; `null` — every node |
|
|
27
|
+
| minFitZoom | Smallest zoom of "fit to screen" (0.6), so cards stay readable on a phone; a tree still too wide is centred on its root, one too tall starts at the top |
|
|
27
28
|
| dt | Design tokens of this chart (`chart`, group `orgChart`) |
|
|
28
29
|
| pt | Classes and styles of the parts: `root`, `bar`, `toolbar`, `canvas`, `stage`, `minimap`, `hint` |
|
|
29
30
|
| ptOptions | How `pt` merges with the global pass-through |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/charts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Angular charts drawn as SVG with no chart library: line and area, column and bar, combo with two value axes, scatter and bubble, pie and donut, radar, radial bar, gauge, funnel, waterfall, bullet, candlestick, box plot, range area, gantt, sankey, sunburst, bar list, segmented bar, heatmap, treemap, rank chart, org chart on one core of scales, axes, legend, tooltip and accessibility. Server rendered, themed by design tokens, dark mode ready.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com/components/line-chart",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"@angular/common": "^22.2.0",
|
|
57
57
|
"@angular/core": "^22.2.0",
|
|
58
58
|
"@angular/router": "^22.2.0",
|
|
59
|
-
"@tectra-ng/core": "^0.4.
|
|
60
|
-
"@tectra-ng/icons": "^0.4.
|
|
61
|
-
"@tectra-ng/themes": "^0.4.
|
|
62
|
-
"@tectra-ng/ui": "^0.4.
|
|
59
|
+
"@tectra-ng/core": "^0.4.4",
|
|
60
|
+
"@tectra-ng/icons": "^0.4.4",
|
|
61
|
+
"@tectra-ng/themes": "^0.4.4",
|
|
62
|
+
"@tectra-ng/ui": "^0.4.4"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
65
65
|
"@angular/router": {
|
package/pie/README.md
CHANGED
|
@@ -14,10 +14,11 @@ import { TxPieChart, TxPieLegendPipe } from '@tectra-ng/charts/pie';
|
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
16
|
| pieData | Required. `{ series, labels, colors?, title? }` — values, one label per value, optional own colours and a name shown on top of the tooltip. No values or only zeros show "No data" |
|
|
17
|
-
| chartWidth | Width: px
|
|
18
|
-
|
|
|
17
|
+
| chartWidth | Width: px or a CSS size (`'100%'` — the width of the parent; the chart measures itself) |
|
|
18
|
+
| height | Height in px (400), or a CSS size; the donut fits the width and the height left under the legend |
|
|
19
|
+
| chartHeight | Older name of `height`, used when `height` is not set |
|
|
19
20
|
| showLegend | Shows the legend |
|
|
20
|
-
| legendPosition | `bottom` (default), `top`, `left` or `right
|
|
21
|
+
| legendPosition | `bottom` (default), `top`, `left` or `right`; a side legend moves under the donut when the chart is narrower than 420px |
|
|
21
22
|
| legendAlign | `center` (default), `start` or `end` for a top or bottom legend |
|
|
22
23
|
| legendVariant | Look of the legend: `dot` (default), `line`, `pill` or `stat` (each value in large type with its share; it replaces the tooltip) |
|
|
23
24
|
| legendValues | Lists the value and the share of each segment in the legend |
|
|
@@ -26,7 +27,7 @@ import { TxPieChart, TxPieLegendPipe } from '@tectra-ng/charts/pie';
|
|
|
26
27
|
| totalFormatter | `(value) => string` for the centre total and the hovered value |
|
|
27
28
|
| tooltipFormatter | `(value, { seriesIndex }) => string` for the tooltip value |
|
|
28
29
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
29
|
-
| valueFormat | Format of values: `number`, `integer`, `compact`, `percent` or a function |
|
|
30
|
+
| valueFormat | Format of values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
30
31
|
| donutSize | Size of the hole as a share of the radius (`'65%'`); `'0%'` draws a pie |
|
|
31
32
|
| segmentGap | Width in px of the card-coloured gap between segments (2) |
|
|
32
33
|
| segmentRadius | Rounding of the segment corners in px; default — the `chart.pie.segmentRadius` token (4px). It shrinks on narrow segments and thin rings so the shape never breaks; `0` keeps sharp corners |
|
package/radar/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import { TxRadarChart } from '@tectra-ng/charts/radar';
|
|
|
29
29
|
| legendVariant | Look of the legend: `dot` (default), `line`, `pill` or `stat` (the average of each series, or the value on the focused axis, in large type; it replaces the tooltip) |
|
|
30
30
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
31
31
|
| tooltipFormatter | `(value, { seriesIndex, dataPointIndex }) => string` for tooltip values |
|
|
32
|
-
| valueFormat | Format of the ring values and the tooltip: `number`, `integer`, `compact`, `percent` or a function |
|
|
32
|
+
| valueFormat | Format of the ring values and the tooltip: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
33
33
|
| toolbar | Shows the chart menu in the top right corner: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
34
34
|
| loading | Shows a skeleton of the same size |
|
|
35
35
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
package/radial-bar/README.md
CHANGED
|
@@ -23,12 +23,12 @@ import { TxRadialBar } from '@tectra-ng/charts/radial-bar';
|
|
|
23
23
|
| centerValue | What the centre shows for an item: `percent` of its max (default) or the `value` |
|
|
24
24
|
| totalLabel | With several items, shows this caption and the average share in the centre until one is hovered |
|
|
25
25
|
| showLegend | Shows the legend; a single item never has one |
|
|
26
|
-
| legendPosition | `top`, `bottom` (default), `left` or `right
|
|
26
|
+
| legendPosition | `top`, `bottom` (default), `left` or `right`; a side legend moves under the chart when it is narrower than 420px |
|
|
27
27
|
| legendAlign | `start`, `center` (default) or `end` for a top or bottom legend |
|
|
28
28
|
| legendVariant | Look of the legend: `dot` (default), `line`, `pill` or `stat` (values in large type with the share; it replaces the tooltip) |
|
|
29
29
|
| legendValues | Adds the value and the share to each legend item |
|
|
30
30
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
31
|
-
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent` or a function |
|
|
31
|
+
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
32
32
|
| toolbar | Shows the chart menu: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
33
33
|
| loading | Shows a skeleton of the same size |
|
|
34
34
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
package/range-area/README.md
CHANGED
|
@@ -30,13 +30,14 @@ import { TxRangeAreaChart } from '@tectra-ng/charts/range-area';
|
|
|
30
30
|
| xAxisTitle | Title of the x axis |
|
|
31
31
|
| yAxisTitle | Title of the value axis |
|
|
32
32
|
| grid | Grid lines: `value`, `category`, `both` or `none` |
|
|
33
|
+
| annotations | Marks on the plot: `{ type: 'x-line', x }`, `{ type: 'y-line', y }`, `{ type: 'x-band', from, to }`, `{ type: 'y-band', from, to }`, `{ type: 'point', x, y }`, each with an optional `label`, `tone` (`neutral`, `primary`, `success`, `info`, `warn`, `danger`) or `color`; `x` is a category label (or index) or a date with `xType="time"`; bands and lines sit behind the series, points and labels on top |
|
|
33
34
|
| labelMode | Labels that do not fit: `auto`, `rotate` or `skip` |
|
|
34
35
|
| maxLabels | Most x labels to show (10) |
|
|
35
36
|
| toolbar | Shows the chart menu: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
36
37
|
| loading | Shows a skeleton of the same size |
|
|
37
38
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
|
38
39
|
| dt | Design tokens of this chart (`chart`) — band opacity, edge and line widths, palette |
|
|
39
|
-
| pt | Classes and styles of the parts: `root`, `legend`, `legendItem`, `plot`, `svg`, `grid`, `axis`, `series`, `band`, `edge`, `line`, `marker`, `crosshair`, `tooltip`, `empty`, `skeleton` |
|
|
40
|
+
| pt | Classes and styles of the parts: `root`, `legend`, `legendItem`, `plot`, `svg`, `grid`, `axis`, `series`, `band`, `edge`, `line`, `marker`, `crosshair`, `annotation`, `tooltip`, `empty`, `skeleton` |
|
|
40
41
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
41
42
|
| unstyled | Removes the tectra styles and keeps the behaviour |
|
|
42
43
|
|
package/rank-line/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Rank Chart
|
|
2
2
|
|
|
3
|
-
`<tx-rank-chart>` — positions over time (search ranks, leaderboards): rank 1 on top, one straight line per series in its own colour, a gap where a check has no rank, a tooltip with the date
|
|
3
|
+
`<tx-rank-chart>` — positions over time (search ranks, leaderboards): rank 1 on top, one straight line per series in its own colour, a gap where a check has no rank, a tooltip with the date, the series, the rank and an optional note. Points sit at their real times on a time axis.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { TxRankChart } from '@tectra-ng/charts/rank-line';
|
|
@@ -14,7 +14,8 @@ import { TxRankChart } from '@tectra-ng/charts/rank-line';
|
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
16
|
| series | `{ name, color?, points: { time, rank \| null, note? }[] }[]` — a `null` rank leaves a gap; without `color` the series takes one of 12 line colours by its index (`rankLineColor(index)`) |
|
|
17
|
-
| maxRank | The deepest rank on the axis (20); ticks by 5 up to 20
|
|
17
|
+
| maxRank | The deepest rank on the axis (20); rank 1 sits on the top line and `maxRank` on the bottom line; every rank gets a tick up to 10 ranks, then ticks go by 5 up to 20 and by 10 deeper; deeper ranks sit on the bottom line |
|
|
18
|
+
| dateFormat | How the tooltip, the summary and the data table write a date: `Intl.DateTimeFormat` options or `(time) => string`; by default a date, with the time of day only when checks are less than a day apart |
|
|
18
19
|
| rankLabel | Caption of the rank in the tooltip and the data table (`Position: 3`) |
|
|
19
20
|
| height | Height: px (360) or `'100%'` of a parent with a definite height |
|
|
20
21
|
| showLegend | Shows a legend that hides and shows series |
|