@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
|
@@ -2,9 +2,10 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from "@angular/core";
|
|
3
3
|
import { chartNumberFormatter } from "@tectra-ng/charts/core";
|
|
4
4
|
import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
|
|
5
|
-
import { TxLocaleService } from "@tectra-ng/core/i18n";
|
|
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
|
+
import { TxSkeleton } from "@tectra-ng/ui/skeleton";
|
|
8
9
|
import { provideTxIconDefaults, txIconDot, txIconInfo, txIconList } from "@tectra-ng/icons";
|
|
9
10
|
function segmentedBarSegments(items, format, percentFormat = format) {
|
|
10
11
|
const list = items ?? [];
|
|
@@ -31,9 +32,11 @@ const SEGMENTED_BAR_ICON_DEFAULTS = {
|
|
|
31
32
|
list: txIconList
|
|
32
33
|
};
|
|
33
34
|
const SEGMENTED_BAR_THEME = { chart: chartTokens };
|
|
35
|
+
const LEGEND_SKELETONS = 3;
|
|
34
36
|
var TxSegmentedBar = class TxSegmentedBar {
|
|
35
37
|
segmentedBarTheme = injectTokens(SEGMENTED_BAR_THEME);
|
|
36
38
|
locale = inject(TxLocaleService);
|
|
39
|
+
translations = injectTranslations();
|
|
37
40
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
38
41
|
size = input("small", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
39
42
|
showLegend = input(true, {
|
|
@@ -57,6 +60,10 @@ var TxSegmentedBar = class TxSegmentedBar {
|
|
|
57
60
|
transform: booleanAttribute
|
|
58
61
|
});
|
|
59
62
|
valueFormat = input("number", ...ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []);
|
|
63
|
+
loading = input(false, {
|
|
64
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
65
|
+
transform: booleanAttribute
|
|
66
|
+
});
|
|
60
67
|
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
61
68
|
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
62
69
|
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
@@ -75,13 +82,14 @@ var TxSegmentedBar = class TxSegmentedBar {
|
|
|
75
82
|
segments = computed(() => segmentedBarSegments(this.items(), chartNumberFormatter(this.intl(), this.valueFormat()), chartNumberFormatter(this.intl())), ...ngDevMode ? [{ debugName: "segments" }] : /* istanbul ignore next */ []);
|
|
76
83
|
barSegments = computed(() => this.segments().filter((segment) => !segment.isEmpty), ...ngDevMode ? [{ debugName: "barSegments" }] : /* istanbul ignore next */ []);
|
|
77
84
|
legendSegments = computed(() => this.hideEmptyInLegend() ? this.barSegments() : this.segments(), ...ngDevMode ? [{ debugName: "legendSegments" }] : /* istanbul ignore next */ []);
|
|
85
|
+
skeletonItems = computed(() => Array.from({ length: Math.min(LEGEND_SKELETONS, this.segments().length || LEGEND_SKELETONS) }, (_, index) => index), ...ngDevMode ? [{ debugName: "skeletonItems" }] : /* istanbul ignore next */ []);
|
|
78
86
|
summary = computed(() => {
|
|
79
87
|
const parts = this.segments().map((segment) => `${segment.label}: ${segment.value} (${segment.percent})`);
|
|
80
88
|
return [this.ariaLabel(), ...parts].filter(Boolean).join(", ");
|
|
81
89
|
}, ...ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []);
|
|
82
90
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
83
91
|
minVersion: "12.0.0",
|
|
84
|
-
version: "22.2.
|
|
92
|
+
version: "22.2.6",
|
|
85
93
|
ngImport: i0,
|
|
86
94
|
type: TxSegmentedBar,
|
|
87
95
|
deps: [],
|
|
@@ -89,7 +97,7 @@ var TxSegmentedBar = class TxSegmentedBar {
|
|
|
89
97
|
});
|
|
90
98
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
91
99
|
minVersion: "17.0.0",
|
|
92
|
-
version: "22.2.
|
|
100
|
+
version: "22.2.6",
|
|
93
101
|
type: TxSegmentedBar,
|
|
94
102
|
isStandalone: true,
|
|
95
103
|
selector: "tx-segmented-bar",
|
|
@@ -150,6 +158,13 @@ var TxSegmentedBar = class TxSegmentedBar {
|
|
|
150
158
|
isRequired: false,
|
|
151
159
|
transformFunction: null
|
|
152
160
|
},
|
|
161
|
+
loading: {
|
|
162
|
+
classPropertyName: "loading",
|
|
163
|
+
publicName: "loading",
|
|
164
|
+
isSignal: true,
|
|
165
|
+
isRequired: false,
|
|
166
|
+
transformFunction: null
|
|
167
|
+
},
|
|
153
168
|
ariaLabel: {
|
|
154
169
|
classPropertyName: "ariaLabel",
|
|
155
170
|
publicName: "ariaLabel",
|
|
@@ -192,26 +207,47 @@ var TxSegmentedBar = class TxSegmentedBar {
|
|
|
192
207
|
"style": "hostStyle()",
|
|
193
208
|
"attr.data-styled": "!isUnstyled() || null",
|
|
194
209
|
"attr.data-size": "size()",
|
|
195
|
-
"class.tx-segmented-bar--mono": "monoLabels()"
|
|
210
|
+
"class.tx-segmented-bar--mono": "monoLabels()",
|
|
211
|
+
"class.tx-segmented-bar--loading": "loading()",
|
|
212
|
+
"attr.aria-busy": "loading() || null"
|
|
196
213
|
},
|
|
197
214
|
classAttribute: "tx-segmented-bar"
|
|
198
215
|
},
|
|
199
216
|
ngImport: i0,
|
|
200
|
-
template: "@let parts = passThrough();\n
|
|
201
|
-
styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-segmented-bar__track{display:flex;overflow:hidden}.tx-segmented-bar__segment{display:block;height:100%}.tx-segmented-bar__legend{display:flex;flex-wrap:wrap;align-items:center}.tx-segmented-bar__legend-item{display:inline-flex;align-items:center}.tx-segmented-bar__dot{flex-shrink:0}.tx-segmented-bar__aside{display:inline-flex;align-items:center;margin-inline-start:auto}.tx-segmented-bar__aside:empty{display:none}:host([data-styled]){gap:var(--tx-chart-segmented-bar-gap)}:host([data-styled]) [data-tone]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-primary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-primary-text)}:host([data-styled]) [data-tone=secondary]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-secondary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-secondary-text)}:host([data-styled]) [data-tone=success]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-success-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-success-text)}:host([data-styled]) [data-tone=info]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-info-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-info-text)}:host([data-styled]) [data-tone=warn]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-warn-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-warn-text)}:host([data-styled]) [data-tone=danger]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-danger-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-danger-text)}:host([data-styled]) [data-tone=neutral]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-neutral-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-neutral-text)}:host([data-styled]) .tx-segmented-bar__track{gap:var(--tx-chart-segmented-bar-track-gap);height:var(--tx-chart-segmented-bar-track-height);border-radius:var(--tx-chart-segmented-bar-track-radius);background:var(--tx-chart-segmented-bar-track-background)}:host([data-styled]) .tx-segmented-bar__segment{min-width:var(--tx-chart-segmented-bar-segment-min-width);background:var(--tx-segmented-bar-tone);transition:width var(--tx-chart-segmented-bar-duration) ease}:host([data-styled]) .tx-segmented-bar__segment:first-child{border-start-start-radius:var(--tx-chart-segmented-bar-track-radius);border-end-start-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__segment:last-child{border-start-end-radius:var(--tx-chart-segmented-bar-track-radius);border-end-end-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-legend-gap-x);row-gap:var(--tx-chart-segmented-bar-legend-gap-y);font-size:var(--tx-chart-segmented-bar-legend-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-segmented-bar__legend-item{gap:var(--tx-chart-segmented-bar-legend-item-gap)}:host([data-styled]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-dot-size);height:var(--tx-chart-segmented-bar-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-segmented-bar-tone)}:host([data-styled]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-label-color)}:host([data-styled]) .tx-segmented-bar__value{color:var(--tx-chart-segmented-bar-value-color);font-weight:var(--tx-chart-segmented-bar-value-font-weight)}:host([data-styled]) .tx-segmented-bar__percent{color:var(--tx-chart-segmented-bar-percent-color)}:host([data-styled]) .tx-segmented-bar__aside{gap:var(--tx-chart-segmented-bar-legend-item-gap);color:var(--tx-chart-segmented-bar-aside-color)}:host([data-styled].tx-segmented-bar--mono) .tx-segmented-bar__label{font-family:var(--tx-chart-segmented-bar-mono-font-family)}:host([data-styled][data-size=large]){gap:var(--tx-chart-segmented-bar-large-gap)}:host([data-styled][data-size=large]) .tx-segmented-bar__track{height:var(--tx-chart-segmented-bar-large-track-height);border-radius:var(--tx-chart-segmented-bar-large-track-radius)}:host([data-styled][data-size=large]) .tx-segmented-bar__segment{display:flex;align-items:center;justify-content:center;min-width:var(--tx-chart-segmented-bar-large-segment-min-width);border-radius:0;color:var(--tx-segmented-bar-tone-text);font-size:var(--tx-chart-segmented-bar-large-segment-font-size);font-weight:var(--tx-chart-segmented-bar-large-segment-font-weight);font-variant-numeric:tabular-nums}:host([data-styled][data-size=large]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-large-legend-gap-x);font-size:var(--tx-chart-segmented-bar-large-legend-font-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-large-dot-size);height:var(--tx-chart-segmented-bar-large-dot-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-large-label-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-segmented-bar__segment{transition:none}}\n"],
|
|
217
|
+
template: "@let parts = passThrough();\n@if (loading()) {\n <div class=\"tx-segmented-bar__track\" [class]=\"parts.track?.class\" [style]=\"parts.track?.style\" role=\"img\" [attr.aria-label]=\"translations().chartLoading\">\n <tx-skeleton class=\"tx-segmented-bar__skeleton\" [class]=\"parts.skeleton?.class\" [style]=\"parts.skeleton?.style\" width=\"100%\" height=\"100%\" borderRadius=\"inherit\" />\n </div>\n @if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" aria-hidden=\"true\">\n @for (index of skeletonItems(); track index) {\n <span class=\"tx-segmented-bar__legend-item\" [class]=\"parts.legendItem?.class\" [style]=\"parts.legendItem?.style\">\n <tx-skeleton class=\"tx-segmented-bar__legend-skeleton\" [class]=\"parts.skeleton?.class\" [style]=\"parts.skeleton?.style\" width=\"5em\" height=\"1lh\" />\n </span>\n }\n </div>\n }\n} @else {\n <div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n >\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n </div>\n\n @if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>\n }\n}\n",
|
|
218
|
+
styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-segmented-bar__track{display:flex;overflow:hidden}.tx-segmented-bar__segment{display:block;height:100%}.tx-segmented-bar__skeleton{display:block;flex:1;height:100%}.tx-segmented-bar__legend{display:flex;flex-wrap:wrap;align-items:center}.tx-segmented-bar__legend-item{display:inline-flex;align-items:center}.tx-segmented-bar__dot{flex-shrink:0}.tx-segmented-bar__aside{display:inline-flex;align-items:center;margin-inline-start:auto}.tx-segmented-bar__aside:empty{display:none}:host([data-styled]){gap:var(--tx-chart-segmented-bar-gap)}:host([data-styled]) [data-tone]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-primary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-primary-text)}:host([data-styled]) [data-tone=secondary]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-secondary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-secondary-text)}:host([data-styled]) [data-tone=success]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-success-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-success-text)}:host([data-styled]) [data-tone=info]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-info-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-info-text)}:host([data-styled]) [data-tone=warn]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-warn-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-warn-text)}:host([data-styled]) [data-tone=danger]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-danger-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-danger-text)}:host([data-styled]) [data-tone=neutral]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-neutral-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-neutral-text)}:host([data-styled]) .tx-segmented-bar__track{gap:var(--tx-chart-segmented-bar-track-gap);height:var(--tx-chart-segmented-bar-track-height);border-radius:var(--tx-chart-segmented-bar-track-radius);background:var(--tx-chart-segmented-bar-track-background)}:host([data-styled]) .tx-segmented-bar__segment{min-width:var(--tx-chart-segmented-bar-segment-min-width);background:var(--tx-segmented-bar-tone);transition:width var(--tx-chart-segmented-bar-duration) ease}:host([data-styled]) .tx-segmented-bar__segment:first-child{border-start-start-radius:var(--tx-chart-segmented-bar-track-radius);border-end-start-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__segment:last-child{border-start-end-radius:var(--tx-chart-segmented-bar-track-radius);border-end-end-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-legend-gap-x);row-gap:var(--tx-chart-segmented-bar-legend-gap-y);font-size:var(--tx-chart-segmented-bar-legend-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-segmented-bar__legend-item{gap:var(--tx-chart-segmented-bar-legend-item-gap)}:host([data-styled]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-dot-size);height:var(--tx-chart-segmented-bar-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-segmented-bar-tone)}:host([data-styled]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-label-color)}:host([data-styled]) .tx-segmented-bar__value{color:var(--tx-chart-segmented-bar-value-color);font-weight:var(--tx-chart-segmented-bar-value-font-weight)}:host([data-styled]) .tx-segmented-bar__percent{color:var(--tx-chart-segmented-bar-percent-color)}:host([data-styled]) .tx-segmented-bar__aside{gap:var(--tx-chart-segmented-bar-legend-item-gap);color:var(--tx-chart-segmented-bar-aside-color)}:host([data-styled].tx-segmented-bar--mono) .tx-segmented-bar__label{font-family:var(--tx-chart-segmented-bar-mono-font-family)}:host([data-styled][data-size=large]){gap:var(--tx-chart-segmented-bar-large-gap)}:host([data-styled][data-size=large]) .tx-segmented-bar__track{height:var(--tx-chart-segmented-bar-large-track-height);border-radius:var(--tx-chart-segmented-bar-large-track-radius)}:host([data-styled][data-size=large]) .tx-segmented-bar__segment{display:flex;align-items:center;justify-content:center;min-width:var(--tx-chart-segmented-bar-large-segment-min-width);border-radius:0;color:var(--tx-segmented-bar-tone-text);font-size:var(--tx-chart-segmented-bar-large-segment-font-size);font-weight:var(--tx-chart-segmented-bar-large-segment-font-weight);font-variant-numeric:tabular-nums}:host([data-styled][data-size=large]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-large-legend-gap-x);font-size:var(--tx-chart-segmented-bar-large-legend-font-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-large-dot-size);height:var(--tx-chart-segmented-bar-large-dot-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-large-label-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-segmented-bar__segment{transition:none}}\n"],
|
|
219
|
+
dependencies: [{
|
|
220
|
+
kind: "component",
|
|
221
|
+
type: TxSkeleton,
|
|
222
|
+
selector: "tx-skeleton",
|
|
223
|
+
inputs: [
|
|
224
|
+
"shape",
|
|
225
|
+
"size",
|
|
226
|
+
"width",
|
|
227
|
+
"height",
|
|
228
|
+
"borderRadius",
|
|
229
|
+
"lines",
|
|
230
|
+
"animation",
|
|
231
|
+
"dt",
|
|
232
|
+
"pt",
|
|
233
|
+
"ptOptions",
|
|
234
|
+
"unstyled"
|
|
235
|
+
]
|
|
236
|
+
}],
|
|
202
237
|
viewProviders: [provideTxIconDefaults(SEGMENTED_BAR_ICON_DEFAULTS)],
|
|
203
238
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
204
239
|
});
|
|
205
240
|
};
|
|
206
241
|
i0.ɵɵngDeclareClassMetadata({
|
|
207
242
|
minVersion: "12.0.0",
|
|
208
|
-
version: "22.2.
|
|
243
|
+
version: "22.2.6",
|
|
209
244
|
ngImport: i0,
|
|
210
245
|
type: TxSegmentedBar,
|
|
211
246
|
decorators: [{
|
|
212
247
|
type: Component,
|
|
213
248
|
args: [{
|
|
214
249
|
selector: "tx-segmented-bar",
|
|
250
|
+
imports: [TxSkeleton],
|
|
215
251
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
216
252
|
host: {
|
|
217
253
|
class: "tx-segmented-bar",
|
|
@@ -219,11 +255,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
219
255
|
"[style]": "hostStyle()",
|
|
220
256
|
"[attr.data-styled]": "!isUnstyled() || null",
|
|
221
257
|
"[attr.data-size]": "size()",
|
|
222
|
-
"[class.tx-segmented-bar--mono]": "monoLabels()"
|
|
258
|
+
"[class.tx-segmented-bar--mono]": "monoLabels()",
|
|
259
|
+
"[class.tx-segmented-bar--loading]": "loading()",
|
|
260
|
+
"[attr.aria-busy]": "loading() || null"
|
|
223
261
|
},
|
|
224
262
|
viewProviders: [provideTxIconDefaults(SEGMENTED_BAR_ICON_DEFAULTS)],
|
|
225
|
-
template: "@let parts = passThrough();\n
|
|
226
|
-
styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-segmented-bar__track{display:flex;overflow:hidden}.tx-segmented-bar__segment{display:block;height:100%}.tx-segmented-bar__legend{display:flex;flex-wrap:wrap;align-items:center}.tx-segmented-bar__legend-item{display:inline-flex;align-items:center}.tx-segmented-bar__dot{flex-shrink:0}.tx-segmented-bar__aside{display:inline-flex;align-items:center;margin-inline-start:auto}.tx-segmented-bar__aside:empty{display:none}:host([data-styled]){gap:var(--tx-chart-segmented-bar-gap)}:host([data-styled]) [data-tone]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-primary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-primary-text)}:host([data-styled]) [data-tone=secondary]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-secondary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-secondary-text)}:host([data-styled]) [data-tone=success]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-success-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-success-text)}:host([data-styled]) [data-tone=info]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-info-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-info-text)}:host([data-styled]) [data-tone=warn]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-warn-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-warn-text)}:host([data-styled]) [data-tone=danger]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-danger-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-danger-text)}:host([data-styled]) [data-tone=neutral]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-neutral-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-neutral-text)}:host([data-styled]) .tx-segmented-bar__track{gap:var(--tx-chart-segmented-bar-track-gap);height:var(--tx-chart-segmented-bar-track-height);border-radius:var(--tx-chart-segmented-bar-track-radius);background:var(--tx-chart-segmented-bar-track-background)}:host([data-styled]) .tx-segmented-bar__segment{min-width:var(--tx-chart-segmented-bar-segment-min-width);background:var(--tx-segmented-bar-tone);transition:width var(--tx-chart-segmented-bar-duration) ease}:host([data-styled]) .tx-segmented-bar__segment:first-child{border-start-start-radius:var(--tx-chart-segmented-bar-track-radius);border-end-start-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__segment:last-child{border-start-end-radius:var(--tx-chart-segmented-bar-track-radius);border-end-end-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-legend-gap-x);row-gap:var(--tx-chart-segmented-bar-legend-gap-y);font-size:var(--tx-chart-segmented-bar-legend-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-segmented-bar__legend-item{gap:var(--tx-chart-segmented-bar-legend-item-gap)}:host([data-styled]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-dot-size);height:var(--tx-chart-segmented-bar-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-segmented-bar-tone)}:host([data-styled]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-label-color)}:host([data-styled]) .tx-segmented-bar__value{color:var(--tx-chart-segmented-bar-value-color);font-weight:var(--tx-chart-segmented-bar-value-font-weight)}:host([data-styled]) .tx-segmented-bar__percent{color:var(--tx-chart-segmented-bar-percent-color)}:host([data-styled]) .tx-segmented-bar__aside{gap:var(--tx-chart-segmented-bar-legend-item-gap);color:var(--tx-chart-segmented-bar-aside-color)}:host([data-styled].tx-segmented-bar--mono) .tx-segmented-bar__label{font-family:var(--tx-chart-segmented-bar-mono-font-family)}:host([data-styled][data-size=large]){gap:var(--tx-chart-segmented-bar-large-gap)}:host([data-styled][data-size=large]) .tx-segmented-bar__track{height:var(--tx-chart-segmented-bar-large-track-height);border-radius:var(--tx-chart-segmented-bar-large-track-radius)}:host([data-styled][data-size=large]) .tx-segmented-bar__segment{display:flex;align-items:center;justify-content:center;min-width:var(--tx-chart-segmented-bar-large-segment-min-width);border-radius:0;color:var(--tx-segmented-bar-tone-text);font-size:var(--tx-chart-segmented-bar-large-segment-font-size);font-weight:var(--tx-chart-segmented-bar-large-segment-font-weight);font-variant-numeric:tabular-nums}:host([data-styled][data-size=large]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-large-legend-gap-x);font-size:var(--tx-chart-segmented-bar-large-legend-font-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-large-dot-size);height:var(--tx-chart-segmented-bar-large-dot-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-large-label-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-segmented-bar__segment{transition:none}}\n"]
|
|
263
|
+
template: "@let parts = passThrough();\n@if (loading()) {\n <div class=\"tx-segmented-bar__track\" [class]=\"parts.track?.class\" [style]=\"parts.track?.style\" role=\"img\" [attr.aria-label]=\"translations().chartLoading\">\n <tx-skeleton class=\"tx-segmented-bar__skeleton\" [class]=\"parts.skeleton?.class\" [style]=\"parts.skeleton?.style\" width=\"100%\" height=\"100%\" borderRadius=\"inherit\" />\n </div>\n @if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" aria-hidden=\"true\">\n @for (index of skeletonItems(); track index) {\n <span class=\"tx-segmented-bar__legend-item\" [class]=\"parts.legendItem?.class\" [style]=\"parts.legendItem?.style\">\n <tx-skeleton class=\"tx-segmented-bar__legend-skeleton\" [class]=\"parts.skeleton?.class\" [style]=\"parts.skeleton?.style\" width=\"5em\" height=\"1lh\" />\n </span>\n }\n </div>\n }\n} @else {\n <div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n >\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n </div>\n\n @if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>\n }\n}\n",
|
|
264
|
+
styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-segmented-bar__track{display:flex;overflow:hidden}.tx-segmented-bar__segment{display:block;height:100%}.tx-segmented-bar__skeleton{display:block;flex:1;height:100%}.tx-segmented-bar__legend{display:flex;flex-wrap:wrap;align-items:center}.tx-segmented-bar__legend-item{display:inline-flex;align-items:center}.tx-segmented-bar__dot{flex-shrink:0}.tx-segmented-bar__aside{display:inline-flex;align-items:center;margin-inline-start:auto}.tx-segmented-bar__aside:empty{display:none}:host([data-styled]){gap:var(--tx-chart-segmented-bar-gap)}:host([data-styled]) [data-tone]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-primary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-primary-text)}:host([data-styled]) [data-tone=secondary]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-secondary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-secondary-text)}:host([data-styled]) [data-tone=success]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-success-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-success-text)}:host([data-styled]) [data-tone=info]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-info-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-info-text)}:host([data-styled]) [data-tone=warn]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-warn-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-warn-text)}:host([data-styled]) [data-tone=danger]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-danger-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-danger-text)}:host([data-styled]) [data-tone=neutral]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-neutral-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-neutral-text)}:host([data-styled]) .tx-segmented-bar__track{gap:var(--tx-chart-segmented-bar-track-gap);height:var(--tx-chart-segmented-bar-track-height);border-radius:var(--tx-chart-segmented-bar-track-radius);background:var(--tx-chart-segmented-bar-track-background)}:host([data-styled]) .tx-segmented-bar__segment{min-width:var(--tx-chart-segmented-bar-segment-min-width);background:var(--tx-segmented-bar-tone);transition:width var(--tx-chart-segmented-bar-duration) ease}:host([data-styled]) .tx-segmented-bar__segment:first-child{border-start-start-radius:var(--tx-chart-segmented-bar-track-radius);border-end-start-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__segment:last-child{border-start-end-radius:var(--tx-chart-segmented-bar-track-radius);border-end-end-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-legend-gap-x);row-gap:var(--tx-chart-segmented-bar-legend-gap-y);font-size:var(--tx-chart-segmented-bar-legend-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-segmented-bar__legend-item{gap:var(--tx-chart-segmented-bar-legend-item-gap)}:host([data-styled]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-dot-size);height:var(--tx-chart-segmented-bar-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-segmented-bar-tone)}:host([data-styled]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-label-color)}:host([data-styled]) .tx-segmented-bar__value{color:var(--tx-chart-segmented-bar-value-color);font-weight:var(--tx-chart-segmented-bar-value-font-weight)}:host([data-styled]) .tx-segmented-bar__percent{color:var(--tx-chart-segmented-bar-percent-color)}:host([data-styled]) .tx-segmented-bar__aside{gap:var(--tx-chart-segmented-bar-legend-item-gap);color:var(--tx-chart-segmented-bar-aside-color)}:host([data-styled].tx-segmented-bar--mono) .tx-segmented-bar__label{font-family:var(--tx-chart-segmented-bar-mono-font-family)}:host([data-styled][data-size=large]){gap:var(--tx-chart-segmented-bar-large-gap)}:host([data-styled][data-size=large]) .tx-segmented-bar__track{height:var(--tx-chart-segmented-bar-large-track-height);border-radius:var(--tx-chart-segmented-bar-large-track-radius)}:host([data-styled][data-size=large]) .tx-segmented-bar__segment{display:flex;align-items:center;justify-content:center;min-width:var(--tx-chart-segmented-bar-large-segment-min-width);border-radius:0;color:var(--tx-segmented-bar-tone-text);font-size:var(--tx-chart-segmented-bar-large-segment-font-size);font-weight:var(--tx-chart-segmented-bar-large-segment-font-weight);font-variant-numeric:tabular-nums}:host([data-styled][data-size=large]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-large-legend-gap-x);font-size:var(--tx-chart-segmented-bar-large-legend-font-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-large-dot-size);height:var(--tx-chart-segmented-bar-large-dot-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-large-label-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-segmented-bar__segment{transition:none}}\n"]
|
|
227
265
|
}]
|
|
228
266
|
}],
|
|
229
267
|
propDecorators: {
|
|
@@ -291,6 +329,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
291
329
|
required: false
|
|
292
330
|
}]
|
|
293
331
|
}],
|
|
332
|
+
loading: [{
|
|
333
|
+
type: i0.Input,
|
|
334
|
+
args: [{
|
|
335
|
+
isSignal: true,
|
|
336
|
+
alias: "loading",
|
|
337
|
+
required: false
|
|
338
|
+
}]
|
|
339
|
+
}],
|
|
294
340
|
ariaLabel: [{
|
|
295
341
|
type: i0.Input,
|
|
296
342
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-charts-segmented-bar.mjs","names":[],"sources":["../../../../packages/charts/segmented-bar/src/segmented-bar-segments.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.icons.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.theme.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.html"],"sourcesContent":["import { TxChartValueFormatter } from '@tectra-ng/charts/core';\nimport { TxSegmentedBarItem, TxSegmentedBarSegment } from './segmented-bar.types';\n\n/**\n * Turns items into segments with shares and formatted value and percent texts; `percentFormat` defaults to `format`.\n */\nexport function segmentedBarSegments(\n items: readonly TxSegmentedBarItem[] | null | undefined,\n format: TxChartValueFormatter,\n percentFormat: TxChartValueFormatter = format,\n): TxSegmentedBarSegment[] {\n const list = items ?? [];\n const positive = (value: number) => (Number.isFinite(value) ? Math.max(value, 0) : 0);\n const total = list.reduce((sum, item) => sum + positive(item.value), 0);\n return list.map((item) => {\n const value = positive(item.value);\n const share = total ? (value / total) * 100 : 0;\n return {\n key: item.key,\n label: item.label,\n raw: value,\n value: format(value),\n share,\n percent: `${percentFormat(Math.round(share * 10) / 10)}%`,\n tone: item.tone ?? 'primary',\n isEmpty: value === 0,\n };\n });\n}\n","import { TxIconSet, txIconDot, txIconInfo, txIconList } from '@tectra-ng/icons';\n\nexport const SEGMENTED_BAR_ICON_DEFAULTS: TxIconSet = {\n dot: txIconDot,\n info: txIconInfo,\n list: txIconList,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const SEGMENTED_BAR_THEME = {\n chart: chartTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { TxChartValueFormat, chartNumberFormatter } from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { segmentedBarSegments } from './segmented-bar-segments';\nimport { TxSegmentedBarItem, TxSegmentedBarPart, TxSegmentedBarSize } from './segmented-bar.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { SEGMENTED_BAR_ICON_DEFAULTS } from './segmented-bar.icons';\nimport { SEGMENTED_BAR_THEME } from './segmented-bar.theme';\n\n@Component({\n selector: 'tx-segmented-bar',\n templateUrl: './segmented-bar.component.html',\n styleUrl: './segmented-bar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-segmented-bar',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[class.tx-segmented-bar--mono]': 'monoLabels()',\n },\n viewProviders: [provideTxIconDefaults(SEGMENTED_BAR_ICON_DEFAULTS)],\n})\nexport class TxSegmentedBar {\n private readonly segmentedBarTheme = injectTokens(SEGMENTED_BAR_THEME);\n\n private locale = inject(TxLocaleService);\n\n readonly items = input<readonly TxSegmentedBarItem[] | null | undefined>([]);\n readonly size = input<TxSegmentedBarSize>('small');\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValue = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showPercent = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly hideEmptyInLegend = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly monoLabels = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxSegmentedBarPart, TxSegmentedBar> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('segmentedBar', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly segments = computed(() =>\n segmentedBarSegments(this.items(), chartNumberFormatter(this.intl(), this.valueFormat()), chartNumberFormatter(this.intl())),\n );\n readonly barSegments = computed(() => this.segments().filter((segment) => !segment.isEmpty));\n readonly legendSegments = computed(() => (this.hideEmptyInLegend() ? this.barSegments() : this.segments()));\n readonly summary = computed(() => {\n const parts = this.segments().map((segment) => `${segment.label}: ${segment.value} (${segment.percent})`);\n return [this.ariaLabel(), ...parts].filter(Boolean).join(', ');\n });\n}\n","@let parts = passThrough();\n<div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n>\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n</div>\n\n@if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>\n}\n"],"mappings":";;;;;;;;AAMA,SAAgB,qBACd,OACA,QACA,gBAAuC,QAAM;CAE7C,MAAM,OAAO,SAAS,CAAA;CACtB,MAAM,YAAY,UAAmB,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI;CACnF,MAAM,QAAQ,KAAK,QAAQ,KAAK,SAAS,MAAM,SAAS,KAAK,KAAK,GAAG,CAAC;CACtE,OAAO,KAAK,KAAK,SAAQ;EACvB,MAAM,QAAQ,SAAS,KAAK,KAAK;EACjC,MAAM,QAAQ,QAAS,QAAQ,QAAS,MAAM;EAC9C,OAA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AA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,IAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,IAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,kBAAA;IAAA,gCAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UC3B3B;EAgDA,QAAA,CAAA,k8JAAA;EAAA,eDvBiB,CAAC,sBAAsB,2BAA2B,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAExD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAf1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,iBAGX,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,kCAAkC;GACnC;GAAA,eACc,CAAC,sBAAsB,2BAA2B,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,k8JAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-charts-segmented-bar.mjs","names":[],"sources":["../../../../packages/charts/segmented-bar/src/segmented-bar-segments.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.icons.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.theme.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.html"],"sourcesContent":["import { TxChartValueFormatter } from '@tectra-ng/charts/core';\nimport { TxSegmentedBarItem, TxSegmentedBarSegment } from './segmented-bar.types';\n\n/**\n * Turns items into segments with shares and formatted value and percent texts; `percentFormat` defaults to `format`.\n */\nexport function segmentedBarSegments(\n items: readonly TxSegmentedBarItem[] | null | undefined,\n format: TxChartValueFormatter,\n percentFormat: TxChartValueFormatter = format,\n): TxSegmentedBarSegment[] {\n const list = items ?? [];\n const positive = (value: number) => (Number.isFinite(value) ? Math.max(value, 0) : 0);\n const total = list.reduce((sum, item) => sum + positive(item.value), 0);\n return list.map((item) => {\n const value = positive(item.value);\n const share = total ? (value / total) * 100 : 0;\n return {\n key: item.key,\n label: item.label,\n raw: value,\n value: format(value),\n share,\n percent: `${percentFormat(Math.round(share * 10) / 10)}%`,\n tone: item.tone ?? 'primary',\n isEmpty: value === 0,\n };\n });\n}\n","import { TxIconSet, txIconDot, txIconInfo, txIconList } from '@tectra-ng/icons';\n\nexport const SEGMENTED_BAR_ICON_DEFAULTS: TxIconSet = {\n dot: txIconDot,\n info: txIconInfo,\n list: txIconList,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const SEGMENTED_BAR_THEME = {\n chart: chartTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { TxChartValueFormat, chartNumberFormatter } 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 { TxSkeleton } from '@tectra-ng/ui/skeleton';\nimport { segmentedBarSegments } from './segmented-bar-segments';\nimport { TxSegmentedBarItem, TxSegmentedBarPart, TxSegmentedBarSize } from './segmented-bar.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { SEGMENTED_BAR_ICON_DEFAULTS } from './segmented-bar.icons';\nimport { SEGMENTED_BAR_THEME } from './segmented-bar.theme';\n\nconst LEGEND_SKELETONS = 3;\n\n@Component({\n selector: 'tx-segmented-bar',\n imports: [TxSkeleton],\n templateUrl: './segmented-bar.component.html',\n styleUrl: './segmented-bar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-segmented-bar',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[class.tx-segmented-bar--mono]': 'monoLabels()',\n '[class.tx-segmented-bar--loading]': 'loading()',\n '[attr.aria-busy]': 'loading() || null',\n },\n viewProviders: [provideTxIconDefaults(SEGMENTED_BAR_ICON_DEFAULTS)],\n})\nexport class TxSegmentedBar {\n private readonly segmentedBarTheme = injectTokens(SEGMENTED_BAR_THEME);\n\n private locale = inject(TxLocaleService);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxSegmentedBarItem[] | null | undefined>([]);\n readonly size = input<TxSegmentedBarSize>('small');\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValue = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showPercent = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly hideEmptyInLegend = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly monoLabels = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\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<TxSegmentedBarPart, TxSegmentedBar> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('segmentedBar', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly segments = computed(() =>\n segmentedBarSegments(this.items(), chartNumberFormatter(this.intl(), this.valueFormat()), chartNumberFormatter(this.intl())),\n );\n readonly barSegments = computed(() => this.segments().filter((segment) => !segment.isEmpty));\n readonly legendSegments = computed(() => (this.hideEmptyInLegend() ? this.barSegments() : this.segments()));\n readonly skeletonItems = computed(() => Array.from({ length: Math.min(LEGEND_SKELETONS, this.segments().length || LEGEND_SKELETONS) }, (_, index) => index));\n readonly summary = computed(() => {\n const parts = this.segments().map((segment) => `${segment.label}: ${segment.value} (${segment.percent})`);\n return [this.ariaLabel(), ...parts].filter(Boolean).join(', ');\n });\n}\n","@let parts = passThrough();\n@if (loading()) {\n <div class=\"tx-segmented-bar__track\" [class]=\"parts.track?.class\" [style]=\"parts.track?.style\" role=\"img\" [attr.aria-label]=\"translations().chartLoading\">\n <tx-skeleton class=\"tx-segmented-bar__skeleton\" [class]=\"parts.skeleton?.class\" [style]=\"parts.skeleton?.style\" width=\"100%\" height=\"100%\" borderRadius=\"inherit\" />\n </div>\n @if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" aria-hidden=\"true\">\n @for (index of skeletonItems(); track index) {\n <span class=\"tx-segmented-bar__legend-item\" [class]=\"parts.legendItem?.class\" [style]=\"parts.legendItem?.style\">\n <tx-skeleton class=\"tx-segmented-bar__legend-skeleton\" [class]=\"parts.skeleton?.class\" [style]=\"parts.skeleton?.style\" width=\"5em\" height=\"1lh\" />\n </span>\n }\n </div>\n }\n} @else {\n <div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n >\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n </div>\n\n @if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>\n }\n}\n"],"mappings":";;;;;;;;;AAMA,SAAgB,qBACd,OACA,QACA,gBAAuC,QAAM;CAE7C,MAAM,OAAO,SAAS,CAAA;CACtB,MAAM,YAAY,UAAmB,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI;CACnF,MAAM,QAAQ,KAAK,QAAQ,KAAK,SAAS,MAAM,SAAS,KAAK,KAAK,GAAG,CAAC;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IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,eAcL,CAAC,sBAAsB,2BAA2B,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAExD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAlB1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,SACnB,CAAC,UAAU;GAAC,iBAGJ,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,kCAAkC;IAClC,qCAAqC;IACrC,oBAAoB;GACrB;GAAA,eACc,CAAC,sBAAsB,2BAA2B,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,+/JAAA;EAAA,CAAA"}
|
|
@@ -73,6 +73,30 @@ function sunburstArcAt(arcs, x, y, cx, cy) {
|
|
|
73
73
|
if (angle < 0) angle += TX_FULL_CIRCLE;
|
|
74
74
|
return arcs.find((arc) => distance >= arc.inner && distance <= arc.outer && angle >= arc.start && angle < arc.end) ?? null;
|
|
75
75
|
}
|
|
76
|
+
function sunburstLabelFits(arc, box, cx, cy, padding = 1) {
|
|
77
|
+
const halfWidth = box.width / 2 + padding;
|
|
78
|
+
const halfHeight = box.height / 2 + padding;
|
|
79
|
+
const fullCircle = arc.end - arc.start >= TX_FULL_CIRCLE - 1e-9;
|
|
80
|
+
const steps = 6;
|
|
81
|
+
for (let step = 0; step <= steps; step++) {
|
|
82
|
+
const along = -1 + 2 * step / steps;
|
|
83
|
+
const points = [
|
|
84
|
+
[box.x + along * halfWidth, box.y - halfHeight],
|
|
85
|
+
[box.x + along * halfWidth, box.y + halfHeight],
|
|
86
|
+
[box.x - halfWidth, box.y + along * halfHeight],
|
|
87
|
+
[box.x + halfWidth, box.y + along * halfHeight]
|
|
88
|
+
];
|
|
89
|
+
for (const [px, py] of points) {
|
|
90
|
+
const distance = Math.hypot(px - cx, py - cy);
|
|
91
|
+
if (distance < arc.inner || distance > arc.outer) return false;
|
|
92
|
+
if (fullCircle) continue;
|
|
93
|
+
let angle = Math.atan2(px - cx, -(py - cy));
|
|
94
|
+
if (angle < 0) angle += TX_FULL_CIRCLE;
|
|
95
|
+
if (angle < arc.start || angle > arc.end) return false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
76
100
|
const SUNBURST_ICON_DEFAULTS = { "chart-pie": txIconChartPie };
|
|
77
101
|
const SUNBURST_THEME = { chart: chartTokens };
|
|
78
102
|
const DEFAULTS = {
|
|
@@ -180,8 +204,12 @@ var TxSunburstChart = class TxSunburstChart {
|
|
|
180
204
|
const middle = (arc.start + arc.end) / 2;
|
|
181
205
|
const radius = (arc.inner + arc.outer) / 2;
|
|
182
206
|
const at = polar(cx, cy, radius, middle);
|
|
183
|
-
const
|
|
184
|
-
|
|
207
|
+
const fits = this.showLabels() && sunburstLabelFits(arc, {
|
|
208
|
+
x: at.x,
|
|
209
|
+
y: at.y,
|
|
210
|
+
width: textWidth(arc.label, fontSize),
|
|
211
|
+
height: fontSize
|
|
212
|
+
}, cx, cy);
|
|
185
213
|
return {
|
|
186
214
|
...arc,
|
|
187
215
|
d: arcPath(cx, cy, arc.inner, arc.outer, arc.start, arc.end, corner),
|
|
@@ -369,7 +397,7 @@ var TxSunburstChart = class TxSunburstChart {
|
|
|
369
397
|
}
|
|
370
398
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
371
399
|
minVersion: "12.0.0",
|
|
372
|
-
version: "22.2.
|
|
400
|
+
version: "22.2.6",
|
|
373
401
|
ngImport: i0,
|
|
374
402
|
type: TxSunburstChart,
|
|
375
403
|
deps: [],
|
|
@@ -377,7 +405,7 @@ var TxSunburstChart = class TxSunburstChart {
|
|
|
377
405
|
});
|
|
378
406
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
379
407
|
minVersion: "17.0.0",
|
|
380
|
-
version: "22.2.
|
|
408
|
+
version: "22.2.6",
|
|
381
409
|
type: TxSunburstChart,
|
|
382
410
|
isStandalone: true,
|
|
383
411
|
selector: "tx-sunburst-chart",
|
|
@@ -571,7 +599,7 @@ var TxSunburstChart = class TxSunburstChart {
|
|
|
571
599
|
};
|
|
572
600
|
i0.ɵɵngDeclareClassMetadata({
|
|
573
601
|
minVersion: "12.0.0",
|
|
574
|
-
version: "22.2.
|
|
602
|
+
version: "22.2.6",
|
|
575
603
|
ngImport: i0,
|
|
576
604
|
type: TxSunburstChart,
|
|
577
605
|
decorators: [{
|
|
@@ -734,6 +762,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
734
762
|
}]
|
|
735
763
|
}
|
|
736
764
|
});
|
|
737
|
-
export { TxSunburstChart, sunburstArcAt, sunburstArcs, sunburstFocus, sunburstValue };
|
|
765
|
+
export { TxSunburstChart, sunburstArcAt, sunburstArcs, sunburstFocus, sunburstLabelFits, sunburstValue };
|
|
738
766
|
|
|
739
767
|
//# sourceMappingURL=tectra-ng-charts-sunburst.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-charts-sunburst.mjs","names":[],"sources":["../../../../packages/charts/sunburst/src/sunburst-layout.ts","../../../../packages/charts/sunburst/src/sunburst.icons.ts","../../../../packages/charts/sunburst/src/sunburst.theme.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.html"],"sourcesContent":["import { TX_FULL_CIRCLE, seriesColor } from '@tectra-ng/charts/core';\nimport { TxSunburstArc, TxSunburstItem } from './sunburst-chart.types';\n\n/** Value of an item: its own value, or the sum of its children when it has none. */\nexport function sunburstValue(item: TxSunburstItem): number {\n const own = item.value !== null && item.value !== undefined && Number.isFinite(item.value) ? Math.max(0, item.value) : null;\n const children = (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0);\n return own ?? children;\n}\n\n/** Slices shown after zooming into an index path, and the items along that path. */\nexport function sunburstFocus(roots: readonly TxSunburstItem[], path: readonly number[]): { items: readonly TxSunburstItem[]; trail: TxSunburstItem[] } {\n let items = roots;\n const trail: TxSunburstItem[] = [];\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n trail.push(item);\n items = item.children ?? [];\n }\n return { items, trail };\n}\n\n/** Settings of `sunburstArcs`. */\nexport interface TxSunburstOptions {\n /** Number of rings drawn. */\n levels: number;\n /** Outer radius, in px. */\n radius: number;\n /** Size of the empty centre as a share of the radius, 0 to 0.9. */\n hole: number;\n /** Index path of the slice zoomed into; empty shows the top level. */\n focus: readonly number[];\n}\n\n/** Lays out the visible rings of a sunburst as arcs; slices without a positive value are skipped. */\nexport function sunburstArcs(roots: readonly TxSunburstItem[], options: TxSunburstOptions): TxSunburstArc[] {\n const { items, trail } = sunburstFocus(roots, options.focus);\n const levels = Math.max(1, Math.floor(options.levels));\n const inner = options.radius * Math.min(0.9, Math.max(0, options.hole));\n const ring = (options.radius - inner) / levels;\n const sum = items.reduce((acc, item) => acc + sunburstValue(item), 0);\n const focused = trail[trail.length - 1];\n const total = focused ? Math.max(sunburstValue(focused), sum) : sum;\n const arcs: TxSunburstArc[] = [];\n const topIndex = options.focus[0];\n const inherited = trail.reduce<string | undefined>((color, item) => item.color ?? color, undefined);\n\n const walk = (list: readonly TxSunburstItem[], path: number[], start: number, span: number, depth: number, parentValue: number, color: string | undefined) => {\n let cursor = start;\n list.forEach((item, index) => {\n const value = sunburstValue(item);\n if (value <= 0) return;\n const sweep = parentValue > 0 ? (value / parentValue) * span : 0;\n const itemPath = [...path, index];\n const base = item.color ?? color ?? seriesColor(undefined, topIndex ?? itemPath[0]);\n arcs.push({\n key: itemPath.join('.'),\n path: itemPath,\n item,\n label: item.label,\n value,\n depth,\n start: cursor,\n end: cursor + sweep,\n inner: inner + (depth - 1) * ring,\n outer: inner + depth * ring,\n base,\n share: total ? value / total : 0,\n parentShare: parentValue ? value / parentValue : 0,\n hasChildren: !!item.children?.some((child) => sunburstValue(child) > 0),\n });\n if (depth < levels && item.children?.length) {\n walk(item.children, itemPath, cursor, sweep, depth + 1, Math.max(value, (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0)), item.color ?? color ?? base);\n }\n cursor += sweep;\n });\n };\n walk(items, [...options.focus], 0, TX_FULL_CIRCLE, 1, total, inherited);\n return arcs;\n}\n\n/** The arc under a point, or `null` outside all arcs. */\nexport function sunburstArcAt(arcs: readonly TxSunburstArc[], x: number, y: number, cx: number, cy: number): TxSunburstArc | null {\n const distance = Math.hypot(x - cx, y - cy);\n let angle = Math.atan2(x - cx, -(y - cy));\n if (angle < 0) angle += TX_FULL_CIRCLE;\n return arcs.find((arc) => distance >= arc.inner && distance <= arc.outer && angle >= arc.start && angle < arc.end) ?? null;\n}\n","import { TxIconSet, txIconChartPie } from '@tectra-ng/icons';\n\nexport const SUNBURST_ICON_DEFAULTS: TxIconSet = {\n 'chart-pie': txIconChartPie,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const SUNBURST_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\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 TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipPlacement,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n arcPath,\n chartNumberFormatter,\n initialChartSize,\n injectChartEntrance,\n polar,\n readTokenNumber,\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 { sunburstArcAt, sunburstArcs, sunburstFocus, sunburstValue } from './sunburst-layout';\nimport { TxSunburstArc, TxSunburstChartPart, TxSunburstEvent, TxSunburstItem } from './sunburst-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { SUNBURST_ICON_DEFAULTS } from './sunburst.icons';\nimport { SUNBURST_THEME } from './sunburst.theme';\n\nconst DEFAULTS = { hole: 0.3, corner: 3, fontSize: 11 };\nconst PADDING = 6;\nconst CENTER = 'center';\n\n@Component({\n selector: 'tx-sunburst-chart',\n imports: [TxChartFrame],\n templateUrl: './sunburst-chart.component.html',\n styleUrl: './sunburst-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-sunburst-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-sunburst-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-sunburst-chart--entering]': 'entrance.active()',\n '[class.tx-sunburst-chart--active]': 'activeArc() !== null',\n },\n viewProviders: [provideTxIconDefaults(SUNBURST_ICON_DEFAULTS)],\n})\nexport class TxSunburstChart {\n private readonly sunburstTheme = injectTokens(SUNBURST_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly data = input<TxSunburstItem | readonly TxSunburstItem[] | null | undefined>([]);\n readonly levels = input(3);\n readonly height = input<TxChartHeight>(380);\n readonly showLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly drill = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly totalLabel = input('');\n readonly valueFormat = input<TxChartValueFormat>('number');\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<TxSunburstChartPart, TxSunburstChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly segmentClick = output<TxSunburstEvent>();\n readonly focusChange = output<string[]>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('sunburstChart', 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 geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly roots = computed<readonly TxSunburstItem[]>(() => {\n const data = this.data();\n return !data ? [] : Array.isArray(data) ? data : [data as TxSunburstItem];\n });\n readonly focus = linkedSignal<readonly TxSunburstItem[], number[]>({ source: this.roots, computation: () => [] });\n readonly active = signal<string | null>(null);\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n readonly isEmpty = computed(() => !this.roots().some((item) => sunburstValue(item) > 0));\n\n readonly fit = computed(() => {\n const { width, height } = this.size();\n return { cx: width / 2, cy: height / 2, radius: Math.max(10, Math.min(width, height) / 2 - PADDING) };\n });\n\n readonly arcs = computed(() => sunburstArcs(this.roots(), { levels: this.levels(), radius: this.fit().radius, hole: this.geometry().hole, focus: this.focus() }));\n readonly inner = computed(() => this.fit().radius * Math.min(0.9, Math.max(0, this.geometry().hole)));\n readonly holeRadius = computed(() => Math.max(0, this.inner() - 2));\n readonly trail = computed(() => sunburstFocus(this.roots(), this.focus()).trail);\n readonly activeArc = computed(() => {\n const key = this.active();\n return key && key !== CENTER ? (this.arcs().find((arc) => arc.key === key) ?? null) : null;\n });\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => {\n const format = chartNumberFormatter(this.intl(), 'percent');\n return (share: number) => format(Number((share * 100).toFixed(1)));\n });\n\n readonly segments = computed(() => {\n const { cx, cy } = this.fit();\n const corner = this.geometry().corner;\n const fontSize = this.geometry().fontSize;\n return this.arcs().map((arc) => {\n const middle = (arc.start + arc.end) / 2;\n const radius = (arc.inner + arc.outer) / 2;\n const at = polar(cx, cy, radius, middle);\n const room = (arc.end - arc.start) * radius;\n const fits = this.showLabels() && room >= textWidth(arc.label, fontSize) + 8 && arc.outer - arc.inner >= fontSize + 6;\n return {\n ...arc,\n d: arcPath(cx, cy, arc.inner, arc.outer, arc.start, arc.end, corner),\n fill: arc.depth > 1 ? `color-mix(in srgb, ${arc.base} calc(100% - ${arc.depth - 1} * var(--tx-chart-sunburst-level-fade, 22%)), var(--tx-chart-sunburst-fade-base, transparent))` : arc.base,\n labelX: at.x,\n labelY: at.y,\n text: fits ? arc.label : null,\n };\n });\n });\n\n readonly center = computed(() => {\n const t = this.translations();\n const trail = this.trail();\n const focused = trail[trail.length - 1];\n const value = focused ? sunburstValue(focused) : this.roots().reduce((sum, item) => sum + sunburstValue(item), 0);\n return { label: focused?.label ?? (this.totalLabel() || t.chartTotal), value: this.valueFormatter()(value), canGoUp: trail.length > 0 && this.drill() };\n });\n\n readonly centerFont = computed(() => {\n const inner = this.inner();\n return { value: Math.max(12, Math.min(24, inner * 0.32)), label: Math.max(10, Math.min(13, inner * 0.17)) };\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const arc = this.activeArc();\n if (!arc || !this.showTooltip()) return null;\n const t = this.translations();\n const { cx, cy } = this.fit();\n const middle = (arc.start + arc.end) / 2;\n const at = polar(cx, cy, arc.outer + 2, middle);\n const sin = Math.sin(middle);\n const cos = Math.cos(middle);\n const placement: TxChartTooltipPlacement = Math.abs(sin) >= Math.SQRT1_2 ? (sin > 0 ? 'right' : 'left') : cos > 0 ? 'top' : 'bottom';\n const names = this.names(arc.path);\n return {\n title: names.slice(0, -1).join(' / '),\n rows: [\n { label: arc.label, value: this.valueFormatter()(arc.value), color: arc.base, raw: arc.value, seriesIndex: 0, active: true },\n ...(arc.depth > 1 || this.focus().length ? [{ label: t.chartOfParent, value: this.percentFormatter()(arc.parentShare), color: 'transparent', raw: arc.parentShare, seriesIndex: 1 }] : []),\n { label: t.chartOfTotal, value: this.percentFormatter()(arc.share), color: 'transparent', raw: arc.share, seriesIndex: 2 },\n ],\n index: 0,\n x: at.x,\n y: at.y,\n placement,\n };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const top = this.arcs().filter((arc) => arc.depth === 1);\n const parts = top.map((arc) => `${arc.label} ${this.percentFormatter()(arc.share)}`);\n const text = `${t.chartSunburst}, ${this.center().label} ${this.center().value}: ${parts.join(', ')}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'share', label: t.chartOfTotal },\n ],\n rows: this.arcs().map((arc) => ({ label: this.names(arc.path).join(' / '), cells: [this.valueFormatter()(arc.value), this.percentFormatter()(arc.share)] })),\n };\n });\n\n constructor() {\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n isLit(key: string): boolean {\n const active = this.activeArc();\n return !active || active.key === key || active.key.startsWith(`${key}.`);\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const { cx, cy } = this.fit();\n const inCenter = Math.hypot(event.x - cx, event.y - cy) < this.inner();\n const arc = inCenter ? null : sunburstArcAt(this.arcs(), event.x, event.y, cx, cy);\n this.active.set(inCenter && this.center().canGoUp ? CENTER : (arc?.key ?? null));\n if (event.type !== 'click') return;\n if (inCenter) this.up();\n else if (arc) this.select(arc);\n }\n\n onNavigate(event: KeyboardEvent): void {\n const arcs = this.arcs();\n if (!arcs.length) return;\n const current = this.activeArc();\n if (event.key === 'Escape' || event.key === 'Backspace') {\n if (current) this.active.set(null);\n else this.up();\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n if (current) this.select(current);\n return;\n }\n let next: TxSunburstArc | undefined;\n if (!current) {\n next = arcs.find((arc) => arc.depth === 1);\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n const siblings = arcs.filter((arc) => arc.depth === current.depth && arc.path.slice(0, -1).join('.') === current.path.slice(0, -1).join('.'));\n const at = siblings.indexOf(current);\n next = siblings[(at + (event.key === 'ArrowRight' ? 1 : -1) + siblings.length) % siblings.length];\n } else if (event.key === 'ArrowDown') {\n next = arcs.find((arc) => arc.depth === current.depth + 1 && arc.key.startsWith(`${current.key}.`)) ?? current;\n } else if (event.key === 'ArrowUp') {\n next = arcs.find((arc) => arc.key === current.path.slice(0, -1).join('.')) ?? current;\n } else if (event.key === 'Home' || event.key === 'End') {\n const top = arcs.filter((arc) => arc.depth === 1);\n next = event.key === 'Home' ? top[0] : top[top.length - 1];\n }\n if (!next) return;\n this.active.set(next.key);\n this.frame()?.announce(`${this.names(next.path).join(' / ')}: ${this.valueFormatter()(next.value)}, ${this.percentFormatter()(next.share)}`);\n }\n\n up(): void {\n if (!this.focus().length || !this.drill()) return;\n this.focus.update((path) => path.slice(0, -1));\n this.afterDrill();\n }\n\n private select(arc: TxSunburstArc): void {\n this.segmentClick.emit({ path: this.names(arc.path), value: arc.value, item: arc.item });\n if (!this.drill() || !arc.hasChildren) return;\n this.focus.set(arc.path);\n this.afterDrill();\n }\n\n private afterDrill(): void {\n this.active.set(null);\n this.entrance.play();\n const names = this.names(this.focus());\n this.focusChange.emit(names);\n this.frame()?.announce(names.length ? names.join(' / ') : this.center().label);\n }\n\n private names(path: readonly number[]): string[] {\n const names: string[] = [];\n let items = this.roots();\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n names.push(item.label);\n items = item.children ?? [];\n }\n return names;\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n hole: readTokenNumber(element, '--tx-chart-sunburst-hole', DEFAULTS.hole),\n corner: this.isUnstyled() ? 0 : readTokenNumber(element, '--tx-chart-sunburst-corner-radius', DEFAULTS.corner),\n fontSize: readTokenNumber(element, '--tx-chart-sunburst-label-font-size', DEFAULTS.fontSize),\n };\n const current = this.geometry();\n if (current.hole !== next.hole || current.corner !== next.corner || current.fontSize !== next.fontSize) this.geometry.set(next);\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n actionKeys\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-pie\"\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 class=\"tx-sunburst-chart__segments\" [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\">\n @for (segment of segments(); track segment.key) {\n <svg:path\n class=\"tx-sunburst-chart__segment\"\n [class.tx-sunburst-chart__segment--lit]=\"isLit(segment.key)\"\n [class.tx-sunburst-chart__segment--drill]=\"segment.hasChildren && drill()\"\n [class]=\"passThrough().segment?.class\"\n [style]=\"passThrough().segment?.style\"\n [attr.data-key]=\"segment.key\"\n [attr.data-depth]=\"segment.depth\"\n [attr.d]=\"segment.d\"\n [style.fill]=\"segment.fill\"\n />\n }\n </svg:g>\n @if (showLabels()) {\n <svg:g class=\"tx-sunburst-chart__labels\">\n @for (segment of segments(); track segment.key) {\n @if (segment.text) {\n <svg:text\n class=\"tx-sunburst-chart__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n >\n {{ segment.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n <svg:g\n class=\"tx-sunburst-chart__center\"\n [class.tx-sunburst-chart__center--up]=\"center().canGoUp\"\n [class.tx-sunburst-chart__center--hover]=\"active() === 'center'\"\n [class]=\"passThrough().center?.class\"\n [style]=\"passThrough().center?.style\"\n >\n <svg:circle class=\"tx-sunburst-chart__hole\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"holeRadius()\" />\n @if (center().canGoUp) {\n <svg:path\n class=\"tx-sunburst-chart__back\"\n [attr.d]=\"'M' + (fit().cx - 4) + ',' + (fit().cy - centerFont().value * 0.95 - 4) + 'l4,-4l4,4'\"\n />\n }\n <svg:text\n class=\"tx-sunburst-chart__center-value\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55\"\n [style.font-size.px]=\"centerFont().value\"\n >\n {{ center().value }}\n </svg:text>\n <svg:text\n class=\"tx-sunburst-chart__center-label\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55 + 6\"\n [style.font-size.px]=\"centerFont().label\"\n >\n {{ center().label }}\n </svg:text>\n </svg:g>\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAIA,SAAgB,cAAc,MAAoB;CAChD,MAAM,MAAM,KAAK,UAAU,QAAQ,KAAK,UAAU,UAAa,OAAO,SAAS,KAAK,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,IAAI;CACvH,MAAM,YAAY,KAAK,YAAY,CAAA,EAAA,CAAI,QAAQ,KAAK,UAAU,MAAM,cAAc,KAAK,GAAG,CAAC;CAC3F,OAAO,OAAO;AAChB;AAGA,SAAgB,cAAc,OAAkC,MAAuB;CACr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;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;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-sunburst.mjs","names":[],"sources":["../../../../packages/charts/sunburst/src/sunburst-layout.ts","../../../../packages/charts/sunburst/src/sunburst.icons.ts","../../../../packages/charts/sunburst/src/sunburst.theme.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.html"],"sourcesContent":["import { TX_FULL_CIRCLE, seriesColor } from '@tectra-ng/charts/core';\nimport { TxSunburstArc, TxSunburstItem } from './sunburst-chart.types';\n\n/** Value of an item: its own value, or the sum of its children when it has none. */\nexport function sunburstValue(item: TxSunburstItem): number {\n const own = item.value !== null && item.value !== undefined && Number.isFinite(item.value) ? Math.max(0, item.value) : null;\n const children = (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0);\n return own ?? children;\n}\n\n/** Slices shown after zooming into an index path, and the items along that path. */\nexport function sunburstFocus(roots: readonly TxSunburstItem[], path: readonly number[]): { items: readonly TxSunburstItem[]; trail: TxSunburstItem[] } {\n let items = roots;\n const trail: TxSunburstItem[] = [];\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n trail.push(item);\n items = item.children ?? [];\n }\n return { items, trail };\n}\n\n/** Settings of `sunburstArcs`. */\nexport interface TxSunburstOptions {\n /** Number of rings drawn. */\n levels: number;\n /** Outer radius, in px. */\n radius: number;\n /** Size of the empty centre as a share of the radius, 0 to 0.9. */\n hole: number;\n /** Index path of the slice zoomed into; empty shows the top level. */\n focus: readonly number[];\n}\n\n/** Lays out the visible rings of a sunburst as arcs; slices without a positive value are skipped. */\nexport function sunburstArcs(roots: readonly TxSunburstItem[], options: TxSunburstOptions): TxSunburstArc[] {\n const { items, trail } = sunburstFocus(roots, options.focus);\n const levels = Math.max(1, Math.floor(options.levels));\n const inner = options.radius * Math.min(0.9, Math.max(0, options.hole));\n const ring = (options.radius - inner) / levels;\n const sum = items.reduce((acc, item) => acc + sunburstValue(item), 0);\n const focused = trail[trail.length - 1];\n const total = focused ? Math.max(sunburstValue(focused), sum) : sum;\n const arcs: TxSunburstArc[] = [];\n const topIndex = options.focus[0];\n const inherited = trail.reduce<string | undefined>((color, item) => item.color ?? color, undefined);\n\n const walk = (list: readonly TxSunburstItem[], path: number[], start: number, span: number, depth: number, parentValue: number, color: string | undefined) => {\n let cursor = start;\n list.forEach((item, index) => {\n const value = sunburstValue(item);\n if (value <= 0) return;\n const sweep = parentValue > 0 ? (value / parentValue) * span : 0;\n const itemPath = [...path, index];\n const base = item.color ?? color ?? seriesColor(undefined, topIndex ?? itemPath[0]);\n arcs.push({\n key: itemPath.join('.'),\n path: itemPath,\n item,\n label: item.label,\n value,\n depth,\n start: cursor,\n end: cursor + sweep,\n inner: inner + (depth - 1) * ring,\n outer: inner + depth * ring,\n base,\n share: total ? value / total : 0,\n parentShare: parentValue ? value / parentValue : 0,\n hasChildren: !!item.children?.some((child) => sunburstValue(child) > 0),\n });\n if (depth < levels && item.children?.length) {\n walk(item.children, itemPath, cursor, sweep, depth + 1, Math.max(value, (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0)), item.color ?? color ?? base);\n }\n cursor += sweep;\n });\n };\n walk(items, [...options.focus], 0, TX_FULL_CIRCLE, 1, total, inherited);\n return arcs;\n}\n\n/** The arc under a point, or `null` outside all arcs. */\nexport function sunburstArcAt(arcs: readonly TxSunburstArc[], x: number, y: number, cx: number, cy: number): TxSunburstArc | null {\n const distance = Math.hypot(x - cx, y - cy);\n let angle = Math.atan2(x - cx, -(y - cy));\n if (angle < 0) angle += TX_FULL_CIRCLE;\n return arcs.find((arc) => distance >= arc.inner && distance <= arc.outer && angle >= arc.start && angle < arc.end) ?? null;\n}\n\n/**\n * Tells whether a horizontal label box of `width` × `height` centred at (`x`, `y`) lies inside an arc, keeping `padding`\n * px from its edges; points along the box outline are checked against both radii and both angles.\n */\nexport function sunburstLabelFits(\n arc: Pick<TxSunburstArc, 'start' | 'end' | 'inner' | 'outer'>,\n box: { x: number; y: number; width: number; height: number },\n cx: number,\n cy: number,\n padding = 1,\n): boolean {\n const halfWidth = box.width / 2 + padding;\n const halfHeight = box.height / 2 + padding;\n const fullCircle = arc.end - arc.start >= TX_FULL_CIRCLE - 1e-9;\n const steps = 6;\n for (let step = 0; step <= steps; step++) {\n const along = -1 + (2 * step) / steps;\n const points = [\n [box.x + along * halfWidth, box.y - halfHeight],\n [box.x + along * halfWidth, box.y + halfHeight],\n [box.x - halfWidth, box.y + along * halfHeight],\n [box.x + halfWidth, box.y + along * halfHeight],\n ];\n for (const [px, py] of points) {\n const distance = Math.hypot(px - cx, py - cy);\n if (distance < arc.inner || distance > arc.outer) return false;\n if (fullCircle) continue;\n let angle = Math.atan2(px - cx, -(py - cy));\n if (angle < 0) angle += TX_FULL_CIRCLE;\n if (angle < arc.start || angle > arc.end) return false;\n }\n }\n return true;\n}\n","import { TxIconSet, txIconChartPie } from '@tectra-ng/icons';\n\nexport const SUNBURST_ICON_DEFAULTS: TxIconSet = {\n 'chart-pie': txIconChartPie,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const SUNBURST_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\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 TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipPlacement,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n arcPath,\n chartNumberFormatter,\n initialChartSize,\n injectChartEntrance,\n polar,\n readTokenNumber,\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 { sunburstArcAt, sunburstArcs, sunburstFocus, sunburstLabelFits, sunburstValue } from './sunburst-layout';\nimport { TxSunburstArc, TxSunburstChartPart, TxSunburstEvent, TxSunburstItem } from './sunburst-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { SUNBURST_ICON_DEFAULTS } from './sunburst.icons';\nimport { SUNBURST_THEME } from './sunburst.theme';\n\nconst DEFAULTS = { hole: 0.3, corner: 3, fontSize: 11 };\nconst PADDING = 6;\nconst CENTER = 'center';\n\n@Component({\n selector: 'tx-sunburst-chart',\n imports: [TxChartFrame],\n templateUrl: './sunburst-chart.component.html',\n styleUrl: './sunburst-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-sunburst-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-sunburst-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-sunburst-chart--entering]': 'entrance.active()',\n '[class.tx-sunburst-chart--active]': 'activeArc() !== null',\n },\n viewProviders: [provideTxIconDefaults(SUNBURST_ICON_DEFAULTS)],\n})\nexport class TxSunburstChart {\n private readonly sunburstTheme = injectTokens(SUNBURST_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly data = input<TxSunburstItem | readonly TxSunburstItem[] | null | undefined>([]);\n readonly levels = input(3);\n readonly height = input<TxChartHeight>(380);\n readonly showLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly drill = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly totalLabel = input('');\n readonly valueFormat = input<TxChartValueFormat>('number');\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<TxSunburstChartPart, TxSunburstChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly segmentClick = output<TxSunburstEvent>();\n readonly focusChange = output<string[]>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('sunburstChart', 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 geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly roots = computed<readonly TxSunburstItem[]>(() => {\n const data = this.data();\n return !data ? [] : Array.isArray(data) ? data : [data as TxSunburstItem];\n });\n readonly focus = linkedSignal<readonly TxSunburstItem[], number[]>({ source: this.roots, computation: () => [] });\n readonly active = signal<string | null>(null);\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n readonly isEmpty = computed(() => !this.roots().some((item) => sunburstValue(item) > 0));\n\n readonly fit = computed(() => {\n const { width, height } = this.size();\n return { cx: width / 2, cy: height / 2, radius: Math.max(10, Math.min(width, height) / 2 - PADDING) };\n });\n\n readonly arcs = computed(() => sunburstArcs(this.roots(), { levels: this.levels(), radius: this.fit().radius, hole: this.geometry().hole, focus: this.focus() }));\n readonly inner = computed(() => this.fit().radius * Math.min(0.9, Math.max(0, this.geometry().hole)));\n readonly holeRadius = computed(() => Math.max(0, this.inner() - 2));\n readonly trail = computed(() => sunburstFocus(this.roots(), this.focus()).trail);\n readonly activeArc = computed(() => {\n const key = this.active();\n return key && key !== CENTER ? (this.arcs().find((arc) => arc.key === key) ?? null) : null;\n });\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => {\n const format = chartNumberFormatter(this.intl(), 'percent');\n return (share: number) => format(Number((share * 100).toFixed(1)));\n });\n\n readonly segments = computed(() => {\n const { cx, cy } = this.fit();\n const corner = this.geometry().corner;\n const fontSize = this.geometry().fontSize;\n return this.arcs().map((arc) => {\n const middle = (arc.start + arc.end) / 2;\n const radius = (arc.inner + arc.outer) / 2;\n const at = polar(cx, cy, radius, middle);\n const fits = this.showLabels() && sunburstLabelFits(arc, { x: at.x, y: at.y, width: textWidth(arc.label, fontSize), height: fontSize }, cx, cy);\n return {\n ...arc,\n d: arcPath(cx, cy, arc.inner, arc.outer, arc.start, arc.end, corner),\n fill: arc.depth > 1 ? `color-mix(in srgb, ${arc.base} calc(100% - ${arc.depth - 1} * var(--tx-chart-sunburst-level-fade, 22%)), var(--tx-chart-sunburst-fade-base, transparent))` : arc.base,\n labelX: at.x,\n labelY: at.y,\n text: fits ? arc.label : null,\n };\n });\n });\n\n readonly center = computed(() => {\n const t = this.translations();\n const trail = this.trail();\n const focused = trail[trail.length - 1];\n const value = focused ? sunburstValue(focused) : this.roots().reduce((sum, item) => sum + sunburstValue(item), 0);\n return { label: focused?.label ?? (this.totalLabel() || t.chartTotal), value: this.valueFormatter()(value), canGoUp: trail.length > 0 && this.drill() };\n });\n\n readonly centerFont = computed(() => {\n const inner = this.inner();\n return { value: Math.max(12, Math.min(24, inner * 0.32)), label: Math.max(10, Math.min(13, inner * 0.17)) };\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const arc = this.activeArc();\n if (!arc || !this.showTooltip()) return null;\n const t = this.translations();\n const { cx, cy } = this.fit();\n const middle = (arc.start + arc.end) / 2;\n const at = polar(cx, cy, arc.outer + 2, middle);\n const sin = Math.sin(middle);\n const cos = Math.cos(middle);\n const placement: TxChartTooltipPlacement = Math.abs(sin) >= Math.SQRT1_2 ? (sin > 0 ? 'right' : 'left') : cos > 0 ? 'top' : 'bottom';\n const names = this.names(arc.path);\n return {\n title: names.slice(0, -1).join(' / '),\n rows: [\n { label: arc.label, value: this.valueFormatter()(arc.value), color: arc.base, raw: arc.value, seriesIndex: 0, active: true },\n ...(arc.depth > 1 || this.focus().length ? [{ label: t.chartOfParent, value: this.percentFormatter()(arc.parentShare), color: 'transparent', raw: arc.parentShare, seriesIndex: 1 }] : []),\n { label: t.chartOfTotal, value: this.percentFormatter()(arc.share), color: 'transparent', raw: arc.share, seriesIndex: 2 },\n ],\n index: 0,\n x: at.x,\n y: at.y,\n placement,\n };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const top = this.arcs().filter((arc) => arc.depth === 1);\n const parts = top.map((arc) => `${arc.label} ${this.percentFormatter()(arc.share)}`);\n const text = `${t.chartSunburst}, ${this.center().label} ${this.center().value}: ${parts.join(', ')}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'share', label: t.chartOfTotal },\n ],\n rows: this.arcs().map((arc) => ({ label: this.names(arc.path).join(' / '), cells: [this.valueFormatter()(arc.value), this.percentFormatter()(arc.share)] })),\n };\n });\n\n constructor() {\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n isLit(key: string): boolean {\n const active = this.activeArc();\n return !active || active.key === key || active.key.startsWith(`${key}.`);\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const { cx, cy } = this.fit();\n const inCenter = Math.hypot(event.x - cx, event.y - cy) < this.inner();\n const arc = inCenter ? null : sunburstArcAt(this.arcs(), event.x, event.y, cx, cy);\n this.active.set(inCenter && this.center().canGoUp ? CENTER : (arc?.key ?? null));\n if (event.type !== 'click') return;\n if (inCenter) this.up();\n else if (arc) this.select(arc);\n }\n\n onNavigate(event: KeyboardEvent): void {\n const arcs = this.arcs();\n if (!arcs.length) return;\n const current = this.activeArc();\n if (event.key === 'Escape' || event.key === 'Backspace') {\n if (current) this.active.set(null);\n else this.up();\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n if (current) this.select(current);\n return;\n }\n let next: TxSunburstArc | undefined;\n if (!current) {\n next = arcs.find((arc) => arc.depth === 1);\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n const siblings = arcs.filter((arc) => arc.depth === current.depth && arc.path.slice(0, -1).join('.') === current.path.slice(0, -1).join('.'));\n const at = siblings.indexOf(current);\n next = siblings[(at + (event.key === 'ArrowRight' ? 1 : -1) + siblings.length) % siblings.length];\n } else if (event.key === 'ArrowDown') {\n next = arcs.find((arc) => arc.depth === current.depth + 1 && arc.key.startsWith(`${current.key}.`)) ?? current;\n } else if (event.key === 'ArrowUp') {\n next = arcs.find((arc) => arc.key === current.path.slice(0, -1).join('.')) ?? current;\n } else if (event.key === 'Home' || event.key === 'End') {\n const top = arcs.filter((arc) => arc.depth === 1);\n next = event.key === 'Home' ? top[0] : top[top.length - 1];\n }\n if (!next) return;\n this.active.set(next.key);\n this.frame()?.announce(`${this.names(next.path).join(' / ')}: ${this.valueFormatter()(next.value)}, ${this.percentFormatter()(next.share)}`);\n }\n\n up(): void {\n if (!this.focus().length || !this.drill()) return;\n this.focus.update((path) => path.slice(0, -1));\n this.afterDrill();\n }\n\n private select(arc: TxSunburstArc): void {\n this.segmentClick.emit({ path: this.names(arc.path), value: arc.value, item: arc.item });\n if (!this.drill() || !arc.hasChildren) return;\n this.focus.set(arc.path);\n this.afterDrill();\n }\n\n private afterDrill(): void {\n this.active.set(null);\n this.entrance.play();\n const names = this.names(this.focus());\n this.focusChange.emit(names);\n this.frame()?.announce(names.length ? names.join(' / ') : this.center().label);\n }\n\n private names(path: readonly number[]): string[] {\n const names: string[] = [];\n let items = this.roots();\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n names.push(item.label);\n items = item.children ?? [];\n }\n return names;\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n hole: readTokenNumber(element, '--tx-chart-sunburst-hole', DEFAULTS.hole),\n corner: this.isUnstyled() ? 0 : readTokenNumber(element, '--tx-chart-sunburst-corner-radius', DEFAULTS.corner),\n fontSize: readTokenNumber(element, '--tx-chart-sunburst-label-font-size', DEFAULTS.fontSize),\n };\n const current = this.geometry();\n if (current.hole !== next.hole || current.corner !== next.corner || current.fontSize !== next.fontSize) this.geometry.set(next);\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n actionKeys\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-pie\"\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 class=\"tx-sunburst-chart__segments\" [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\">\n @for (segment of segments(); track segment.key) {\n <svg:path\n class=\"tx-sunburst-chart__segment\"\n [class.tx-sunburst-chart__segment--lit]=\"isLit(segment.key)\"\n [class.tx-sunburst-chart__segment--drill]=\"segment.hasChildren && drill()\"\n [class]=\"passThrough().segment?.class\"\n [style]=\"passThrough().segment?.style\"\n [attr.data-key]=\"segment.key\"\n [attr.data-depth]=\"segment.depth\"\n [attr.d]=\"segment.d\"\n [style.fill]=\"segment.fill\"\n />\n }\n </svg:g>\n @if (showLabels()) {\n <svg:g class=\"tx-sunburst-chart__labels\">\n @for (segment of segments(); track segment.key) {\n @if (segment.text) {\n <svg:text\n class=\"tx-sunburst-chart__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n >\n {{ segment.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n <svg:g\n class=\"tx-sunburst-chart__center\"\n [class.tx-sunburst-chart__center--up]=\"center().canGoUp\"\n [class.tx-sunburst-chart__center--hover]=\"active() === 'center'\"\n [class]=\"passThrough().center?.class\"\n [style]=\"passThrough().center?.style\"\n >\n <svg:circle class=\"tx-sunburst-chart__hole\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"holeRadius()\" />\n @if (center().canGoUp) {\n <svg:path\n class=\"tx-sunburst-chart__back\"\n [attr.d]=\"'M' + (fit().cx - 4) + ',' + (fit().cy - centerFont().value * 0.95 - 4) + 'l4,-4l4,4'\"\n />\n }\n <svg:text\n class=\"tx-sunburst-chart__center-value\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55\"\n [style.font-size.px]=\"centerFont().value\"\n >\n {{ center().value }}\n </svg:text>\n <svg:text\n class=\"tx-sunburst-chart__center-label\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerF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IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;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"}
|
|
@@ -82,7 +82,7 @@ var TxTreemapTileTemplate = class TxTreemapTileTemplate {
|
|
|
82
82
|
}
|
|
83
83
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
84
84
|
minVersion: "12.0.0",
|
|
85
|
-
version: "22.2.
|
|
85
|
+
version: "22.2.6",
|
|
86
86
|
ngImport: i0,
|
|
87
87
|
type: TxTreemapTileTemplate,
|
|
88
88
|
deps: [],
|
|
@@ -90,7 +90,7 @@ var TxTreemapTileTemplate = class TxTreemapTileTemplate {
|
|
|
90
90
|
});
|
|
91
91
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
92
92
|
minVersion: "14.0.0",
|
|
93
|
-
version: "22.2.
|
|
93
|
+
version: "22.2.6",
|
|
94
94
|
type: TxTreemapTileTemplate,
|
|
95
95
|
isStandalone: true,
|
|
96
96
|
selector: "ng-template[txTreemapTile]",
|
|
@@ -99,7 +99,7 @@ var TxTreemapTileTemplate = class TxTreemapTileTemplate {
|
|
|
99
99
|
};
|
|
100
100
|
i0.ɵɵngDeclareClassMetadata({
|
|
101
101
|
minVersion: "12.0.0",
|
|
102
|
-
version: "22.2.
|
|
102
|
+
version: "22.2.6",
|
|
103
103
|
ngImport: i0,
|
|
104
104
|
type: TxTreemapTileTemplate,
|
|
105
105
|
decorators: [{
|
|
@@ -332,7 +332,7 @@ var TxTreemap = class TxTreemap {
|
|
|
332
332
|
}
|
|
333
333
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
334
334
|
minVersion: "12.0.0",
|
|
335
|
-
version: "22.2.
|
|
335
|
+
version: "22.2.6",
|
|
336
336
|
ngImport: i0,
|
|
337
337
|
type: TxTreemap,
|
|
338
338
|
deps: [],
|
|
@@ -340,7 +340,7 @@ var TxTreemap = class TxTreemap {
|
|
|
340
340
|
});
|
|
341
341
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
342
342
|
minVersion: "17.0.0",
|
|
343
|
-
version: "22.2.
|
|
343
|
+
version: "22.2.6",
|
|
344
344
|
type: TxTreemap,
|
|
345
345
|
isStandalone: true,
|
|
346
346
|
selector: "tx-treemap",
|
|
@@ -531,7 +531,7 @@ var TxTreemap = class TxTreemap {
|
|
|
531
531
|
};
|
|
532
532
|
i0.ɵɵngDeclareClassMetadata({
|
|
533
533
|
minVersion: "12.0.0",
|
|
534
|
-
version: "22.2.
|
|
534
|
+
version: "22.2.6",
|
|
535
535
|
ngImport: i0,
|
|
536
536
|
type: TxTreemap,
|
|
537
537
|
decorators: [{
|