@acorex/charts 21.0.0-next.14 → 21.0.0-next.15
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-chart/index.d.ts +58 -2
- package/donut-chart/index.d.ts +42 -3
- package/fesm2022/acorex-charts-bar-chart.mjs +258 -119
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +289 -186
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-gauge-chart.mjs +80 -56
- package/fesm2022/acorex-charts-gauge-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-line-chart.mjs +286 -134
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts.mjs +23 -1
- package/fesm2022/acorex-charts.mjs.map +1 -1
- package/gauge-chart/index.d.ts +4 -1
- package/index.d.ts +5 -1
- package/line-chart/index.d.ts +66 -1
- package/package.json +8 -8
package/bar-chart/index.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ interface AXBarChartOption {
|
|
|
74
74
|
barWidth?: number;
|
|
75
75
|
cornerRadius?: number;
|
|
76
76
|
animationDuration?: number;
|
|
77
|
+
animationDelay?: number;
|
|
77
78
|
animationEasing?: AXAnimationEasing;
|
|
78
79
|
messages?: AXBarChartMessages;
|
|
79
80
|
}
|
|
@@ -108,6 +109,39 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
|
|
|
108
109
|
private margin;
|
|
109
110
|
private readonly CHAR_WIDTH_RATIO;
|
|
110
111
|
private readonly TOOLTIP_GAP;
|
|
112
|
+
private readonly AXIS_TICK_PADDING;
|
|
113
|
+
private readonly Y_AXIS_TITLE_THICKNESS;
|
|
114
|
+
private readonly Y_AXIS_TITLE_PADDING;
|
|
115
|
+
private readonly X_AXIS_TITLE_FONT_SIZE;
|
|
116
|
+
private readonly X_AXIS_TITLE_GAP;
|
|
117
|
+
private readonly X_AXIS_TITLE_BLOCK_HEIGHT;
|
|
118
|
+
private readonly TOP_EDGE_PADDING;
|
|
119
|
+
private readonly FALLBACK_PLOT_HEIGHT;
|
|
120
|
+
private readonly MIN_PLOT_HEIGHT;
|
|
121
|
+
private readonly MIN_TOTAL_WIDTH;
|
|
122
|
+
private readonly OUTER_PADDING_CLUSTERED;
|
|
123
|
+
private readonly INNER_PADDING_CLUSTERED;
|
|
124
|
+
private readonly MIN_PADDING;
|
|
125
|
+
private readonly HOVER_TRANSITION_DURATION;
|
|
126
|
+
private readonly DEFAULT_ANIMATION_DELAY;
|
|
127
|
+
private readonly LABEL_ANIMATION_DELAY;
|
|
128
|
+
private readonly MIN_TOP_SPACE_FOR_LABEL;
|
|
129
|
+
private readonly LABEL_OFFSET;
|
|
130
|
+
private readonly ROTATION_TOLERANCE_SMALL_DATASET;
|
|
131
|
+
private readonly SMALL_DATASET_THRESHOLD;
|
|
132
|
+
private readonly Y_AXIS_PADDING;
|
|
133
|
+
private readonly TICK_AREA_PADDING;
|
|
134
|
+
private readonly TICK_AREA_GAP;
|
|
135
|
+
private readonly DEFAULT_FONT_SIZE;
|
|
136
|
+
private readonly FONT_WIDTH_MULTIPLIER;
|
|
137
|
+
private readonly FONT_PADDING;
|
|
138
|
+
private readonly MAX_LABEL_LENGTH;
|
|
139
|
+
private readonly MIN_FONT_SIZE_X_AXIS;
|
|
140
|
+
private readonly MAX_FONT_SIZE_X_AXIS;
|
|
141
|
+
private readonly MIN_FONT_SIZE_Y_AXIS;
|
|
142
|
+
private readonly MAX_FONT_SIZE_Y_AXIS;
|
|
143
|
+
private readonly MANY_ITEMS_THRESHOLD;
|
|
144
|
+
private readonly VERY_MANY_ITEMS_THRESHOLD;
|
|
111
145
|
private _initialAnimationComplete;
|
|
112
146
|
private _tooltipVisible;
|
|
113
147
|
private _tooltipPosition;
|
|
@@ -136,6 +170,7 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
|
|
|
136
170
|
barWidth?: number;
|
|
137
171
|
cornerRadius?: number;
|
|
138
172
|
animationDuration?: number;
|
|
173
|
+
animationDelay?: number;
|
|
139
174
|
animationEasing?: _acorex_charts.AXAnimationEasing;
|
|
140
175
|
messages?: AXBarChartMessages;
|
|
141
176
|
}>;
|
|
@@ -147,8 +182,11 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
|
|
|
147
182
|
noDataIcon: string;
|
|
148
183
|
allHiddenIcon: string;
|
|
149
184
|
}>;
|
|
150
|
-
private hiddenBars;
|
|
151
|
-
private hiddenSeries;
|
|
185
|
+
private readonly hiddenBars;
|
|
186
|
+
private readonly hiddenSeries;
|
|
187
|
+
private readonly isClusteredMode;
|
|
188
|
+
private readonly visibleData;
|
|
189
|
+
private readonly hasVisibleData;
|
|
152
190
|
private isClusteredData;
|
|
153
191
|
private getClusterSeriesLabels;
|
|
154
192
|
constructor();
|
|
@@ -173,6 +211,14 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
|
|
|
173
211
|
* Sets up chart dimensions and creates SVG with responsive attributes
|
|
174
212
|
*/
|
|
175
213
|
private setupDimensions;
|
|
214
|
+
/**
|
|
215
|
+
* Calculates plot height based on options and container dimensions
|
|
216
|
+
*/
|
|
217
|
+
private calculatePlotHeight;
|
|
218
|
+
/**
|
|
219
|
+
* Determines if X-axis labels should rotate
|
|
220
|
+
*/
|
|
221
|
+
private shouldLabelsRotate;
|
|
176
222
|
/**
|
|
177
223
|
* Creates x and y scales for the chart
|
|
178
224
|
*/
|
|
@@ -259,7 +305,17 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
|
|
|
259
305
|
toggleSegment(id: string): boolean;
|
|
260
306
|
private getContainerElement;
|
|
261
307
|
private clearChartArea;
|
|
308
|
+
/**
|
|
309
|
+
* Truncates long labels with ellipsis
|
|
310
|
+
*/
|
|
311
|
+
private truncateLabel;
|
|
312
|
+
/**
|
|
313
|
+
* Gets adaptive font size for X-axis based on width and item count
|
|
314
|
+
*/
|
|
262
315
|
private getXAxisTickFontSizeBasedOnWidth;
|
|
316
|
+
/**
|
|
317
|
+
* Gets adaptive font size for Y-axis based on height
|
|
318
|
+
*/
|
|
263
319
|
private getYAxisTickFontSizeBasedOnHeight;
|
|
264
320
|
private buildXAxisCommon;
|
|
265
321
|
private showMessage;
|
package/donut-chart/index.d.ts
CHANGED
|
@@ -122,7 +122,6 @@ type AXDonutChartValue = AXDonutChartData[];
|
|
|
122
122
|
* Displays data in a circular donut chart with interactive segments
|
|
123
123
|
*/
|
|
124
124
|
declare class AXDonutChartComponent extends AXChartComponent implements OnDestroy, AXChartLegendCompatible, AXChartComponentBase {
|
|
125
|
-
#private;
|
|
126
125
|
private cdr;
|
|
127
126
|
/** Chart data input */
|
|
128
127
|
data: _angular_core.InputSignal<AXDonutChartValue>;
|
|
@@ -167,6 +166,14 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
|
|
|
167
166
|
messages?: AXDonutChartMessages;
|
|
168
167
|
}>;
|
|
169
168
|
private readonly TOOLTIP_GAP;
|
|
169
|
+
private readonly HIGHLIGHT_TRANSITION_DURATION;
|
|
170
|
+
private readonly HIGHLIGHT_TRANSITION_NAME;
|
|
171
|
+
private readonly SEGMENT_ANIMATION_DELAY;
|
|
172
|
+
private readonly LABEL_ANIMATION_DELAY;
|
|
173
|
+
private readonly MIN_CHART_DIMENSION;
|
|
174
|
+
private readonly MIN_CHART_FOR_LABELS;
|
|
175
|
+
private readonly DIMMED_OPACITY;
|
|
176
|
+
private readonly VISIBLE_OPACITY;
|
|
170
177
|
protected effectiveMessages: _angular_core.Signal<{
|
|
171
178
|
noData: string;
|
|
172
179
|
noDataHelp: string;
|
|
@@ -179,11 +186,16 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
|
|
|
179
186
|
protected getColor(index: number): string;
|
|
180
187
|
protected isSegmentHidden(id: string): boolean;
|
|
181
188
|
constructor();
|
|
189
|
+
private readonly dataChangeEffect;
|
|
182
190
|
/**
|
|
183
191
|
* Highlights a specific segment by ID
|
|
184
192
|
* @param id The segment ID to highlight, or null to clear highlight
|
|
185
193
|
*/
|
|
186
194
|
highlightSegment(id: string | null): void;
|
|
195
|
+
private clearAllHighlights;
|
|
196
|
+
private dimNonTargetSegments;
|
|
197
|
+
private highlightTargetSegment;
|
|
198
|
+
private getSegmentDataById;
|
|
187
199
|
/**
|
|
188
200
|
* Toggles visibility of a segment by ID
|
|
189
201
|
* @param id Segment ID to toggle
|
|
@@ -197,7 +209,7 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
|
|
|
197
209
|
protected loadD3(): Promise<void>;
|
|
198
210
|
protected onSegmentClick(item: AXDonutChartData): void;
|
|
199
211
|
/**
|
|
200
|
-
* Creates the donut chart
|
|
212
|
+
* Creates the donut chart from current data
|
|
201
213
|
*/
|
|
202
214
|
createChart(): void;
|
|
203
215
|
/**
|
|
@@ -226,19 +238,45 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
|
|
|
226
238
|
private renderDonutChart;
|
|
227
239
|
/**
|
|
228
240
|
* Create SVG element with filter definitions for shadows
|
|
241
|
+
* @returns D3 SVG selection (any type due to dynamic D3 loading)
|
|
229
242
|
*/
|
|
230
243
|
private createSvgWithFilters;
|
|
231
244
|
/**
|
|
232
245
|
* Create and render the donut segments with animations
|
|
233
246
|
*/
|
|
234
247
|
private createDonutSegments;
|
|
248
|
+
private isChartLargeEnoughForLabels;
|
|
249
|
+
private addDataLabels;
|
|
235
250
|
/**
|
|
236
|
-
*
|
|
251
|
+
* Calculates optimal font size for label based on segment size
|
|
252
|
+
* Uses smart dynamic sizing with readability constraints
|
|
237
253
|
*/
|
|
254
|
+
private calculateLabelFontSize;
|
|
255
|
+
private formatPercentage;
|
|
256
|
+
private buildLabelText;
|
|
257
|
+
/**
|
|
258
|
+
* Truncates label text to fit within the arc segment
|
|
259
|
+
* Uses smart truncation: tries full label, then label only, then percentage only, then truncated percentage
|
|
260
|
+
* Calculates chord length (straight line) since text is rendered horizontally, not along the arc
|
|
261
|
+
*/
|
|
262
|
+
private getTruncatedLabelText;
|
|
263
|
+
/**
|
|
264
|
+
* Checks if text fits within available width using conservative estimation
|
|
265
|
+
* Uses 0.65em per character to account for font variations
|
|
266
|
+
*/
|
|
267
|
+
private doesTextFit;
|
|
268
|
+
/**
|
|
269
|
+
* Truncates text to fit within available width with ellipsis
|
|
270
|
+
* Uses conservative character width to prevent overflow
|
|
271
|
+
* Adapts character width estimation based on font size
|
|
272
|
+
*/
|
|
273
|
+
private truncateTextToFit;
|
|
274
|
+
private getSegmentColor;
|
|
238
275
|
/**
|
|
239
276
|
* Handle hover effects on a segment
|
|
240
277
|
*/
|
|
241
278
|
private handleSliceHover;
|
|
279
|
+
private showTooltip;
|
|
242
280
|
/**
|
|
243
281
|
* Handles mouse leave from segments
|
|
244
282
|
*/
|
|
@@ -263,6 +301,7 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
|
|
|
263
301
|
private renderMessage;
|
|
264
302
|
/**
|
|
265
303
|
* Gets an accessibility label describing the donut chart for screen readers
|
|
304
|
+
* @returns Descriptive string for screen readers
|
|
266
305
|
*/
|
|
267
306
|
protected getAccessibilityLabel(): string;
|
|
268
307
|
/**
|