@tectra-ng/charts 0.0.1 → 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.
- package/LICENSE +21 -0
- package/README.md +44 -1
- package/bar-list/README.md +30 -0
- package/boxplot/README.md +62 -0
- package/bullet/README.md +53 -0
- package/candlestick/README.md +57 -0
- package/column/README.md +73 -0
- package/combo/README.md +83 -0
- package/core/README.md +62 -0
- package/fesm2022/tectra-ng-charts-bar-list.mjs +299 -0
- package/fesm2022/tectra-ng-charts-bar-list.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-boxplot.mjs +887 -0
- package/fesm2022/tectra-ng-charts-boxplot.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-bullet.mjs +666 -0
- package/fesm2022/tectra-ng-charts-bullet.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-candlestick.mjs +778 -0
- package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-column.mjs +1166 -0
- package/fesm2022/tectra-ng-charts-column.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-combo.mjs +1218 -0
- package/fesm2022/tectra-ng-charts-combo.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-core.mjs +3679 -0
- package/fesm2022/tectra-ng-charts-core.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-funnel.mjs +694 -0
- package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-gantt.mjs +947 -0
- package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-gauge.mjs +693 -0
- package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-heatmap.mjs +935 -0
- package/fesm2022/tectra-ng-charts-heatmap.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-line.mjs +1541 -0
- package/fesm2022/tectra-ng-charts-line.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-org-chart.mjs +2341 -0
- package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-pie.mjs +1059 -0
- package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-radar.mjs +924 -0
- package/fesm2022/tectra-ng-charts-radar.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-radial-bar.mjs +802 -0
- package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-range-area.mjs +933 -0
- package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-rank-line.mjs +660 -0
- package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-sankey.mjs +837 -0
- package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-scatter.mjs +1174 -0
- package/fesm2022/tectra-ng-charts-scatter.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs +328 -0
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-sunburst.mjs +733 -0
- package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-treemap.mjs +674 -0
- package/fesm2022/tectra-ng-charts-treemap.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts-waterfall.mjs +809 -0
- package/fesm2022/tectra-ng-charts-waterfall.mjs.map +1 -0
- package/fesm2022/tectra-ng-charts.mjs +4 -0
- package/fesm2022/tectra-ng-charts.mjs.map +1 -0
- package/funnel/README.md +53 -0
- package/gantt/README.md +53 -0
- package/gauge/README.md +41 -0
- package/heatmap/README.md +47 -0
- package/line/README.md +86 -0
- package/org-chart/README.md +57 -0
- package/package.json +173 -4
- package/pie/README.md +66 -0
- package/radar/README.md +64 -0
- package/radial-bar/README.md +62 -0
- package/range-area/README.md +66 -0
- package/rank-line/README.md +51 -0
- package/sankey/README.md +52 -0
- package/scatter/README.md +71 -0
- package/segmented-bar/README.md +35 -0
- package/sunburst/README.md +55 -0
- package/treemap/README.md +47 -0
- package/types/tectra-ng-charts-bar-list.d.ts +724 -0
- package/types/tectra-ng-charts-bar-list.d.ts.map +1 -0
- package/types/tectra-ng-charts-boxplot.d.ts +882 -0
- package/types/tectra-ng-charts-boxplot.d.ts.map +1 -0
- package/types/tectra-ng-charts-bullet.d.ts +833 -0
- package/types/tectra-ng-charts-bullet.d.ts.map +1 -0
- package/types/tectra-ng-charts-candlestick.d.ts +854 -0
- package/types/tectra-ng-charts-candlestick.d.ts.map +1 -0
- package/types/tectra-ng-charts-column.d.ts +951 -0
- package/types/tectra-ng-charts-column.d.ts.map +1 -0
- package/types/tectra-ng-charts-combo.d.ts +987 -0
- package/types/tectra-ng-charts-combo.d.ts.map +1 -0
- package/types/tectra-ng-charts-core.d.ts +859 -0
- package/types/tectra-ng-charts-core.d.ts.map +1 -0
- package/types/tectra-ng-charts-funnel.d.ts +857 -0
- package/types/tectra-ng-charts-funnel.d.ts.map +1 -0
- package/types/tectra-ng-charts-gantt.d.ts +884 -0
- package/types/tectra-ng-charts-gantt.d.ts.map +1 -0
- package/types/tectra-ng-charts-gauge.d.ts +859 -0
- package/types/tectra-ng-charts-gauge.d.ts.map +1 -0
- package/types/tectra-ng-charts-heatmap.d.ts +914 -0
- package/types/tectra-ng-charts-heatmap.d.ts.map +1 -0
- package/types/tectra-ng-charts-line.d.ts +1023 -0
- package/types/tectra-ng-charts-line.d.ts.map +1 -0
- package/types/tectra-ng-charts-org-chart.d.ts +1017 -0
- package/types/tectra-ng-charts-org-chart.d.ts.map +1 -0
- package/types/tectra-ng-charts-pie.d.ts +983 -0
- package/types/tectra-ng-charts-pie.d.ts.map +1 -0
- package/types/tectra-ng-charts-radar.d.ts +903 -0
- package/types/tectra-ng-charts-radar.d.ts.map +1 -0
- package/types/tectra-ng-charts-radial-bar.d.ts +886 -0
- package/types/tectra-ng-charts-radial-bar.d.ts.map +1 -0
- package/types/tectra-ng-charts-range-area.d.ts +897 -0
- package/types/tectra-ng-charts-range-area.d.ts.map +1 -0
- package/types/tectra-ng-charts-rank-line.d.ts +839 -0
- package/types/tectra-ng-charts-rank-line.d.ts.map +1 -0
- package/types/tectra-ng-charts-sankey.d.ts +866 -0
- package/types/tectra-ng-charts-sankey.d.ts.map +1 -0
- package/types/tectra-ng-charts-scatter.d.ts +987 -0
- package/types/tectra-ng-charts-scatter.d.ts.map +1 -0
- package/types/tectra-ng-charts-segmented-bar.d.ts +751 -0
- package/types/tectra-ng-charts-segmented-bar.d.ts.map +1 -0
- package/types/tectra-ng-charts-sunburst.d.ts +864 -0
- package/types/tectra-ng-charts-sunburst.d.ts.map +1 -0
- package/types/tectra-ng-charts-treemap.d.ts +847 -0
- package/types/tectra-ng-charts-treemap.d.ts.map +1 -0
- package/types/tectra-ng-charts-waterfall.d.ts +869 -0
- package/types/tectra-ng-charts-waterfall.d.ts.map +1 -0
- package/types/tectra-ng-charts.d.ts +2 -0
- package/types/tectra-ng-charts.d.ts.map +1 -0
- package/waterfall/README.md +60 -0
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
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";
|
|
4
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
5
|
+
import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
|
|
6
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
7
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
8
|
+
function bulletSegments(ranges, min, max, levels) {
|
|
9
|
+
const stops = [...[...ranges].filter((value) => Number.isFinite(value) && value > min).sort((a, b) => a - b).map((value) => Math.min(value, max)), max].filter((value, index, list) => index === 0 || value > list[index - 1]);
|
|
10
|
+
let from = min;
|
|
11
|
+
return stops.map((to, index) => {
|
|
12
|
+
const segment = {
|
|
13
|
+
level: Math.min(levels, index + 1 + Math.max(0, levels - stops.length)),
|
|
14
|
+
from,
|
|
15
|
+
to
|
|
16
|
+
};
|
|
17
|
+
from = to;
|
|
18
|
+
return segment;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function bulletMax(values) {
|
|
22
|
+
return Math.max(0, ...values.filter((value) => value !== null && value !== void 0 && Number.isFinite(value)));
|
|
23
|
+
}
|
|
24
|
+
const DEFAULTS = {
|
|
25
|
+
rowHeight: 44,
|
|
26
|
+
trackHeight: .5,
|
|
27
|
+
barHeight: .34,
|
|
28
|
+
targetHeight: .72
|
|
29
|
+
};
|
|
30
|
+
const LEVELS = 3;
|
|
31
|
+
const AXIS_ROOM = 30;
|
|
32
|
+
var TxBulletChart = class TxBulletChart {
|
|
33
|
+
locale = inject(TxLocaleService);
|
|
34
|
+
host = inject(ElementRef);
|
|
35
|
+
translations = injectTranslations();
|
|
36
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
37
|
+
ranges = input([], ...ngDevMode ? [{ debugName: "ranges" }] : /* istanbul ignore next */ []);
|
|
38
|
+
min = input(0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
39
|
+
max = input(void 0, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
40
|
+
height = input(void 0, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
41
|
+
showTooltip = input(true, {
|
|
42
|
+
...ngDevMode ? { debugName: "showTooltip" } : /* istanbul ignore next */ {},
|
|
43
|
+
transform: booleanAttribute
|
|
44
|
+
});
|
|
45
|
+
valueFormat = input("number", ...ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []);
|
|
46
|
+
grid = input("value", ...ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []);
|
|
47
|
+
maxLabelWidth = input(180, ...ngDevMode ? [{ debugName: "maxLabelWidth" }] : /* istanbul ignore next */ []);
|
|
48
|
+
toolbar = input(false, {
|
|
49
|
+
...ngDevMode ? { debugName: "toolbar" } : /* istanbul ignore next */ {},
|
|
50
|
+
transform: booleanAttribute
|
|
51
|
+
});
|
|
52
|
+
loading = input(false, {
|
|
53
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
54
|
+
transform: booleanAttribute
|
|
55
|
+
});
|
|
56
|
+
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
57
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
58
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
59
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
60
|
+
unstyled = input(void 0, {
|
|
61
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
62
|
+
transform: optionalBoolean
|
|
63
|
+
});
|
|
64
|
+
barClick = output();
|
|
65
|
+
tooltipTemplate = contentChild(TxChartTooltipTemplate, ...ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []);
|
|
66
|
+
frame = viewChild(TxChartFrame, ...ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []);
|
|
67
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
68
|
+
passThrough = injectPassThrough("bulletChart", this, this.pt, this.ptOptions);
|
|
69
|
+
tokenStyle = computed(() => toStyleObject(this.dt(), "--tx-chart"), ...ngDevMode ? [{ debugName: "tokenStyle" }] : /* istanbul ignore next */ []);
|
|
70
|
+
hostStyle = computed(() => ({
|
|
71
|
+
...this.tokenStyle(),
|
|
72
|
+
...this.passThrough().root?.style
|
|
73
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
74
|
+
entrance = injectChartEntrance();
|
|
75
|
+
morph = signal(false, ...ngDevMode ? [{ debugName: "morph" }] : /* istanbul ignore next */ []);
|
|
76
|
+
active = signal(null, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
77
|
+
geometry = signal(DEFAULTS, ...ngDevMode ? [{ debugName: "geometry" }] : /* istanbul ignore next */ []);
|
|
78
|
+
intl = computed(() => this.locale.locale().intl, ...ngDevMode ? [{ debugName: "intl" }] : /* istanbul ignore next */ []);
|
|
79
|
+
list = computed(() => this.items() ?? [], ...ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []);
|
|
80
|
+
isEmpty = computed(() => !this.list().length, ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
|
|
81
|
+
frameHeight = computed(() => this.height() ?? Math.max(1, this.list().length) * this.geometry().rowHeight + AXIS_ROOM, ...ngDevMode ? [{ debugName: "frameHeight" }] : /* istanbul ignore next */ []);
|
|
82
|
+
size = linkedSignal(() => initialChartSize(this.frameHeight(), null, void 0, this.toolbar()), ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
83
|
+
valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()), ...ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []);
|
|
84
|
+
domainMax = computed(() => {
|
|
85
|
+
const own = this.max();
|
|
86
|
+
if (own !== void 0) return own;
|
|
87
|
+
return bulletMax(this.list().flatMap((item) => [
|
|
88
|
+
item.value,
|
|
89
|
+
item.target,
|
|
90
|
+
...item.ranges ?? this.ranges()
|
|
91
|
+
]));
|
|
92
|
+
}, ...ngDevMode ? [{ debugName: "domainMax" }] : /* istanbul ignore next */ []);
|
|
93
|
+
layout = computed(() => {
|
|
94
|
+
const { width, height } = this.size();
|
|
95
|
+
const labels = this.list().map((item) => item.label);
|
|
96
|
+
return cartesianLayout({
|
|
97
|
+
width,
|
|
98
|
+
height,
|
|
99
|
+
intl: this.intl(),
|
|
100
|
+
horizontal: true,
|
|
101
|
+
category: {
|
|
102
|
+
kind: "band",
|
|
103
|
+
labels,
|
|
104
|
+
count: labels.length,
|
|
105
|
+
maxLabelWidth: this.maxLabelWidth()
|
|
106
|
+
},
|
|
107
|
+
value: {
|
|
108
|
+
extent: [this.min(), Math.max(this.min() + 1e-9, this.domainMax())],
|
|
109
|
+
format: this.valueFormat(),
|
|
110
|
+
includeZero: this.min() <= 0,
|
|
111
|
+
min: this.min(),
|
|
112
|
+
max: this.max()
|
|
113
|
+
},
|
|
114
|
+
grid: this.grid()
|
|
115
|
+
});
|
|
116
|
+
}, ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
117
|
+
rows = computed(() => {
|
|
118
|
+
const layout = this.layout();
|
|
119
|
+
const band = layout.category;
|
|
120
|
+
const scale = layout.value;
|
|
121
|
+
const [d0, d1] = scale.domain;
|
|
122
|
+
const { trackHeight, barHeight, targetHeight } = this.geometry();
|
|
123
|
+
const clamp = (value) => Math.max(d0, Math.min(d1, value));
|
|
124
|
+
return this.list().map((item, index) => {
|
|
125
|
+
const center = band.center(index);
|
|
126
|
+
const track = band.bandwidth * trackHeight;
|
|
127
|
+
const bar = band.bandwidth * barHeight;
|
|
128
|
+
const tick = band.bandwidth * targetHeight;
|
|
129
|
+
const value = item.value !== null && Number.isFinite(item.value) ? item.value : null;
|
|
130
|
+
const target = item.target !== null && item.target !== void 0 && Number.isFinite(item.target) ? item.target : null;
|
|
131
|
+
const zero = scale.map(clamp(Math.max(d0, 0)));
|
|
132
|
+
const end = value === null ? zero : scale.map(clamp(value));
|
|
133
|
+
return {
|
|
134
|
+
index,
|
|
135
|
+
key: `${index}:${item.label}`,
|
|
136
|
+
label: item.label,
|
|
137
|
+
value,
|
|
138
|
+
target,
|
|
139
|
+
color: item.color ?? null,
|
|
140
|
+
trackY: center - track / 2,
|
|
141
|
+
trackHeight: track,
|
|
142
|
+
ranges: bulletSegments(item.ranges ?? this.ranges(), d0, d1, LEVELS).map((segment) => ({
|
|
143
|
+
key: `${segment.level}:${segment.from}`,
|
|
144
|
+
level: segment.level,
|
|
145
|
+
x: scale.map(segment.from),
|
|
146
|
+
width: Math.max(0, scale.map(segment.to) - scale.map(segment.from))
|
|
147
|
+
})),
|
|
148
|
+
barX: Math.min(zero, end),
|
|
149
|
+
barY: center - bar / 2,
|
|
150
|
+
barWidth: Math.abs(end - zero),
|
|
151
|
+
barHeight: bar,
|
|
152
|
+
targetX: target === null ? null : scale.map(clamp(target)),
|
|
153
|
+
targetY1: center - tick / 2,
|
|
154
|
+
targetY2: center + tick / 2,
|
|
155
|
+
center
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
}, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
159
|
+
hoverBand = computed(() => {
|
|
160
|
+
const index = this.active();
|
|
161
|
+
return index === null ? null : chartBandRect(this.layout().category, index, this.layout().plot, true);
|
|
162
|
+
}, ...ngDevMode ? [{ debugName: "hoverBand" }] : /* istanbul ignore next */ []);
|
|
163
|
+
tooltip = computed(() => {
|
|
164
|
+
const index = this.active();
|
|
165
|
+
if (index === null || !this.showTooltip()) return null;
|
|
166
|
+
const row = this.rows()[index];
|
|
167
|
+
if (!row) return null;
|
|
168
|
+
const t = this.translations();
|
|
169
|
+
const format = this.valueFormatter();
|
|
170
|
+
const rows = [{
|
|
171
|
+
label: t.chartValue,
|
|
172
|
+
value: row.value === null ? "—" : format(row.value),
|
|
173
|
+
color: row.color ?? "var(--tx-chart-bullet-bar-color)",
|
|
174
|
+
raw: row.value,
|
|
175
|
+
seriesIndex: 0,
|
|
176
|
+
active: true
|
|
177
|
+
}, ...row.target !== null ? [{
|
|
178
|
+
label: t.chartTarget,
|
|
179
|
+
value: format(row.target),
|
|
180
|
+
color: "var(--tx-chart-bullet-target-color)",
|
|
181
|
+
raw: row.target,
|
|
182
|
+
seriesIndex: 1
|
|
183
|
+
}] : []];
|
|
184
|
+
return {
|
|
185
|
+
title: row.label,
|
|
186
|
+
rows,
|
|
187
|
+
index,
|
|
188
|
+
x: row.barX + row.barWidth,
|
|
189
|
+
y: row.trackY,
|
|
190
|
+
placement: "top"
|
|
191
|
+
};
|
|
192
|
+
}, ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
|
|
193
|
+
summary = computed(() => {
|
|
194
|
+
const t = this.translations();
|
|
195
|
+
const text = chartSummary(t, this.intl(), t.chartBullet, 1, this.list().length, null);
|
|
196
|
+
return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;
|
|
197
|
+
}, ...ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []);
|
|
198
|
+
dataTable = computed(() => {
|
|
199
|
+
const t = this.translations();
|
|
200
|
+
const format = this.valueFormatter();
|
|
201
|
+
return {
|
|
202
|
+
columns: [{
|
|
203
|
+
key: "value",
|
|
204
|
+
label: t.chartValue
|
|
205
|
+
}, {
|
|
206
|
+
key: "target",
|
|
207
|
+
label: t.chartTarget
|
|
208
|
+
}],
|
|
209
|
+
rows: this.rows().map((row) => ({
|
|
210
|
+
label: row.label,
|
|
211
|
+
cells: [row.value === null ? "—" : format(row.value), row.target === null ? "—" : format(row.target)]
|
|
212
|
+
}))
|
|
213
|
+
};
|
|
214
|
+
}, ...ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []);
|
|
215
|
+
constructor() {
|
|
216
|
+
afterNextRender(() => setTimeout(() => this.morph.set(true), 120));
|
|
217
|
+
afterRenderEffect(() => {
|
|
218
|
+
this.dt();
|
|
219
|
+
this.readGeometry();
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
onPointer(event) {
|
|
223
|
+
if (event.type === "leave") {
|
|
224
|
+
this.active.set(null);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const layout = this.layout();
|
|
228
|
+
const plot = layout.plot;
|
|
229
|
+
const index = event.y >= plot.top && event.y <= plot.top + plot.height && event.x >= plot.left - 4 && event.x <= plot.left + plot.width + 4 ? layout.category.indexAt(event.y) : -1;
|
|
230
|
+
this.active.set(index >= 0 ? index : null);
|
|
231
|
+
if (event.type === "click" && index >= 0) {
|
|
232
|
+
const row = this.rows()[index];
|
|
233
|
+
this.barClick.emit({
|
|
234
|
+
index,
|
|
235
|
+
label: row.label,
|
|
236
|
+
value: row.value,
|
|
237
|
+
target: row.target
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
onNavigate(event) {
|
|
242
|
+
if (event.key === "Escape") {
|
|
243
|
+
this.active.set(null);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const key = event.key === "ArrowDown" ? "ArrowRight" : event.key === "ArrowUp" ? "ArrowLeft" : event.key;
|
|
247
|
+
const index = stepIndex(key, this.active() ?? -1, this.rows().length);
|
|
248
|
+
if (index < 0) return;
|
|
249
|
+
this.active.set(index);
|
|
250
|
+
const row = this.rows()[index];
|
|
251
|
+
const t = this.translations();
|
|
252
|
+
const format = this.valueFormatter();
|
|
253
|
+
const target = row.target === null ? "" : `, ${t.chartTarget.toLocaleLowerCase(this.intl())} ${format(row.target)}`;
|
|
254
|
+
this.frame()?.announce(`${row.label}: ${row.value === null ? "—" : format(row.value)}${target}`);
|
|
255
|
+
}
|
|
256
|
+
readGeometry() {
|
|
257
|
+
const element = this.host.nativeElement;
|
|
258
|
+
const next = {
|
|
259
|
+
rowHeight: readTokenNumber(element, "--tx-chart-bullet-row-height", DEFAULTS.rowHeight),
|
|
260
|
+
trackHeight: readTokenNumber(element, "--tx-chart-bullet-track-height", DEFAULTS.trackHeight),
|
|
261
|
+
barHeight: readTokenNumber(element, "--tx-chart-bullet-bar-height", DEFAULTS.barHeight),
|
|
262
|
+
targetHeight: readTokenNumber(element, "--tx-chart-bullet-target-height", DEFAULTS.targetHeight)
|
|
263
|
+
};
|
|
264
|
+
const current = this.geometry();
|
|
265
|
+
if (Object.keys(next).some((key) => next[key] !== current[key])) this.geometry.set(next);
|
|
266
|
+
}
|
|
267
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
268
|
+
minVersion: "12.0.0",
|
|
269
|
+
version: "22.2.3",
|
|
270
|
+
ngImport: i0,
|
|
271
|
+
type: TxBulletChart,
|
|
272
|
+
deps: [],
|
|
273
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
274
|
+
});
|
|
275
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
276
|
+
minVersion: "17.0.0",
|
|
277
|
+
version: "22.2.3",
|
|
278
|
+
type: TxBulletChart,
|
|
279
|
+
isStandalone: true,
|
|
280
|
+
selector: "tx-bullet-chart",
|
|
281
|
+
inputs: {
|
|
282
|
+
items: {
|
|
283
|
+
classPropertyName: "items",
|
|
284
|
+
publicName: "items",
|
|
285
|
+
isSignal: true,
|
|
286
|
+
isRequired: false,
|
|
287
|
+
transformFunction: null
|
|
288
|
+
},
|
|
289
|
+
ranges: {
|
|
290
|
+
classPropertyName: "ranges",
|
|
291
|
+
publicName: "ranges",
|
|
292
|
+
isSignal: true,
|
|
293
|
+
isRequired: false,
|
|
294
|
+
transformFunction: null
|
|
295
|
+
},
|
|
296
|
+
min: {
|
|
297
|
+
classPropertyName: "min",
|
|
298
|
+
publicName: "min",
|
|
299
|
+
isSignal: true,
|
|
300
|
+
isRequired: false,
|
|
301
|
+
transformFunction: null
|
|
302
|
+
},
|
|
303
|
+
max: {
|
|
304
|
+
classPropertyName: "max",
|
|
305
|
+
publicName: "max",
|
|
306
|
+
isSignal: true,
|
|
307
|
+
isRequired: false,
|
|
308
|
+
transformFunction: null
|
|
309
|
+
},
|
|
310
|
+
height: {
|
|
311
|
+
classPropertyName: "height",
|
|
312
|
+
publicName: "height",
|
|
313
|
+
isSignal: true,
|
|
314
|
+
isRequired: false,
|
|
315
|
+
transformFunction: null
|
|
316
|
+
},
|
|
317
|
+
showTooltip: {
|
|
318
|
+
classPropertyName: "showTooltip",
|
|
319
|
+
publicName: "showTooltip",
|
|
320
|
+
isSignal: true,
|
|
321
|
+
isRequired: false,
|
|
322
|
+
transformFunction: null
|
|
323
|
+
},
|
|
324
|
+
valueFormat: {
|
|
325
|
+
classPropertyName: "valueFormat",
|
|
326
|
+
publicName: "valueFormat",
|
|
327
|
+
isSignal: true,
|
|
328
|
+
isRequired: false,
|
|
329
|
+
transformFunction: null
|
|
330
|
+
},
|
|
331
|
+
grid: {
|
|
332
|
+
classPropertyName: "grid",
|
|
333
|
+
publicName: "grid",
|
|
334
|
+
isSignal: true,
|
|
335
|
+
isRequired: false,
|
|
336
|
+
transformFunction: null
|
|
337
|
+
},
|
|
338
|
+
maxLabelWidth: {
|
|
339
|
+
classPropertyName: "maxLabelWidth",
|
|
340
|
+
publicName: "maxLabelWidth",
|
|
341
|
+
isSignal: true,
|
|
342
|
+
isRequired: false,
|
|
343
|
+
transformFunction: null
|
|
344
|
+
},
|
|
345
|
+
toolbar: {
|
|
346
|
+
classPropertyName: "toolbar",
|
|
347
|
+
publicName: "toolbar",
|
|
348
|
+
isSignal: true,
|
|
349
|
+
isRequired: false,
|
|
350
|
+
transformFunction: null
|
|
351
|
+
},
|
|
352
|
+
loading: {
|
|
353
|
+
classPropertyName: "loading",
|
|
354
|
+
publicName: "loading",
|
|
355
|
+
isSignal: true,
|
|
356
|
+
isRequired: false,
|
|
357
|
+
transformFunction: null
|
|
358
|
+
},
|
|
359
|
+
ariaLabel: {
|
|
360
|
+
classPropertyName: "ariaLabel",
|
|
361
|
+
publicName: "ariaLabel",
|
|
362
|
+
isSignal: true,
|
|
363
|
+
isRequired: false,
|
|
364
|
+
transformFunction: null
|
|
365
|
+
},
|
|
366
|
+
dt: {
|
|
367
|
+
classPropertyName: "dt",
|
|
368
|
+
publicName: "dt",
|
|
369
|
+
isSignal: true,
|
|
370
|
+
isRequired: false,
|
|
371
|
+
transformFunction: null
|
|
372
|
+
},
|
|
373
|
+
pt: {
|
|
374
|
+
classPropertyName: "pt",
|
|
375
|
+
publicName: "pt",
|
|
376
|
+
isSignal: true,
|
|
377
|
+
isRequired: false,
|
|
378
|
+
transformFunction: null
|
|
379
|
+
},
|
|
380
|
+
ptOptions: {
|
|
381
|
+
classPropertyName: "ptOptions",
|
|
382
|
+
publicName: "ptOptions",
|
|
383
|
+
isSignal: true,
|
|
384
|
+
isRequired: false,
|
|
385
|
+
transformFunction: null
|
|
386
|
+
},
|
|
387
|
+
unstyled: {
|
|
388
|
+
classPropertyName: "unstyled",
|
|
389
|
+
publicName: "unstyled",
|
|
390
|
+
isSignal: true,
|
|
391
|
+
isRequired: false,
|
|
392
|
+
transformFunction: null
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
outputs: { barClick: "barClick" },
|
|
396
|
+
host: {
|
|
397
|
+
properties: {
|
|
398
|
+
"class": "passThrough().root?.class",
|
|
399
|
+
"style": "hostStyle()",
|
|
400
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
401
|
+
"class.tx-bullet-chart--fill": "typeof height() === \"string\"",
|
|
402
|
+
"class.tx-bullet-chart--entering": "entrance.active()",
|
|
403
|
+
"class.tx-bullet-chart--morph": "morph()",
|
|
404
|
+
"class.tx-bullet-chart--active": "active() !== null"
|
|
405
|
+
},
|
|
406
|
+
classAttribute: "tx-bullet-chart"
|
|
407
|
+
},
|
|
408
|
+
queries: [{
|
|
409
|
+
propertyName: "tooltipTemplate",
|
|
410
|
+
first: true,
|
|
411
|
+
predicate: TxChartTooltipTemplate,
|
|
412
|
+
descendants: true,
|
|
413
|
+
isSignal: true
|
|
414
|
+
}],
|
|
415
|
+
viewQueries: [{
|
|
416
|
+
propertyName: "frame",
|
|
417
|
+
first: true,
|
|
418
|
+
predicate: TxChartFrame,
|
|
419
|
+
descendants: true,
|
|
420
|
+
isSignal: true
|
|
421
|
+
}],
|
|
422
|
+
ngImport: i0,
|
|
423
|
+
template: "<tx-chart-frame\n [height]=\"frameHeight()\"\n [(size)]=\"size\"\n [showLegend]=\"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 @for (row of rows(); track row.key) {\n <svg:g\n class=\"tx-bullet-chart__row\"\n [class.tx-bullet-chart__row--active]=\"active() === row.index\"\n [attr.data-index]=\"row.index\"\n [style.--tx-bullet-chart-order]=\"row.index\"\n >\n @for (range of row.ranges; track range.key) {\n <svg:rect\n class=\"tx-bullet-chart__range\"\n [class]=\"passThrough().range?.class\"\n [style]=\"passThrough().range?.style\"\n [attr.data-level]=\"range.level\"\n [attr.x]=\"range.x\"\n [attr.y]=\"row.trackY\"\n [attr.width]=\"range.width\"\n [attr.height]=\"row.trackHeight\"\n />\n }\n @if (row.barWidth > 0) {\n <svg:rect\n class=\"tx-bullet-chart__bar\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.x]=\"row.barX\"\n [attr.y]=\"row.barY\"\n [attr.width]=\"row.barWidth\"\n [attr.height]=\"row.barHeight\"\n [style.--tx-bullet-chart-own]=\"row.color\"\n />\n }\n @if (row.targetX !== null) {\n <svg:line\n class=\"tx-bullet-chart__target\"\n [class]=\"passThrough().target?.class\"\n [style]=\"passThrough().target?.style\"\n [attr.x1]=\"row.targetX\"\n [attr.x2]=\"row.targetX\"\n [attr.y1]=\"row.targetY1\"\n [attr.y2]=\"row.targetY2\"\n />\n }\n </svg:g>\n }\n</tx-chart-frame>\n",
|
|
424
|
+
styles: [":host{display:block;min-width:0}:host(.tx-bullet-chart--fill){height:100%}.tx-bullet-chart__range{fill:currentColor;fill-opacity:.08}.tx-bullet-chart__range[data-level=\"1\"]{fill-opacity:.24}.tx-bullet-chart__range[data-level=\"2\"]{fill-opacity:.16}.tx-bullet-chart__bar{fill:var(--tx-bullet-chart-own, currentColor);transform-box:fill-box;transform-origin:0 50%}.tx-bullet-chart__target{stroke:currentColor;stroke-width:2}.tx-bullet-chart__row{pointer-events:none}:host([data-styled]) .tx-bullet-chart__range{fill-opacity:1}:host([data-styled]) .tx-bullet-chart__range[data-level=\"1\"]{fill:var(--tx-chart-bullet-range-color1)}:host([data-styled]) .tx-bullet-chart__range[data-level=\"2\"]{fill:var(--tx-chart-bullet-range-color2)}:host([data-styled]) .tx-bullet-chart__range[data-level=\"3\"]{fill:var(--tx-chart-bullet-range-color3)}:host([data-styled]) .tx-bullet-chart__bar{fill:var(--tx-bullet-chart-own, var(--tx-chart-bullet-bar-color));clip-path:inset(0 round var(--tx-chart-bullet-bar-radius))}:host([data-styled]) .tx-bullet-chart__target{stroke:var(--tx-chart-bullet-target-color);stroke-width:var(--tx-chart-bullet-target-width);stroke-linecap:round}:host([data-styled]) .tx-bullet-chart__row{transition:opacity var(--tx-chart-motion-hover-duration) ease}:host([data-styled].tx-bullet-chart--active) .tx-bullet-chart__row:not(.tx-bullet-chart__row--active){opacity:var(--tx-chart-bullet-dimmed-opacity)}:host([data-styled].tx-bullet-chart--morph) .tx-bullet-chart__bar,:host([data-styled].tx-bullet-chart--morph) .tx-bullet-chart__range{transition:x var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),width var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-bullet-chart--entering) .tx-bullet-chart__bar{animation:tx-bullet-chart-grow var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both;animation-delay:calc(var(--tx-bullet-chart-order, 0) * var(--tx-chart-motion-stagger) * 2)}@keyframes tx-bullet-chart-grow{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-bullet-chart__row,:host([data-styled]) .tx-bullet-chart__bar,:host([data-styled]) .tx-bullet-chart__range,:host([data-styled]) .tx-bullet-chart__target{transition:none;animation:none}}\n"],
|
|
425
|
+
dependencies: [
|
|
426
|
+
{
|
|
427
|
+
kind: "component",
|
|
428
|
+
type: TxChartFrame,
|
|
429
|
+
selector: "tx-chart-frame",
|
|
430
|
+
inputs: [
|
|
431
|
+
"height",
|
|
432
|
+
"size",
|
|
433
|
+
"legendItems",
|
|
434
|
+
"showLegend",
|
|
435
|
+
"legendPosition",
|
|
436
|
+
"legendAlign",
|
|
437
|
+
"legendVariant",
|
|
438
|
+
"legendToggle",
|
|
439
|
+
"legendTemplate",
|
|
440
|
+
"empty",
|
|
441
|
+
"loading",
|
|
442
|
+
"emptyIcon",
|
|
443
|
+
"summary",
|
|
444
|
+
"table",
|
|
445
|
+
"tooltip",
|
|
446
|
+
"tooltipTemplate",
|
|
447
|
+
"tooltipPlacement",
|
|
448
|
+
"panelStyle",
|
|
449
|
+
"parts",
|
|
450
|
+
"styled",
|
|
451
|
+
"interactive",
|
|
452
|
+
"actionKeys",
|
|
453
|
+
"zoomable",
|
|
454
|
+
"zoomedIn",
|
|
455
|
+
"plotHeight",
|
|
456
|
+
"toolbar",
|
|
457
|
+
"exportName"
|
|
458
|
+
],
|
|
459
|
+
outputs: [
|
|
460
|
+
"sizeChange",
|
|
461
|
+
"pointer",
|
|
462
|
+
"navigate",
|
|
463
|
+
"legendToggled",
|
|
464
|
+
"legendHovered",
|
|
465
|
+
"tooltipClosed",
|
|
466
|
+
"zoomed",
|
|
467
|
+
"panned",
|
|
468
|
+
"zoomReset"
|
|
469
|
+
]
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
kind: "component",
|
|
473
|
+
type: TxChartAxes,
|
|
474
|
+
selector: "g[tx-chart-axes]",
|
|
475
|
+
inputs: [
|
|
476
|
+
"tx-chart-axes",
|
|
477
|
+
"gridPart",
|
|
478
|
+
"axisPart"
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
kind: "component",
|
|
483
|
+
type: TxChartHoverBand,
|
|
484
|
+
selector: "g[tx-chart-hover-band]",
|
|
485
|
+
inputs: ["tx-chart-hover-band", "part"]
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
489
|
+
});
|
|
490
|
+
};
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
492
|
+
minVersion: "12.0.0",
|
|
493
|
+
version: "22.2.3",
|
|
494
|
+
ngImport: i0,
|
|
495
|
+
type: TxBulletChart,
|
|
496
|
+
decorators: [{
|
|
497
|
+
type: Component,
|
|
498
|
+
args: [{
|
|
499
|
+
selector: "tx-bullet-chart",
|
|
500
|
+
imports: [
|
|
501
|
+
TxChartFrame,
|
|
502
|
+
TxChartAxes,
|
|
503
|
+
TxChartHoverBand
|
|
504
|
+
],
|
|
505
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
506
|
+
host: {
|
|
507
|
+
class: "tx-bullet-chart",
|
|
508
|
+
"[class]": "passThrough().root?.class",
|
|
509
|
+
"[style]": "hostStyle()",
|
|
510
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
511
|
+
"[class.tx-bullet-chart--fill]": "typeof height() === \"string\"",
|
|
512
|
+
"[class.tx-bullet-chart--entering]": "entrance.active()",
|
|
513
|
+
"[class.tx-bullet-chart--morph]": "morph()",
|
|
514
|
+
"[class.tx-bullet-chart--active]": "active() !== null"
|
|
515
|
+
},
|
|
516
|
+
template: "<tx-chart-frame\n [height]=\"frameHeight()\"\n [(size)]=\"size\"\n [showLegend]=\"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 @for (row of rows(); track row.key) {\n <svg:g\n class=\"tx-bullet-chart__row\"\n [class.tx-bullet-chart__row--active]=\"active() === row.index\"\n [attr.data-index]=\"row.index\"\n [style.--tx-bullet-chart-order]=\"row.index\"\n >\n @for (range of row.ranges; track range.key) {\n <svg:rect\n class=\"tx-bullet-chart__range\"\n [class]=\"passThrough().range?.class\"\n [style]=\"passThrough().range?.style\"\n [attr.data-level]=\"range.level\"\n [attr.x]=\"range.x\"\n [attr.y]=\"row.trackY\"\n [attr.width]=\"range.width\"\n [attr.height]=\"row.trackHeight\"\n />\n }\n @if (row.barWidth > 0) {\n <svg:rect\n class=\"tx-bullet-chart__bar\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.x]=\"row.barX\"\n [attr.y]=\"row.barY\"\n [attr.width]=\"row.barWidth\"\n [attr.height]=\"row.barHeight\"\n [style.--tx-bullet-chart-own]=\"row.color\"\n />\n }\n @if (row.targetX !== null) {\n <svg:line\n class=\"tx-bullet-chart__target\"\n [class]=\"passThrough().target?.class\"\n [style]=\"passThrough().target?.style\"\n [attr.x1]=\"row.targetX\"\n [attr.x2]=\"row.targetX\"\n [attr.y1]=\"row.targetY1\"\n [attr.y2]=\"row.targetY2\"\n />\n }\n </svg:g>\n }\n</tx-chart-frame>\n",
|
|
517
|
+
styles: [":host{display:block;min-width:0}:host(.tx-bullet-chart--fill){height:100%}.tx-bullet-chart__range{fill:currentColor;fill-opacity:.08}.tx-bullet-chart__range[data-level=\"1\"]{fill-opacity:.24}.tx-bullet-chart__range[data-level=\"2\"]{fill-opacity:.16}.tx-bullet-chart__bar{fill:var(--tx-bullet-chart-own, currentColor);transform-box:fill-box;transform-origin:0 50%}.tx-bullet-chart__target{stroke:currentColor;stroke-width:2}.tx-bullet-chart__row{pointer-events:none}:host([data-styled]) .tx-bullet-chart__range{fill-opacity:1}:host([data-styled]) .tx-bullet-chart__range[data-level=\"1\"]{fill:var(--tx-chart-bullet-range-color1)}:host([data-styled]) .tx-bullet-chart__range[data-level=\"2\"]{fill:var(--tx-chart-bullet-range-color2)}:host([data-styled]) .tx-bullet-chart__range[data-level=\"3\"]{fill:var(--tx-chart-bullet-range-color3)}:host([data-styled]) .tx-bullet-chart__bar{fill:var(--tx-bullet-chart-own, var(--tx-chart-bullet-bar-color));clip-path:inset(0 round var(--tx-chart-bullet-bar-radius))}:host([data-styled]) .tx-bullet-chart__target{stroke:var(--tx-chart-bullet-target-color);stroke-width:var(--tx-chart-bullet-target-width);stroke-linecap:round}:host([data-styled]) .tx-bullet-chart__row{transition:opacity var(--tx-chart-motion-hover-duration) ease}:host([data-styled].tx-bullet-chart--active) .tx-bullet-chart__row:not(.tx-bullet-chart__row--active){opacity:var(--tx-chart-bullet-dimmed-opacity)}:host([data-styled].tx-bullet-chart--morph) .tx-bullet-chart__bar,:host([data-styled].tx-bullet-chart--morph) .tx-bullet-chart__range{transition:x var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),width var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-bullet-chart--entering) .tx-bullet-chart__bar{animation:tx-bullet-chart-grow var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both;animation-delay:calc(var(--tx-bullet-chart-order, 0) * var(--tx-chart-motion-stagger) * 2)}@keyframes tx-bullet-chart-grow{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-bullet-chart__row,:host([data-styled]) .tx-bullet-chart__bar,:host([data-styled]) .tx-bullet-chart__range,:host([data-styled]) .tx-bullet-chart__target{transition:none;animation:none}}\n"]
|
|
518
|
+
}]
|
|
519
|
+
}],
|
|
520
|
+
ctorParameters: () => [],
|
|
521
|
+
propDecorators: {
|
|
522
|
+
items: [{
|
|
523
|
+
type: i0.Input,
|
|
524
|
+
args: [{
|
|
525
|
+
isSignal: true,
|
|
526
|
+
alias: "items",
|
|
527
|
+
required: false
|
|
528
|
+
}]
|
|
529
|
+
}],
|
|
530
|
+
ranges: [{
|
|
531
|
+
type: i0.Input,
|
|
532
|
+
args: [{
|
|
533
|
+
isSignal: true,
|
|
534
|
+
alias: "ranges",
|
|
535
|
+
required: false
|
|
536
|
+
}]
|
|
537
|
+
}],
|
|
538
|
+
min: [{
|
|
539
|
+
type: i0.Input,
|
|
540
|
+
args: [{
|
|
541
|
+
isSignal: true,
|
|
542
|
+
alias: "min",
|
|
543
|
+
required: false
|
|
544
|
+
}]
|
|
545
|
+
}],
|
|
546
|
+
max: [{
|
|
547
|
+
type: i0.Input,
|
|
548
|
+
args: [{
|
|
549
|
+
isSignal: true,
|
|
550
|
+
alias: "max",
|
|
551
|
+
required: false
|
|
552
|
+
}]
|
|
553
|
+
}],
|
|
554
|
+
height: [{
|
|
555
|
+
type: i0.Input,
|
|
556
|
+
args: [{
|
|
557
|
+
isSignal: true,
|
|
558
|
+
alias: "height",
|
|
559
|
+
required: false
|
|
560
|
+
}]
|
|
561
|
+
}],
|
|
562
|
+
showTooltip: [{
|
|
563
|
+
type: i0.Input,
|
|
564
|
+
args: [{
|
|
565
|
+
isSignal: true,
|
|
566
|
+
alias: "showTooltip",
|
|
567
|
+
required: false
|
|
568
|
+
}]
|
|
569
|
+
}],
|
|
570
|
+
valueFormat: [{
|
|
571
|
+
type: i0.Input,
|
|
572
|
+
args: [{
|
|
573
|
+
isSignal: true,
|
|
574
|
+
alias: "valueFormat",
|
|
575
|
+
required: false
|
|
576
|
+
}]
|
|
577
|
+
}],
|
|
578
|
+
grid: [{
|
|
579
|
+
type: i0.Input,
|
|
580
|
+
args: [{
|
|
581
|
+
isSignal: true,
|
|
582
|
+
alias: "grid",
|
|
583
|
+
required: false
|
|
584
|
+
}]
|
|
585
|
+
}],
|
|
586
|
+
maxLabelWidth: [{
|
|
587
|
+
type: i0.Input,
|
|
588
|
+
args: [{
|
|
589
|
+
isSignal: true,
|
|
590
|
+
alias: "maxLabelWidth",
|
|
591
|
+
required: false
|
|
592
|
+
}]
|
|
593
|
+
}],
|
|
594
|
+
toolbar: [{
|
|
595
|
+
type: i0.Input,
|
|
596
|
+
args: [{
|
|
597
|
+
isSignal: true,
|
|
598
|
+
alias: "toolbar",
|
|
599
|
+
required: false
|
|
600
|
+
}]
|
|
601
|
+
}],
|
|
602
|
+
loading: [{
|
|
603
|
+
type: i0.Input,
|
|
604
|
+
args: [{
|
|
605
|
+
isSignal: true,
|
|
606
|
+
alias: "loading",
|
|
607
|
+
required: false
|
|
608
|
+
}]
|
|
609
|
+
}],
|
|
610
|
+
ariaLabel: [{
|
|
611
|
+
type: i0.Input,
|
|
612
|
+
args: [{
|
|
613
|
+
isSignal: true,
|
|
614
|
+
alias: "ariaLabel",
|
|
615
|
+
required: false
|
|
616
|
+
}]
|
|
617
|
+
}],
|
|
618
|
+
dt: [{
|
|
619
|
+
type: i0.Input,
|
|
620
|
+
args: [{
|
|
621
|
+
isSignal: true,
|
|
622
|
+
alias: "dt",
|
|
623
|
+
required: false
|
|
624
|
+
}]
|
|
625
|
+
}],
|
|
626
|
+
pt: [{
|
|
627
|
+
type: i0.Input,
|
|
628
|
+
args: [{
|
|
629
|
+
isSignal: true,
|
|
630
|
+
alias: "pt",
|
|
631
|
+
required: false
|
|
632
|
+
}]
|
|
633
|
+
}],
|
|
634
|
+
ptOptions: [{
|
|
635
|
+
type: i0.Input,
|
|
636
|
+
args: [{
|
|
637
|
+
isSignal: true,
|
|
638
|
+
alias: "ptOptions",
|
|
639
|
+
required: false
|
|
640
|
+
}]
|
|
641
|
+
}],
|
|
642
|
+
unstyled: [{
|
|
643
|
+
type: i0.Input,
|
|
644
|
+
args: [{
|
|
645
|
+
isSignal: true,
|
|
646
|
+
alias: "unstyled",
|
|
647
|
+
required: false
|
|
648
|
+
}]
|
|
649
|
+
}],
|
|
650
|
+
barClick: [{
|
|
651
|
+
type: i0.Output,
|
|
652
|
+
args: ["barClick"]
|
|
653
|
+
}],
|
|
654
|
+
tooltipTemplate: [{
|
|
655
|
+
type: i0.ContentChild,
|
|
656
|
+
args: [i0.forwardRef(() => TxChartTooltipTemplate), { isSignal: true }]
|
|
657
|
+
}],
|
|
658
|
+
frame: [{
|
|
659
|
+
type: i0.ViewChild,
|
|
660
|
+
args: [i0.forwardRef(() => TxChartFrame), { isSignal: true }]
|
|
661
|
+
}]
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
export { TxBulletChart, bulletMax, bulletSegments };
|
|
665
|
+
|
|
666
|
+
//# sourceMappingURL=tectra-ng-charts-bullet.mjs.map
|