@tectra-ng/charts 0.4.1 → 0.4.3
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-candlestick.mjs +23 -7
- package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-column.mjs +1 -1
- package/fesm2022/tectra-ng-charts-column.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-core.mjs +81 -18
- package/fesm2022/tectra-ng-charts-core.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-funnel.mjs +29 -7
- package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-gantt.mjs +487 -27
- package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-gauge.mjs +79 -34
- package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-org-chart.mjs +36 -8
- package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-pie.mjs +27 -9
- package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-radial-bar.mjs +5 -4
- package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-range-area.mjs +113 -58
- package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-rank-line.mjs +79 -31
- package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-sankey.mjs +99 -18
- package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs +53 -7
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-sunburst.mjs +31 -3
- package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-waterfall.mjs +57 -20
- 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 +8 -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
|
@@ -6,9 +6,9 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export interface TxWaterfallItem {
|
|
7
7
|
/** Name of the step. */
|
|
8
8
|
label: string;
|
|
9
|
-
/** Change added to the running total; negative values go down. */
|
|
9
|
+
/** Change added to the running total; negative values go down. On a total: its own value, which the next steps start from. */
|
|
10
10
|
value?: number | null;
|
|
11
|
-
/** Draws the running total so far
|
|
11
|
+
/** Draws a total from zero: the running total so far, or `value` when set (an opening balance, a measured subtotal). */
|
|
12
12
|
total?: boolean;
|
|
13
13
|
/** Own colour of the bar. */
|
|
14
14
|
color?: string;
|
|
@@ -78,11 +78,27 @@ export interface TxWaterfallBarEvent {
|
|
|
78
78
|
kind: TxWaterfallKind;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* Turns items into steps with a running total; a total item shows the sum so far
|
|
81
|
+
* Turns items into steps with a running total; a total item shows the sum so far, or its own value
|
|
82
|
+
* (an opening balance, a measured subtotal) that the next steps start from. Missing values count as zero.
|
|
82
83
|
*/
|
|
83
84
|
export declare function waterfallSteps(items: readonly TxWaterfallItem[]): TxWaterfallStep[];
|
|
84
85
|
/** Smallest and largest running total, always including 0. */
|
|
85
86
|
export declare function waterfallExtent(steps: readonly TxWaterfallStep[]): [number, number];
|
|
87
|
+
/** Box of a data label: horizontal centre, width, top and bottom in px. */
|
|
88
|
+
export interface TxWaterfallLabelBox {
|
|
89
|
+
/** Horizontal centre, in px. */
|
|
90
|
+
x: number;
|
|
91
|
+
/** Width, in px. */
|
|
92
|
+
width: number;
|
|
93
|
+
/** Top edge, in px. */
|
|
94
|
+
top: number;
|
|
95
|
+
/** Bottom edge, in px. */
|
|
96
|
+
bottom: number;
|
|
97
|
+
/** Totals are placed first, so they win a collision. */
|
|
98
|
+
total: boolean;
|
|
99
|
+
}
|
|
100
|
+
/** Which data labels to draw: totals first, then left to right, leaving out any label that overlaps a kept one. */
|
|
101
|
+
export declare function visibleLabels(boxes: readonly TxWaterfallLabelBox[], gap?: number): boolean[];
|
|
86
102
|
/**
|
|
87
103
|
* `<tx-waterfall-chart>` — how a starting value turns into a result step by step: each bar floats from the running total, increases and decreases in their own colours, total bars close a section. Drawn as SVG by the component, rendered on the server and themed by the design tokens.
|
|
88
104
|
* @see https://tectra-ng.com/components/waterfall-chart
|
|
@@ -92,11 +108,11 @@ export declare class TxWaterfallChart {
|
|
|
92
108
|
private locale;
|
|
93
109
|
private host;
|
|
94
110
|
readonly translations: import("@angular/core").Signal<import("@tectra-ng/core/config").TxTranslations>;
|
|
95
|
-
/** `{ label, value?, total?, color? }[]` — a step adds `value` to the running total; `total: true` draws the running total from zero instead. An empty list shows "No data" */
|
|
111
|
+
/** `{ label, value?, total?, color? }[]` — a step adds `value` to the running total; `total: true` draws the running total from zero instead, or its own `value` (an opening balance, a measured subtotal) that the next steps start from. An empty list shows "No data" */
|
|
96
112
|
readonly items: import("@angular/core").InputSignal<readonly TxWaterfallItem[] | null | undefined>;
|
|
97
113
|
/** Height in px (350), or a CSS size such as `'100%'` of a parent with a definite height */
|
|
98
114
|
readonly height: import("@angular/core").InputSignal<TxChartHeight>;
|
|
99
|
-
/** Writes the signed change (or the total) above or below each bar (on by default) */
|
|
115
|
+
/** Writes the signed change (or the total) above or below each bar (on by default); a label wider than its column turns compact (`+$36.4K`), one that still overlaps another is left out, totals first */
|
|
100
116
|
readonly dataLabels: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
101
117
|
/** Draws a dashed line from each bar's end to the next bar (on by default) */
|
|
102
118
|
readonly connectors: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -108,7 +124,7 @@ export declare class TxWaterfallChart {
|
|
|
108
124
|
readonly legendAlign: import("@angular/core").InputSignal<TxChartLegendAlign>;
|
|
109
125
|
/** Shows the change and the running total on hover and keyboard focus */
|
|
110
126
|
readonly showTooltip: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
111
|
-
/** Value axis, labels and tooltip format: `number`, `integer`, `compact`, `percent` or a function */
|
|
127
|
+
/** Value axis, labels and tooltip format: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function */
|
|
112
128
|
readonly valueFormat: import("@angular/core").InputSignal<TxChartValueFormat>;
|
|
113
129
|
/** Fixed start of the value axis */
|
|
114
130
|
readonly yMin: import("@angular/core").InputSignal<number | undefined>;
|
|
@@ -161,6 +177,8 @@ export declare class TxWaterfallChart {
|
|
|
161
177
|
readonly size: import("@angular/core").WritableSignal<import("@tectra-ng/charts/core").TxChartSize>;
|
|
162
178
|
readonly valueFormatter: import("@angular/core").Signal<import("@tectra-ng/charts/core").TxChartValueFormatter>;
|
|
163
179
|
readonly signed: import("@angular/core").Signal<(value: number) => string>;
|
|
180
|
+
private readonly shortFormatter;
|
|
181
|
+
private readonly shortSigned;
|
|
164
182
|
readonly layout: import("@angular/core").Signal<import("@tectra-ng/charts/core").TxCartesianLayout>;
|
|
165
183
|
readonly bars: import("@angular/core").Signal<TxWaterfallChartBar[]>;
|
|
166
184
|
readonly hoverBand: import("@angular/core").Signal<import("@tectra-ng/charts/core").TxChartRect | null>;
|
|
@@ -181,6 +199,7 @@ export declare class TxWaterfallChart {
|
|
|
181
199
|
constructor();
|
|
182
200
|
onPointer(event: TxChartPointerEvent): void;
|
|
183
201
|
onNavigate(event: KeyboardEvent): void;
|
|
202
|
+
private labelText;
|
|
184
203
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxWaterfallChart, never>;
|
|
185
204
|
static ɵcmp: i0.ɵɵComponentDeclaration<TxWaterfallChart, "tx-waterfall-chart", never, {
|
|
186
205
|
"items": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-charts-waterfall.d.ts","names":[],"sources":["../../../../packages/charts/waterfall/src/waterfall-chart.types.ts","../../../../packages/charts/waterfall/src/waterfall-layout.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.ts"],"mappings":";;;;;iBAGiB;;EAEf;;EAEA;;EAEA;;EAEA;;;YAIU;;YAGA,uBAAuB;;iBAGlB;;EAEf;;EAEA;;EAEA,MAAM;;EAEN;;EAEA;;EAEA;;EAEA;;;iBAIe,4BAA4B;;EAE3C;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA,MAAM
|
|
1
|
+
{"version":3,"file":"tectra-ng-charts-waterfall.d.ts","names":[],"sources":["../../../../packages/charts/waterfall/src/waterfall-chart.types.ts","../../../../packages/charts/waterfall/src/waterfall-layout.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.ts"],"mappings":";;;;;iBAGiB;;EAEf;;EAEA;;EAEA;;EAEA;;;YAIU;;YAGA,uBAAuB;;iBAGlB;;EAEf;;EAEA;;EAEA,MAAM;;EAEN;;EAEA;;EAEA;;EAEA;;;iBAIe,4BAA4B;;EAE3C;;EAEA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;;;EAuBlB,UAAU,OAAO;EAgBjB,WAAW,OAAO;UAiBV;SAjOG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAgB;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
|
package/waterfall/README.md
CHANGED
|
@@ -7,21 +7,21 @@ import { TxWaterfallChart } from '@tectra-ng/charts/waterfall';
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<tx-waterfall-chart [items]="[{ label: 'Start', value: 120 }, { label: 'Costs', value: -45 }, { label: 'Result', total: true }]" />
|
|
10
|
+
<tx-waterfall-chart [items]="[{ label: 'Start', value: 120, total: true }, { label: 'Costs', value: -45 }, { label: 'Result', total: true }]" />
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Inputs
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
|
-
| items | `{ label, value?, total?, color? }[]` — a step adds `value` to the running total; `total: true` draws the running total from zero instead. An empty list shows "No data" |
|
|
16
|
+
| items | `{ label, value?, total?, color? }[]` — a step adds `value` to the running total; `total: true` draws the running total from zero instead, or its own `value` (an opening balance, a measured subtotal) that the next steps start from. An empty list shows "No data" |
|
|
17
17
|
| height | Height in px (350), or a CSS size such as `'100%'` of a parent with a definite height |
|
|
18
|
-
| dataLabels | Writes the signed change (or the total) above or below each bar (on by default) |
|
|
18
|
+
| dataLabels | Writes the signed change (or the total) above or below each bar (on by default); a label wider than its column turns compact (`+$36.4K`), one that still overlaps another is left out, totals first |
|
|
19
19
|
| connectors | Draws a dashed line from each bar's end to the next bar (on by default) |
|
|
20
20
|
| showLegend | Shows the legend of increase, decrease and total when there is more than one kind |
|
|
21
21
|
| legendPosition | `top`, `bottom`, `left` or `right` |
|
|
22
22
|
| legendAlign | `start`, `center` or `end` for a top or bottom legend |
|
|
23
23
|
| showTooltip | Shows the change and the running total on hover and keyboard focus |
|
|
24
|
-
| valueFormat | Value axis, labels and tooltip format: `number`, `integer`, `compact`, `percent` or a function |
|
|
24
|
+
| valueFormat | Value axis, labels and tooltip format: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
25
25
|
| yMin | Fixed start of the value axis |
|
|
26
26
|
| yMax | Fixed end of the value axis |
|
|
27
27
|
| xAxisTitle | Title of the category axis |
|
|
@@ -57,4 +57,4 @@ import { TxWaterfallChart } from '@tectra-ng/charts/waterfall';
|
|
|
57
57
|
|
|
58
58
|
## Notes
|
|
59
59
|
|
|
60
|
-
The legend only names the colours, so it does not hide anything. Hovering anywhere in a step's column lays a soft band under it and fades the others. Bars grow one after another from their start once and slide to new values; both are off with reduced motion.
|
|
60
|
+
The legend only names the colours, so it does not hide anything. Totals are neutral by default (`chart.waterfall.totalColor`), apart from the increase green and the primary colour. Hovering anywhere in a step's column lays a soft band under it and fades the others. Bars grow one after another from their start once and slide to new values; both are off with reduced motion.
|