@acorex/charts 21.0.1-next.9 → 21.0.1-next.91
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/fesm2022/acorex-charts-bar-chart.mjs +37 -23
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-legend.mjs +4 -4
- package/fesm2022/acorex-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-tooltip.mjs +13 -4
- package/fesm2022/acorex-charts-chart-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +83 -99
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-funnel-chart.mjs +365 -0
- package/fesm2022/acorex-charts-funnel-chart.mjs.map +1 -0
- package/fesm2022/acorex-charts-gauge-chart.mjs +157 -86
- package/fesm2022/acorex-charts-gauge-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-heatmap-chart.mjs +393 -0
- package/fesm2022/acorex-charts-heatmap-chart.mjs.map +1 -0
- package/fesm2022/acorex-charts-hierarchy-chart.mjs +4 -5
- package/fesm2022/acorex-charts-hierarchy-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-line-chart.mjs +38 -27
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts.mjs +28 -4
- package/fesm2022/acorex-charts.mjs.map +1 -1
- package/funnel-chart/README.md +3 -0
- package/heatmap-chart/README.md +3 -0
- package/package.json +19 -13
- package/{bar-chart/index.d.ts → types/acorex-charts-bar-chart.d.ts} +7 -6
- package/{chart-tooltip/index.d.ts → types/acorex-charts-chart-tooltip.d.ts} +1 -0
- package/{donut-chart/index.d.ts → types/acorex-charts-donut-chart.d.ts} +12 -11
- package/types/acorex-charts-funnel-chart.d.ts +142 -0
- package/{gauge-chart/index.d.ts → types/acorex-charts-gauge-chart.d.ts} +16 -5
- package/types/acorex-charts-heatmap-chart.d.ts +148 -0
- package/{hierarchy-chart/index.d.ts → types/acorex-charts-hierarchy-chart.d.ts} +4 -3
- package/{line-chart/index.d.ts → types/acorex-charts-line-chart.d.ts} +5 -1
- package/{index.d.ts → types/acorex-charts.d.ts} +8 -1
- /package/{chart-legend/index.d.ts → types/acorex-charts-chart-legend.d.ts} +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as _acorex_charts_heatmap_chart from '@acorex/charts/heatmap-chart';
|
|
2
|
+
import * as _acorex_charts from '@acorex/charts';
|
|
3
|
+
import { AXAnimationEasing, AXChartComponent } from '@acorex/charts';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { OnDestroy, InjectionToken } from '@angular/core';
|
|
6
|
+
import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
|
|
7
|
+
|
|
8
|
+
interface AXHeatmapData {
|
|
9
|
+
x: string | number;
|
|
10
|
+
y: string | number;
|
|
11
|
+
value: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AXHeatmapMessages {
|
|
15
|
+
noData?: string;
|
|
16
|
+
noDataHelp?: string;
|
|
17
|
+
noDataIcon?: string;
|
|
18
|
+
}
|
|
19
|
+
interface AXHeatmapChartOption {
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
margin?: {
|
|
23
|
+
top: number;
|
|
24
|
+
right: number;
|
|
25
|
+
bottom: number;
|
|
26
|
+
left: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Discrete palette. If provided (non-empty), a (stable) random color is chosen per cell.
|
|
30
|
+
* Entries may use any CSS `<color>` (including `rgb(var(--token))`) resolved against the chart container.
|
|
31
|
+
* If omitted/empty, the base `color` is shown with intensity from the cell value vs `valueRange`
|
|
32
|
+
* (or data min–max if `valueRange` is omitted).
|
|
33
|
+
*/
|
|
34
|
+
colors?: string[];
|
|
35
|
+
/**
|
|
36
|
+
* Base color when `colors` is not provided: any CSS `<color>` resolved against the chart container
|
|
37
|
+
* (hex, `rgb()`, `rgb(var(--token))`, `color-mix()`, …).
|
|
38
|
+
*/
|
|
39
|
+
color?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Inclusive numeric range for mapping cell values to color intensity.
|
|
42
|
+
* If `valueRange` is omitted, or a bound is missing, that bound uses the min or max value
|
|
43
|
+
* among all cells in the current dataset.
|
|
44
|
+
*/
|
|
45
|
+
valueRange?: {
|
|
46
|
+
min: number;
|
|
47
|
+
max: number;
|
|
48
|
+
};
|
|
49
|
+
cellPadding?: number;
|
|
50
|
+
borderRadius?: number;
|
|
51
|
+
showXAxis?: boolean;
|
|
52
|
+
showYAxis?: boolean;
|
|
53
|
+
xAxisLabel?: string;
|
|
54
|
+
yAxisLabel?: string;
|
|
55
|
+
/** Like bar-chart: `true` / `false` forces rotation; `'auto'` picks −45° when labels would overflow each band step. */
|
|
56
|
+
rotateXAxisLabels?: boolean | 'auto';
|
|
57
|
+
showTooltip?: boolean;
|
|
58
|
+
animationDuration?: number;
|
|
59
|
+
animationEasing?: AXAnimationEasing;
|
|
60
|
+
messages?: AXHeatmapMessages;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class AXHeatmapChartComponent extends AXChartComponent implements OnDestroy {
|
|
64
|
+
/** Fixed `viewBox` side; chart scales with CSS `width` / `height` on the host container. */
|
|
65
|
+
private static readonly VIEW_BOX_SIZE;
|
|
66
|
+
private readonly CHAR_WIDTH_RATIO;
|
|
67
|
+
private readonly ROTATION_TOLERANCE_SMALL_DATASET;
|
|
68
|
+
private readonly SMALL_DATASET_THRESHOLD;
|
|
69
|
+
private readonly MANY_ITEMS_THRESHOLD;
|
|
70
|
+
private readonly VERY_MANY_ITEMS_THRESHOLD;
|
|
71
|
+
private readonly MAX_LABEL_LENGTH;
|
|
72
|
+
private readonly TICK_AREA_PADDING;
|
|
73
|
+
private readonly X_AXIS_TITLE_GAP;
|
|
74
|
+
private readonly MIN_FONT_SIZE_X_AXIS;
|
|
75
|
+
private readonly MAX_FONT_SIZE_X_AXIS;
|
|
76
|
+
private readonly defaultConfig;
|
|
77
|
+
data: _angular_core.InputSignal<AXHeatmapData[]>;
|
|
78
|
+
options: _angular_core.InputSignal<AXHeatmapChartOption>;
|
|
79
|
+
/** Emitted when a heatmap cell is clicked */
|
|
80
|
+
cellClick: _angular_core.OutputEmitterRef<AXHeatmapData>;
|
|
81
|
+
private readonly containerRef;
|
|
82
|
+
private svg;
|
|
83
|
+
protected d3: any;
|
|
84
|
+
private _d3Ready;
|
|
85
|
+
private platformService;
|
|
86
|
+
protected isRtl: _angular_core.WritableSignal<boolean>;
|
|
87
|
+
private directionSub?;
|
|
88
|
+
protected tooltipVisible: _angular_core.WritableSignal<boolean>;
|
|
89
|
+
protected tooltipPosition: _angular_core.WritableSignal<{
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
}>;
|
|
93
|
+
protected tooltipData: _angular_core.WritableSignal<AXChartTooltipData>;
|
|
94
|
+
private _tooltipRafId;
|
|
95
|
+
protected effectiveOptions: _angular_core.Signal<{
|
|
96
|
+
width?: number;
|
|
97
|
+
height?: number;
|
|
98
|
+
margin?: {
|
|
99
|
+
top: number;
|
|
100
|
+
right: number;
|
|
101
|
+
bottom: number;
|
|
102
|
+
left: number;
|
|
103
|
+
};
|
|
104
|
+
colors?: string[];
|
|
105
|
+
color?: string;
|
|
106
|
+
valueRange?: {
|
|
107
|
+
min: number;
|
|
108
|
+
max: number;
|
|
109
|
+
};
|
|
110
|
+
cellPadding?: number;
|
|
111
|
+
borderRadius?: number;
|
|
112
|
+
showXAxis?: boolean;
|
|
113
|
+
showYAxis?: boolean;
|
|
114
|
+
xAxisLabel?: string;
|
|
115
|
+
yAxisLabel?: string;
|
|
116
|
+
rotateXAxisLabels?: boolean | "auto";
|
|
117
|
+
showTooltip?: boolean;
|
|
118
|
+
animationDuration?: number;
|
|
119
|
+
animationEasing?: _acorex_charts.AXAnimationEasing;
|
|
120
|
+
messages?: _acorex_charts_heatmap_chart.AXHeatmapMessages;
|
|
121
|
+
}>;
|
|
122
|
+
constructor();
|
|
123
|
+
private init;
|
|
124
|
+
updateChart(): void;
|
|
125
|
+
private renderChart;
|
|
126
|
+
private hashStringToUint32;
|
|
127
|
+
/** `resolvedRgb` must be a computed `rgb()` / `rgba()` string (e.g. from {@link resolveCssColorInContext}). */
|
|
128
|
+
private applyIntensityToResolvedRgb;
|
|
129
|
+
private drawAxis;
|
|
130
|
+
private showTooltip;
|
|
131
|
+
private updateTooltipPos;
|
|
132
|
+
private hideTooltip;
|
|
133
|
+
ngOnDestroy(): void;
|
|
134
|
+
private drawAxisLabels;
|
|
135
|
+
private getHeatmapXTickFontSize;
|
|
136
|
+
private getHeatmapXTickPlan;
|
|
137
|
+
private truncateHeatmapLabel;
|
|
138
|
+
private shouldRotateHeatmapXLabels;
|
|
139
|
+
private styleHeatmapXAxisTicks;
|
|
140
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXHeatmapChartComponent, never>;
|
|
141
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXHeatmapChartComponent, "ax-heatmap-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "cellClick": "cellClick"; }, never, never, true, never>;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
declare const AXHeatmapChartDefaultConfig: AXHeatmapChartOption;
|
|
145
|
+
declare const AX_HEATMAP_CHART_CONFIG: InjectionToken<AXHeatmapChartOption>;
|
|
146
|
+
|
|
147
|
+
export { AXHeatmapChartComponent, AXHeatmapChartDefaultConfig, AX_HEATMAP_CHART_CONFIG };
|
|
148
|
+
export type { AXHeatmapChartOption, AXHeatmapData, AXHeatmapMessages };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _acorex_charts from '@acorex/charts';
|
|
2
|
-
import {
|
|
2
|
+
import { NXNativeEvent, AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
|
|
3
|
+
import * as _acorex_charts_hierarchy_chart from '@acorex/charts/hierarchy-chart';
|
|
3
4
|
import * as _angular_core from '@angular/core';
|
|
4
5
|
import { TemplateRef, InjectionToken } from '@angular/core';
|
|
5
6
|
|
|
@@ -308,7 +309,7 @@ declare class AXHierarchyChartComponent extends AXChartComponent implements AXCh
|
|
|
308
309
|
protected effectiveOptions: _angular_core.Signal<{
|
|
309
310
|
width?: number;
|
|
310
311
|
height?: number;
|
|
311
|
-
margin?: AXHierarchyChartMargin;
|
|
312
|
+
margin?: _acorex_charts_hierarchy_chart.AXHierarchyChartMargin;
|
|
312
313
|
nodeRadius?: number;
|
|
313
314
|
nodeStrokeWidth?: number;
|
|
314
315
|
linkWidth?: number;
|
|
@@ -324,7 +325,7 @@ declare class AXHierarchyChartComponent extends AXChartComponent implements AXCh
|
|
|
324
325
|
className?: string;
|
|
325
326
|
animationDuration?: number;
|
|
326
327
|
animationEasing?: _acorex_charts.AXAnimationEasing;
|
|
327
|
-
messages?: AXHierarchyChartMessages;
|
|
328
|
+
messages?: _acorex_charts_hierarchy_chart.AXHierarchyChartMessages;
|
|
328
329
|
}>;
|
|
329
330
|
protected effectiveMessages: _angular_core.Signal<{
|
|
330
331
|
noData: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _acorex_charts_line_chart from '@acorex/charts/line-chart';
|
|
1
2
|
import * as _acorex_charts from '@acorex/charts';
|
|
2
3
|
import { AXAnimationEasing, NXNativeEvent, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
|
|
3
4
|
import * as d3 from 'd3';
|
|
@@ -121,6 +122,8 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
|
|
|
121
122
|
private _tooltipVisible;
|
|
122
123
|
private _tooltipPosition;
|
|
123
124
|
private _tooltipData;
|
|
125
|
+
private _tooltipRafId;
|
|
126
|
+
private _pendingTooltipCoords;
|
|
124
127
|
private _initialized;
|
|
125
128
|
private _rendered;
|
|
126
129
|
private hiddenSeries;
|
|
@@ -160,7 +163,7 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
|
|
|
160
163
|
showCrosshair?: boolean;
|
|
161
164
|
animationDuration?: number;
|
|
162
165
|
animationEasing?: _acorex_charts.AXAnimationEasing;
|
|
163
|
-
messages?: AXLineChartMessages;
|
|
166
|
+
messages?: _acorex_charts_line_chart.AXLineChartMessages;
|
|
164
167
|
}>;
|
|
165
168
|
protected effectiveMessages: _angular_core.Signal<{
|
|
166
169
|
noData: string;
|
|
@@ -179,6 +182,7 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
|
|
|
179
182
|
private readonly MIN_MARGIN_BOTTOM;
|
|
180
183
|
private readonly MIN_MARGIN_LEFT;
|
|
181
184
|
private readonly MAX_EXTRA_MARGIN;
|
|
185
|
+
private readonly CHART_EDGE_PADDING;
|
|
182
186
|
private readonly DEFAULT_LINE_WIDTH;
|
|
183
187
|
private readonly DEFAULT_POINT_RADIUS;
|
|
184
188
|
private readonly DEFAULT_FILL_OPACITY;
|
|
@@ -55,6 +55,13 @@ type TooltipPosition = {
|
|
|
55
55
|
x: number;
|
|
56
56
|
y: number;
|
|
57
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Resolves any CSS `<color>` the browser understands — including
|
|
60
|
+
* `rgb(var(--token))`, `hsl(var(--token))`, `color-mix()`, etc. — to a computed
|
|
61
|
+
* `rgb()` / `rgba()` string, using the cascade from `scopeElement` (e.g. the chart
|
|
62
|
+
* container) so design tokens on ancestors apply.
|
|
63
|
+
*/
|
|
64
|
+
declare function resolveCssColorInContext(scopeElement: HTMLElement, cssColor: string): string;
|
|
58
65
|
/**
|
|
59
66
|
* Compute edge-aware tooltip position with intelligent placement,
|
|
60
67
|
* considering available space in all directions and preventing overflow.
|
|
@@ -77,5 +84,5 @@ declare function getEasingFunction(d3: typeof d3, option?: string): (t: number)
|
|
|
77
84
|
|
|
78
85
|
declare const AX_CHARTS = "ACOREX_CHARTS";
|
|
79
86
|
|
|
80
|
-
export { AXChartComponent, AX_CHARTS, AX_CHART_COLOR_PALETTE, computeTooltipPosition, formatLargeNumber, getChartColor, getEasingFunction, mapEasingName };
|
|
87
|
+
export { AXChartComponent, AX_CHARTS, AX_CHART_COLOR_PALETTE, computeTooltipPosition, formatLargeNumber, getChartColor, getEasingFunction, mapEasingName, resolveCssColorInContext };
|
|
81
88
|
export type { AXAnimationEasing, AXChartComponentBase, D3EasingName, NXNativeEvent, TooltipPosition };
|
|
File without changes
|