@acorex/charts 20.6.17 → 20.6.19

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.
@@ -0,0 +1,3 @@
1
+ # @acorex/charts/funnel-chart
2
+
3
+ Secondary entry point of `@acorex/charts`. It can be used by importing from `@acorex/charts/funnel-chart`.
@@ -0,0 +1,90 @@
1
+ import * as _acorex_charts from '@acorex/charts';
2
+ import { AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
3
+ import * as d3 from 'd3';
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 AXFunnelData {
9
+ id?: string | number;
10
+ name: string;
11
+ value: number;
12
+ color?: string;
13
+ }
14
+ interface AXFunnelChartMessages {
15
+ noData?: string;
16
+ noDataIcon?: string;
17
+ }
18
+ interface AXFunnelChartOption {
19
+ margin?: {
20
+ top: number;
21
+ right: number;
22
+ bottom: number;
23
+ left: number;
24
+ };
25
+ width?: number;
26
+ height?: number;
27
+ /** The ratio of the bottom width compared to the top width for the last segment (0 to 1). Default: 0.3 */
28
+ neckWidth?: number;
29
+ colors?: string[];
30
+ showLabels?: boolean;
31
+ showTooltip?: boolean;
32
+ animationDuration?: number;
33
+ animationEasing?: AXAnimationEasing;
34
+ messages?: AXFunnelChartMessages;
35
+ }
36
+
37
+ declare class AXFunnelChartComponent extends AXChartComponent implements OnDestroy, AXChartComponentBase {
38
+ data: _angular_core.InputSignal<AXFunnelData[]>;
39
+ options: _angular_core.InputSignal<AXFunnelChartOption>;
40
+ private readonly chartContainerEl;
41
+ private svgElement;
42
+ protected d3: typeof d3;
43
+ private _initialized;
44
+ private _rendered;
45
+ private _tooltipVisible;
46
+ private _tooltipPosition;
47
+ private _tooltipData;
48
+ private _tooltipRafId;
49
+ protected tooltipVisible: _angular_core.Signal<boolean>;
50
+ protected tooltipPosition: _angular_core.Signal<{
51
+ x: number;
52
+ y: number;
53
+ }>;
54
+ protected tooltipData: _angular_core.Signal<AXChartTooltipData>;
55
+ private configToken;
56
+ protected effectiveOptions: _angular_core.Signal<{
57
+ margin?: {
58
+ top: number;
59
+ right: number;
60
+ bottom: number;
61
+ left: number;
62
+ };
63
+ width?: number;
64
+ height?: number;
65
+ neckWidth?: number;
66
+ colors?: string[];
67
+ showLabels?: boolean;
68
+ showTooltip?: boolean;
69
+ animationDuration?: number;
70
+ animationEasing?: _acorex_charts.AXAnimationEasing;
71
+ messages?: AXFunnelChartMessages;
72
+ }>;
73
+ constructor();
74
+ ngOnDestroy(): void;
75
+ protected loadD3(): Promise<void>;
76
+ createChart(): void;
77
+ updateChart(): void;
78
+ private showTooltip;
79
+ private updateTooltipPosition;
80
+ private hideTooltip;
81
+ cleanupChart(): void;
82
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFunnelChartComponent, never>;
83
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFunnelChartComponent, "ax-funnel-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
84
+ }
85
+
86
+ declare const AXFunnelChartDefaultConfig: AXFunnelChartOption;
87
+ declare const AX_FUNNEL_CHART_CONFIG: InjectionToken<AXFunnelChartOption>;
88
+
89
+ export { AXFunnelChartComponent, AXFunnelChartDefaultConfig, AX_FUNNEL_CHART_CONFIG };
90
+ export type { AXFunnelChartMessages, AXFunnelChartOption, AXFunnelData };
@@ -138,6 +138,10 @@ declare class AXGaugeChartComponent extends AXChartComponent implements OnDestro
138
138
  private readonly HALF_CIRCLE_RADIANS;
139
139
  private readonly QUARTER_CIRCLE_RADIANS;
140
140
  private readonly DEGREES_PER_RADIAN;
141
+ private readonly CHART_EDGE_PADDING;
142
+ private readonly TICK_LABEL_CHAR_WIDTH_RATIO;
143
+ private readonly TICK_LABEL_SIDE_PADDING;
144
+ private readonly LABEL_TICK_CLEARANCE;
141
145
  constructor();
142
146
  ngOnDestroy(): void;
143
147
  /**
@@ -189,6 +193,14 @@ declare class AXGaugeChartComponent extends AXChartComponent implements OnDestro
189
193
  * Draws tick marks and labels around the gauge
190
194
  */
191
195
  private drawTicks;
196
+ private getTickCount;
197
+ private getTickFontSize;
198
+ private getBaseLabelOffset;
199
+ private getTickLabelAnchor;
200
+ private getNearEdgeProjection;
201
+ private formatTickValue;
202
+ private estimateLabelWidth;
203
+ private estimateMaxTickLabelWidth;
192
204
  /**
193
205
  * Draws the value and label text in the center
194
206
  */
@@ -0,0 +1,3 @@
1
+ # @acorex/charts/heatmap
2
+
3
+ Secondary entry point of `@acorex/charts`. It can be used by importing from `@acorex/charts/heatmap`.
@@ -0,0 +1,92 @@
1
+ import * as _acorex_charts from '@acorex/charts';
2
+ import { AXAnimationEasing, AXChartComponent } from '@acorex/charts';
3
+ import * as _angular_core from '@angular/core';
4
+ import { OnDestroy, InjectionToken } from '@angular/core';
5
+ import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
6
+
7
+ interface AXHeatmapData {
8
+ x: string | number;
9
+ y: string | number;
10
+ value: number;
11
+ label?: string;
12
+ }
13
+ interface AXHeatmapMessages {
14
+ noData?: string;
15
+ noDataHelp?: string;
16
+ noDataIcon?: string;
17
+ }
18
+ interface AXHeatmapChartOption {
19
+ width?: number;
20
+ height?: number;
21
+ margin?: {
22
+ top: number;
23
+ right: number;
24
+ bottom: number;
25
+ left: number;
26
+ };
27
+ colors?: string[];
28
+ cellPadding?: number;
29
+ borderRadius?: number;
30
+ showXAxis?: boolean;
31
+ showYAxis?: boolean;
32
+ xAxisLabel?: string;
33
+ yAxisLabel?: string;
34
+ showTooltip?: boolean;
35
+ animationDuration?: number;
36
+ animationEasing?: AXAnimationEasing;
37
+ messages?: AXHeatmapMessages;
38
+ }
39
+
40
+ declare class AXHeatmapChartComponent extends AXChartComponent implements OnDestroy {
41
+ private readonly defaultConfig;
42
+ data: _angular_core.InputSignal<AXHeatmapData[]>;
43
+ options: _angular_core.InputSignal<AXHeatmapChartOption>;
44
+ private readonly containerRef;
45
+ private svg;
46
+ private resizeObserver;
47
+ protected d3: any;
48
+ private _d3Ready;
49
+ protected tooltipVisible: _angular_core.WritableSignal<boolean>;
50
+ protected tooltipPosition: _angular_core.WritableSignal<{
51
+ x: number;
52
+ y: number;
53
+ }>;
54
+ protected tooltipData: _angular_core.WritableSignal<AXChartTooltipData>;
55
+ protected effectiveOptions: _angular_core.Signal<{
56
+ width?: number;
57
+ height?: number;
58
+ margin?: {
59
+ top: number;
60
+ right: number;
61
+ bottom: number;
62
+ left: number;
63
+ };
64
+ colors?: string[];
65
+ cellPadding?: number;
66
+ borderRadius?: number;
67
+ showXAxis?: boolean;
68
+ showYAxis?: boolean;
69
+ xAxisLabel?: string;
70
+ yAxisLabel?: string;
71
+ showTooltip?: boolean;
72
+ animationDuration?: number;
73
+ animationEasing?: _acorex_charts.AXAnimationEasing;
74
+ messages?: AXHeatmapMessages;
75
+ }>;
76
+ constructor();
77
+ private init;
78
+ private renderChart;
79
+ private drawAxis;
80
+ private showTooltip;
81
+ private updateTooltipPos;
82
+ private hideTooltip;
83
+ ngOnDestroy(): void;
84
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXHeatmapChartComponent, never>;
85
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXHeatmapChartComponent, "ax-heatmap-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
86
+ }
87
+
88
+ declare const AXHeatmapChartDefaultConfig: AXHeatmapChartOption;
89
+ declare const AX_HEATMAP_CHART_CONFIG: InjectionToken<AXHeatmapChartOption>;
90
+
91
+ export { AXHeatmapChartComponent, AXHeatmapChartDefaultConfig, AX_HEATMAP_CHART_CONFIG };
92
+ export type { AXHeatmapChartOption, AXHeatmapData, AXHeatmapMessages };
@@ -181,6 +181,7 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
181
181
  private readonly MIN_MARGIN_BOTTOM;
182
182
  private readonly MIN_MARGIN_LEFT;
183
183
  private readonly MAX_EXTRA_MARGIN;
184
+ private readonly CHART_EDGE_PADDING;
184
185
  private readonly DEFAULT_LINE_WIDTH;
185
186
  private readonly DEFAULT_POINT_RADIUS;
186
187
  private readonly DEFAULT_FILL_OPACITY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/charts",
3
- "version": "20.6.17",
3
+ "version": "20.6.19",
4
4
  "peerDependencies": {
5
5
  "d3": ">=7.9.0"
6
6
  },
@@ -15,10 +15,6 @@
15
15
  "types": "./index.d.ts",
16
16
  "default": "./fesm2022/acorex-charts.mjs"
17
17
  },
18
- "./chart-tooltip": {
19
- "types": "./chart-tooltip/index.d.ts",
20
- "default": "./fesm2022/acorex-charts-chart-tooltip.mjs"
21
- },
22
18
  "./bar-chart": {
23
19
  "types": "./bar-chart/index.d.ts",
24
20
  "default": "./fesm2022/acorex-charts-bar-chart.mjs"
@@ -27,14 +23,26 @@
27
23
  "types": "./chart-legend/index.d.ts",
28
24
  "default": "./fesm2022/acorex-charts-chart-legend.mjs"
29
25
  },
26
+ "./chart-tooltip": {
27
+ "types": "./chart-tooltip/index.d.ts",
28
+ "default": "./fesm2022/acorex-charts-chart-tooltip.mjs"
29
+ },
30
30
  "./donut-chart": {
31
31
  "types": "./donut-chart/index.d.ts",
32
32
  "default": "./fesm2022/acorex-charts-donut-chart.mjs"
33
33
  },
34
+ "./funnel-chart": {
35
+ "types": "./funnel-chart/index.d.ts",
36
+ "default": "./fesm2022/acorex-charts-funnel-chart.mjs"
37
+ },
34
38
  "./gauge-chart": {
35
39
  "types": "./gauge-chart/index.d.ts",
36
40
  "default": "./fesm2022/acorex-charts-gauge-chart.mjs"
37
41
  },
42
+ "./heatmap-chart": {
43
+ "types": "./heatmap-chart/index.d.ts",
44
+ "default": "./fesm2022/acorex-charts-heatmap-chart.mjs"
45
+ },
38
46
  "./hierarchy-chart": {
39
47
  "types": "./hierarchy-chart/index.d.ts",
40
48
  "default": "./fesm2022/acorex-charts-hierarchy-chart.mjs"