@acorex/charts 20.2.0-next.21 → 20.2.0-next.22

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.
@@ -3,6 +3,7 @@ import { AXAnimationEasing, NXNativeEvent, NXComponent } from '@acorex/cdk/commo
3
3
  import * as d3 from 'd3';
4
4
  import * as _angular_core from '@angular/core';
5
5
  import { OnDestroy, InjectionToken } from '@angular/core';
6
+ import { AXChartComponentBase } from '@acorex/charts';
6
7
  import { AXChartLegendCompatible, AXChartLegendItem } from '@acorex/charts/chart-legend';
7
8
  import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
8
9
 
@@ -69,6 +70,7 @@ interface AXBarChartOption {
69
70
  showDataLabels?: boolean;
70
71
  xAxisLabel?: string;
71
72
  yAxisLabel?: string;
73
+ rotateXAxisLabels?: boolean | 'auto';
72
74
  showTooltip?: boolean;
73
75
  barWidth?: number;
74
76
  cornerRadius?: number;
@@ -86,7 +88,7 @@ type AXBarChartValue = AXBarChartData[] | AXBarChartClusteredData[];
86
88
  * Bar Chart Component
87
89
  * Renders data as vertical bars with interactive hover effects and animations
88
90
  */
89
- declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXChartLegendCompatible {
91
+ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXChartLegendCompatible, AXChartComponentBase {
90
92
  /** Chart data input */
91
93
  data: _angular_core.InputSignal<AXBarChartValue>;
92
94
  /** Chart options input */
@@ -105,6 +107,8 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
105
107
  private width;
106
108
  private height;
107
109
  private margin;
110
+ private readonly CHAR_WIDTH_RATIO;
111
+ private readonly TOOLTIP_GAP;
108
112
  private _initialAnimationComplete;
109
113
  private _tooltipVisible;
110
114
  private _tooltipPosition;
@@ -119,7 +123,6 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
119
123
  protected tooltipData: _angular_core.Signal<AXChartTooltipData>;
120
124
  private configToken;
121
125
  private chartColors;
122
- private platform;
123
126
  protected effectiveOptions: _angular_core.Signal<{
124
127
  width?: number;
125
128
  height?: number;
@@ -129,6 +132,7 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
129
132
  showDataLabels?: boolean;
130
133
  xAxisLabel?: string;
131
134
  yAxisLabel?: string;
135
+ rotateXAxisLabels?: boolean | "auto";
132
136
  showTooltip?: boolean;
133
137
  barWidth?: number;
134
138
  cornerRadius?: number;
@@ -157,23 +161,19 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
157
161
  /**
158
162
  * Creates the bar chart SVG and renders all elements
159
163
  */
160
- protected createChart(): void;
164
+ createChart(): void;
161
165
  /**
162
166
  * Updates the chart when inputs change
163
167
  */
164
- protected updateChart(): void;
168
+ updateChart(): void;
165
169
  /**
166
170
  * Cleans up chart resources
167
171
  */
168
- protected cleanupChart(): void;
172
+ cleanupChart(): void;
169
173
  /**
170
174
  * Sets up chart dimensions and creates SVG with responsive attributes
171
175
  */
172
176
  private setupDimensions;
173
- /**
174
- * Calculates chart margins based on options
175
- */
176
- private calculateMargins;
177
177
  /**
178
178
  * Creates x and y scales for the chart
179
179
  */
@@ -209,7 +209,6 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
209
209
  /**
210
210
  * Gets the appropriate D3 easing function based on the option string
211
211
  */
212
- private getEasingFunction;
213
212
  /**
214
213
  * Handles bar hover event and shows tooltip
215
214
  */
@@ -254,6 +253,12 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
254
253
  * @returns New visibility state (true = visible, false = hidden)
255
254
  */
256
255
  toggleSegment(id: string): boolean;
256
+ private getContainerElement;
257
+ private clearChartArea;
258
+ private getXAxisTickFontSizeBasedOnWidth;
259
+ private getYAxisTickFontSizeBasedOnHeight;
260
+ private buildXAxisCommon;
261
+ private showMessage;
257
262
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXBarChartComponent, never>;
258
263
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXBarChartComponent, "ax-bar-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "barClick": "barClick"; }, never, never, true, never>;
259
264
  }
@@ -3,6 +3,7 @@ import { AXAnimationEasing } from '@acorex/cdk/common';
3
3
  import * as d3 from 'd3';
4
4
  import * as _angular_core from '@angular/core';
5
5
  import { OnDestroy, InjectionToken } from '@angular/core';
6
+ import { AXChartComponentBase } from '@acorex/charts';
6
7
  import { AXChartLegendCompatible, AXChartLegendItem } from '@acorex/charts/chart-legend';
7
8
  import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
8
9
 
@@ -121,7 +122,7 @@ type AXDonutChartValue = AXDonutChartData[];
121
122
  * Donut Chart Component
122
123
  * Displays data in a circular donut chart with interactive segments
123
124
  */
124
- declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatible {
125
+ declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatible, AXChartComponentBase {
125
126
  #private;
126
127
  private cdr;
127
128
  /** Chart data input */
@@ -166,6 +167,7 @@ declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatibl
166
167
  animationEasing?: _acorex_cdk_common.AXAnimationEasing;
167
168
  messages?: AXDonutChartMessages;
168
169
  }>;
170
+ private readonly TOOLTIP_GAP;
169
171
  protected effectiveMessages: _angular_core.Signal<{
170
172
  noData: string;
171
173
  noDataHelp: string;
@@ -198,11 +200,11 @@ declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatibl
198
200
  /**
199
201
  * Creates the donut chart
200
202
  */
201
- protected createChart(): void;
203
+ createChart(): void;
202
204
  /**
203
205
  * Updates the chart with new data
204
206
  */
205
- protected updateChart(): void;
207
+ updateChart(): void;
206
208
  /**
207
209
  * Clears the chart container
208
210
  */
@@ -234,7 +236,6 @@ declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatibl
234
236
  /**
235
237
  * Gets the appropriate D3 easing function based on the option string
236
238
  */
237
- private getEasingFunction;
238
239
  /**
239
240
  * Handle hover effects on a segment
240
241
  */
@@ -259,7 +260,8 @@ declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatibl
259
260
  /**
260
261
  * Cleans up chart resources
261
262
  */
262
- private cleanupChart;
263
+ cleanupChart(): void;
264
+ private renderMessage;
263
265
  /**
264
266
  * Gets an accessibility label describing the donut chart for screen readers
265
267
  */