@acorex/charts 19.15.0-next.22 → 19.15.0-next.25
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/lib/bar-chart.component.d.ts +32 -1
- package/chart-legend/index.d.ts +2 -0
- package/chart-legend/lib/chart-legend.component.d.ts +60 -0
- package/chart-legend/lib/chart-legend.type.d.ts +40 -0
- package/donut-chart/lib/donut-chart.component.d.ts +9 -5
- package/fesm2022/acorex-charts-bar-chart.mjs +229 -38
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-legend.mjs +109 -0
- package/fesm2022/acorex-charts-chart-legend.mjs.map +1 -0
- package/fesm2022/acorex-charts-chart-tooltip.mjs +4 -4
- package/fesm2022/acorex-charts-chart-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +179 -69
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-gauge-chart.mjs +3 -3
- package/fesm2022/acorex-charts-hierarchy-chart.mjs +3 -3
- package/fesm2022/acorex-charts-line-chart.mjs +220 -104
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/line-chart/lib/line-chart.component.d.ts +9 -4
- package/package.json +7 -3
|
@@ -2,7 +2,7 @@ import { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';
|
|
|
2
2
|
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, inject, ChangeDetectorRef, input, output, viewChild, signal, computed, afterNextRender, effect, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
5
|
+
import { InjectionToken, inject, ChangeDetectorRef, input, output, viewChild, signal, computed, afterNextRender, effect, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
6
6
|
import { AX_GLOBAL_CONFIG } from '@acorex/core/config';
|
|
7
7
|
import { set } from 'lodash-es';
|
|
8
8
|
|
|
@@ -60,6 +60,7 @@ class AXDonutChartComponent {
|
|
|
60
60
|
hiddenSegments = new Set();
|
|
61
61
|
_initialized = signal(false);
|
|
62
62
|
_rendered = signal(false);
|
|
63
|
+
_isInitialAnimating = signal(false);
|
|
63
64
|
// Tooltip state
|
|
64
65
|
_tooltipVisible = signal(false);
|
|
65
66
|
_tooltipPosition = signal({ x: 0, y: 0 });
|
|
@@ -102,44 +103,81 @@ class AXDonutChartComponent {
|
|
|
102
103
|
this._initialized.set(true);
|
|
103
104
|
this.loadD3();
|
|
104
105
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
}
|
|
107
|
+
#eff = effect(() => {
|
|
108
|
+
// Access inputs to track them
|
|
109
|
+
this.data();
|
|
110
|
+
// this.effectiveOptions();
|
|
111
|
+
// Only update if already rendered
|
|
112
|
+
untracked(() => {
|
|
111
113
|
if (this._rendered()) {
|
|
112
114
|
this.updateChart();
|
|
113
115
|
}
|
|
114
116
|
});
|
|
115
|
-
}
|
|
117
|
+
});
|
|
116
118
|
/**
|
|
117
119
|
* Highlights a specific segment by ID
|
|
118
120
|
* @param id The segment ID to highlight, or null to clear highlight
|
|
119
121
|
*/
|
|
120
122
|
highlightSegment(id) {
|
|
123
|
+
if (this._isInitialAnimating())
|
|
124
|
+
return;
|
|
121
125
|
if (!this.svg)
|
|
122
126
|
return;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.classed('ax-donut-chart-highlighted', false)
|
|
127
|
-
.classed('ax-donut-chart-dimmed', false)
|
|
128
|
-
.attr('transform', 'scale(1)');
|
|
129
|
-
if (id !== null) {
|
|
130
|
-
// Highlight the target segment
|
|
127
|
+
const transitionDuration = 150;
|
|
128
|
+
// Helper to unhighlight all segments and reset them to their normal state
|
|
129
|
+
const unhighlightAllSegments = () => {
|
|
131
130
|
this.svg
|
|
132
131
|
.selectAll('path')
|
|
133
|
-
.
|
|
134
|
-
.classed('ax-donut-chart-
|
|
135
|
-
.
|
|
136
|
-
|
|
132
|
+
.classed('ax-donut-chart-highlighted', false)
|
|
133
|
+
.classed('ax-donut-chart-dimmed', false)
|
|
134
|
+
.transition()
|
|
135
|
+
.duration(transitionDuration)
|
|
136
|
+
.attr('transform', 'scale(1)')
|
|
137
|
+
.style('filter', null)
|
|
138
|
+
.style('opacity', 1);
|
|
139
|
+
this.segmentHover.emit(null);
|
|
140
|
+
};
|
|
141
|
+
// Helper to get full data for the segment ID
|
|
142
|
+
const getSegmentDataById = (segmentId) => {
|
|
143
|
+
return untracked(() => this.chartDataArray()).find((d) => d.id === segmentId) || null;
|
|
144
|
+
};
|
|
145
|
+
if (id === null) {
|
|
146
|
+
unhighlightAllSegments();
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const targetSegment = this.svg.selectAll('path').filter((d) => d?.data?.id === id);
|
|
150
|
+
if (targetSegment.empty()) {
|
|
151
|
+
unhighlightAllSegments(); // Target not found, so unhighlight all
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const isCurrentlyHighlighted = targetSegment.classed('ax-donut-chart-highlighted');
|
|
155
|
+
if (isCurrentlyHighlighted) {
|
|
156
|
+
unhighlightAllSegments(); // Toggle off if already highlighted
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
// Dim all segments that are NOT the target
|
|
137
160
|
this.svg
|
|
138
161
|
.selectAll('path')
|
|
139
162
|
.filter((d) => d?.data?.id !== id)
|
|
140
|
-
.classed('ax-donut-chart-
|
|
163
|
+
.classed('ax-donut-chart-highlighted', false) // Ensure not highlighted
|
|
164
|
+
.classed('ax-donut-chart-dimmed', true)
|
|
165
|
+
.transition()
|
|
166
|
+
.duration(transitionDuration)
|
|
167
|
+
.attr('transform', 'scale(1)') // Reset scale if it was previously highlighted
|
|
168
|
+
.style('filter', null) // Remove filter if it had one
|
|
169
|
+
.style('opacity', 0.5); // Dim opacity
|
|
170
|
+
// Highlight the target segment
|
|
171
|
+
targetSegment
|
|
172
|
+
.classed('ax-donut-chart-dimmed', false) // Ensure not dimmed
|
|
173
|
+
.classed('ax-donut-chart-highlighted', true)
|
|
174
|
+
.transition()
|
|
175
|
+
.duration(transitionDuration)
|
|
176
|
+
.attr('transform', 'scale(1.02)')
|
|
177
|
+
.style('filter', 'url(#ax-donut-chart-segment-shadow)') // Apply shadow
|
|
178
|
+
.style('opacity', 1); // Ensure full opacity
|
|
179
|
+
this.segmentHover.emit(getSegmentDataById(id));
|
|
141
180
|
}
|
|
142
|
-
this.cdr.detectChanges();
|
|
143
181
|
}
|
|
144
182
|
/**
|
|
145
183
|
* Toggles visibility of a segment by ID
|
|
@@ -147,7 +185,31 @@ class AXDonutChartComponent {
|
|
|
147
185
|
* @returns New visibility state (true = visible, false = hidden)
|
|
148
186
|
*/
|
|
149
187
|
toggleSegment(id) {
|
|
150
|
-
this.
|
|
188
|
+
const wasAllHidden = this.chartDataArray().length > 0 && this.chartDataArray().every((d) => this.isSegmentHidden(d.id));
|
|
189
|
+
if (this.hiddenSegments.has(id)) {
|
|
190
|
+
// Making a segment visible
|
|
191
|
+
this.hiddenSegments.delete(id);
|
|
192
|
+
// If all segments were previously hidden, we need to ensure the message is cleared
|
|
193
|
+
if (wasAllHidden) {
|
|
194
|
+
// Force complete DOM cleanup and redraw
|
|
195
|
+
if (this.chartContainerEl()?.nativeElement) {
|
|
196
|
+
// Clear everything in the container
|
|
197
|
+
this.d3?.select(this.chartContainerEl().nativeElement).selectAll('*').remove();
|
|
198
|
+
// Force full redraw
|
|
199
|
+
setTimeout(() => {
|
|
200
|
+
this.createChart();
|
|
201
|
+
}, 0);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.updateChart();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
// Hiding a segment
|
|
210
|
+
this.hiddenSegments.add(id);
|
|
211
|
+
this.updateChart();
|
|
212
|
+
}
|
|
151
213
|
return !this.isSegmentHidden(id);
|
|
152
214
|
}
|
|
153
215
|
ngOnDestroy() {
|
|
@@ -222,23 +284,27 @@ class AXDonutChartComponent {
|
|
|
222
284
|
showNoDataMessage() {
|
|
223
285
|
if (!this.chartContainerEl()?.nativeElement)
|
|
224
286
|
return;
|
|
225
|
-
// Clear existing contents
|
|
226
287
|
const container = this.chartContainerEl().nativeElement;
|
|
227
288
|
this.d3.select(container).selectAll('*').remove();
|
|
228
|
-
const
|
|
289
|
+
const messageContainer = this.d3
|
|
229
290
|
.select(container)
|
|
230
291
|
.append('div')
|
|
231
|
-
|
|
232
|
-
.
|
|
233
|
-
|
|
234
|
-
|
|
292
|
+
// Apply generic container class and specific background class
|
|
293
|
+
.attr('class', 'ax-donut-chart-no-data-message');
|
|
294
|
+
messageContainer
|
|
295
|
+
.append('div')
|
|
296
|
+
// Apply generic icon class and specific donut chart icon class
|
|
297
|
+
.attr('class', 'ax-chart-message-icon ax-donut-chart-no-data-icon')
|
|
298
|
+
.html('<i class="fa-light fa-chart-pie fa-2x"></i>'); // Donut chart icon
|
|
299
|
+
messageContainer
|
|
235
300
|
.append('div')
|
|
236
|
-
|
|
237
|
-
.
|
|
238
|
-
|
|
239
|
-
|
|
301
|
+
// Apply generic text class and specific donut chart text class
|
|
302
|
+
.attr('class', 'ax-chart-message-text ax-donut-chart-no-data-text')
|
|
303
|
+
.text('No data available');
|
|
304
|
+
messageContainer
|
|
240
305
|
.append('div')
|
|
241
|
-
|
|
306
|
+
// Apply generic help class and specific donut chart help class
|
|
307
|
+
.attr('class', 'ax-chart-message-help ax-donut-chart-no-data-help')
|
|
242
308
|
.text('Please provide data to display the chart');
|
|
243
309
|
}
|
|
244
310
|
/**
|
|
@@ -247,23 +313,27 @@ class AXDonutChartComponent {
|
|
|
247
313
|
showAllSegmentsHiddenMessage() {
|
|
248
314
|
if (!this.chartContainerEl()?.nativeElement)
|
|
249
315
|
return;
|
|
250
|
-
// Clear existing contents
|
|
251
316
|
const container = this.chartContainerEl().nativeElement;
|
|
252
|
-
this.d3.select(container).selectAll('
|
|
253
|
-
const
|
|
317
|
+
this.d3.select(container).selectAll('*').remove();
|
|
318
|
+
const messageContainer = this.d3
|
|
254
319
|
.select(container)
|
|
255
320
|
.append('div')
|
|
256
|
-
|
|
257
|
-
.
|
|
258
|
-
|
|
259
|
-
noDataMessage
|
|
321
|
+
// Apply generic container class and specific background class
|
|
322
|
+
.attr('class', 'ax-donut-chart-no-data-message');
|
|
323
|
+
messageContainer
|
|
260
324
|
.append('div')
|
|
261
|
-
|
|
325
|
+
// Apply generic icon class and specific donut chart icon class if any distinction is needed later
|
|
326
|
+
.attr('class', 'ax-chart-message-icon ax-donut-chart-no-data-icon')
|
|
262
327
|
.html('<i class="fa-light fa-eye-slash fa-2x"></i>');
|
|
263
|
-
|
|
264
|
-
|
|
328
|
+
messageContainer
|
|
329
|
+
.append('div')
|
|
330
|
+
// Apply generic text class and specific donut chart text class if needed
|
|
331
|
+
.attr('class', 'ax-chart-message-text ax-donut-chart-no-data-text')
|
|
332
|
+
.text('All segments are hidden');
|
|
333
|
+
messageContainer
|
|
265
334
|
.append('div')
|
|
266
|
-
|
|
335
|
+
// Apply generic help class and specific donut chart help class if needed
|
|
336
|
+
.attr('class', 'ax-chart-message-help ax-donut-chart-no-data-help')
|
|
267
337
|
.text('Please toggle visibility of at least one segment');
|
|
268
338
|
}
|
|
269
339
|
/**
|
|
@@ -323,6 +393,7 @@ class AXDonutChartComponent {
|
|
|
323
393
|
* Create and render the donut segments with animations
|
|
324
394
|
*/
|
|
325
395
|
createDonutSegments(chartWidth, chartHeight, data, total) {
|
|
396
|
+
this._isInitialAnimating.set(true);
|
|
326
397
|
// Create pie layout
|
|
327
398
|
const pie = this.d3
|
|
328
399
|
.pie()
|
|
@@ -363,7 +434,17 @@ class AXDonutChartComponent {
|
|
|
363
434
|
.enter()
|
|
364
435
|
.append('path')
|
|
365
436
|
.attr('class', 'ax-donut-chart-segment')
|
|
366
|
-
.attr('fill', (d
|
|
437
|
+
.attr('fill', (d /* d is PieArcDatum<AXDonutChartData> */) => {
|
|
438
|
+
const chartItem = d.data; // AXDonutChartData from visibleData
|
|
439
|
+
if (chartItem.color) {
|
|
440
|
+
// Prioritize explicit color on the item
|
|
441
|
+
return chartItem.color;
|
|
442
|
+
}
|
|
443
|
+
// Fallback: find original index for consistent palette color
|
|
444
|
+
const originalFullData = untracked(() => this.chartDataArray());
|
|
445
|
+
const originalIndex = originalFullData.findIndex((item) => item.id === chartItem.id);
|
|
446
|
+
return this.getColor(originalIndex !== -1 ? originalIndex : 0); // Ensure valid index
|
|
447
|
+
})
|
|
367
448
|
.style('opacity', 0)
|
|
368
449
|
.style('cursor', 'pointer') // Add cursor pointer to segments
|
|
369
450
|
.on('mouseenter', (event, d) => {
|
|
@@ -454,6 +535,22 @@ class AXDonutChartComponent {
|
|
|
454
535
|
.delay((d, i) => i * 50 + 200)
|
|
455
536
|
.style('opacity', 1);
|
|
456
537
|
}
|
|
538
|
+
// Determine when all animations are complete
|
|
539
|
+
const numSegments = this.pieData.length;
|
|
540
|
+
let maxIndividualDelay = 0;
|
|
541
|
+
if (numSegments > 0) {
|
|
542
|
+
// Base delay for segments
|
|
543
|
+
maxIndividualDelay = (numSegments - 1) * 50;
|
|
544
|
+
if (this.effectiveOptions().showDataLabels) {
|
|
545
|
+
// Labels have an additional fixed delay
|
|
546
|
+
maxIndividualDelay = Math.max(maxIndividualDelay, (numSegments - 1) * 50 + 200);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
const totalAnimationCycleTime = maxIndividualDelay + animationDuration;
|
|
550
|
+
setTimeout(() => {
|
|
551
|
+
this._isInitialAnimating.set(false);
|
|
552
|
+
this.cdr.detectChanges();
|
|
553
|
+
}, totalAnimationCycleTime);
|
|
457
554
|
}
|
|
458
555
|
/**
|
|
459
556
|
* Gets the appropriate D3 easing function based on the option string
|
|
@@ -486,11 +583,14 @@ class AXDonutChartComponent {
|
|
|
486
583
|
* Handle hover effects on a segment
|
|
487
584
|
*/
|
|
488
585
|
handleSliceHover(event, datum) {
|
|
586
|
+
if (this._isInitialAnimating())
|
|
587
|
+
return;
|
|
489
588
|
if (this.effectiveOptions().showTooltip !== false) {
|
|
490
589
|
const index = this.data().findIndex((item) => item.id === datum.id);
|
|
491
590
|
const color = datum.color || getChartColor(index, this.chartColors);
|
|
492
591
|
// Calculate percentage of total
|
|
493
|
-
|
|
592
|
+
// Ensure data() is accessed within a tracking context if it's a signal, or use untracked if appropriate
|
|
593
|
+
const total = untracked(() => this.data()).reduce((sum, item) => sum + item.value, 0);
|
|
494
594
|
const percentage = total > 0 ? ((datum.value / total) * 100).toFixed(1) : '0';
|
|
495
595
|
this._tooltipData.set({
|
|
496
596
|
title: datum.tooltipLabel || datum.label,
|
|
@@ -501,22 +601,30 @@ class AXDonutChartComponent {
|
|
|
501
601
|
this.updateTooltipPosition(event);
|
|
502
602
|
this._tooltipVisible.set(true);
|
|
503
603
|
}
|
|
604
|
+
this.highlightSegment(datum.id); // This will now also handle emitting segmentHover
|
|
605
|
+
// No direct segmentHover.emit(datum) here anymore
|
|
504
606
|
}
|
|
505
607
|
/**
|
|
506
608
|
* Handles mouse leave from segments
|
|
507
609
|
*/
|
|
508
610
|
handleSegmentLeave(event, d, normalArc) {
|
|
611
|
+
if (this._isInitialAnimating())
|
|
612
|
+
return;
|
|
509
613
|
// Hide tooltip
|
|
510
614
|
this._tooltipVisible.set(false);
|
|
511
615
|
this.cdr.detectChanges();
|
|
512
|
-
// Emit null to indicate no segment is hovered
|
|
513
|
-
this.segmentHover.emit(null);
|
|
514
|
-
// Remove hover effect
|
|
616
|
+
// Emit null to indicate no segment is hovered - highlightSegment will handle this.
|
|
617
|
+
// this.segmentHover.emit(null); // Removed
|
|
618
|
+
// Remove hover effect (visual style related to classes and scale)
|
|
619
|
+
// Calling highlightSegment with the ID of the segment being left.
|
|
620
|
+
// If it was highlighted, this will toggle it off and emit null for segmentHover.
|
|
621
|
+
this.highlightSegment(d.data.id);
|
|
622
|
+
// Animate the arc back to normal for the specific segment being left.
|
|
515
623
|
this.d3
|
|
516
624
|
.select(event.currentTarget)
|
|
517
625
|
.transition()
|
|
518
626
|
.duration(200)
|
|
519
|
-
.attr('d', (
|
|
627
|
+
.attr('d', (arcData) => normalArc(arcData)); // Ensure arcData is used if 'd' is shadowed
|
|
520
628
|
}
|
|
521
629
|
/**
|
|
522
630
|
* Updates tooltip position
|
|
@@ -546,20 +654,6 @@ class AXDonutChartComponent {
|
|
|
546
654
|
const y = Math.max(gap, Math.min(cursorY, container.height - tooltipRect.height - gap));
|
|
547
655
|
this._tooltipPosition.set({ x, y });
|
|
548
656
|
}
|
|
549
|
-
/**
|
|
550
|
-
* Toggles the visibility of a segment
|
|
551
|
-
*/
|
|
552
|
-
toggleSegmentVisibility(id) {
|
|
553
|
-
if (this.hiddenSegments.has(id)) {
|
|
554
|
-
this.hiddenSegments.delete(id);
|
|
555
|
-
}
|
|
556
|
-
else {
|
|
557
|
-
this.hiddenSegments.add(id);
|
|
558
|
-
}
|
|
559
|
-
// Hide tooltip when toggling segments
|
|
560
|
-
this._tooltipVisible.set(false);
|
|
561
|
-
this.updateChart();
|
|
562
|
-
}
|
|
563
657
|
/**
|
|
564
658
|
* Adds center display with total value
|
|
565
659
|
*/
|
|
@@ -633,12 +727,28 @@ class AXDonutChartComponent {
|
|
|
633
727
|
.join('; ');
|
|
634
728
|
return `Donut chart with ${data.length} segments. Total value: ${total}. ${segmentDescriptions}`;
|
|
635
729
|
}
|
|
636
|
-
|
|
637
|
-
|
|
730
|
+
/**
|
|
731
|
+
* Returns the data items for the legend
|
|
732
|
+
* @implements AXChartLegendCompatible
|
|
733
|
+
*/
|
|
734
|
+
getLegendItems() {
|
|
735
|
+
return this.chartDataArray().map((item, index) => {
|
|
736
|
+
return {
|
|
737
|
+
id: item.id,
|
|
738
|
+
name: item.label || `Segment ${index + 1}`,
|
|
739
|
+
value: item.value,
|
|
740
|
+
color: item.color || this.getColor(index),
|
|
741
|
+
percentage: (item.value / this.data().reduce((sum, item) => sum + item.value, 0)) * 100,
|
|
742
|
+
hidden: this.isSegmentHidden(item.id),
|
|
743
|
+
};
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AXDonutChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
747
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: AXDonutChartComponent, isStandalone: true, selector: "ax-donut-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { segmentClick: "segmentClick", segmentHover: "segmentHover" }, viewQueries: [{ propertyName: "chartContainerEl", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n", styles: ["ax-donut-chart{display:block;width:100%;height:100%;--ax-comp-donut-chart-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-donut-chart-data-labels-color: var(--ax-sys-color-dark);--ax-comp-donut-chart-value-color: var(--ax-sys-color-on-lightest-surface)}ax-donut-chart .ax-donut-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-comp-donut-chart-data-labels-color));background-color:rgb(var(--ax-comp-donut-chart-bg-color))}ax-donut-chart .ax-donut-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-donut-chart .ax-donut-chart-no-data-message{text-align:center;background-color:rgb(var(--ax-comp-donut-chart-bg-color));padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 12px #00000014;width:80%;max-width:300px}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-help{font-size:.8rem;opacity:.6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
638
748
|
}
|
|
639
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AXDonutChartComponent, decorators: [{
|
|
640
750
|
type: Component,
|
|
641
|
-
args: [{ selector: 'ax-donut-chart', encapsulation: ViewEncapsulation.None, imports: [CommonModule, AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n", styles: ["ax-donut-chart{display:block;width:100%;height:100%;--ax-comp-donut-chart-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-donut-chart-data-labels-color: var(--ax-sys-color-dark);--ax-comp-donut-chart-value-color: var(--ax-sys-color-on-lightest-surface)}ax-donut-chart .ax-donut-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-comp-donut-chart-data-labels-color));background-color:rgb(var(--ax-comp-donut-chart-bg-color))}ax-donut-chart .ax-donut-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-donut-chart .ax-donut-chart-no-data-message{
|
|
751
|
+
args: [{ selector: 'ax-donut-chart', encapsulation: ViewEncapsulation.None, imports: [CommonModule, AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-donut-chart\" #chartContainer role=\"img\" [attr.aria-label]=\"getAccessibilityLabel()\" tabindex=\"0\">\n <!-- Tooltip component -->\n <ax-chart-tooltip\n [visible]=\"tooltipVisible()\"\n [position]=\"tooltipPosition()\"\n [data]=\"tooltipData()\"\n [showPercentage]=\"true\"\n ></ax-chart-tooltip>\n</div>\n", styles: ["ax-donut-chart{display:block;width:100%;height:100%;--ax-comp-donut-chart-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-donut-chart-data-labels-color: var(--ax-sys-color-dark);--ax-comp-donut-chart-value-color: var(--ax-sys-color-on-lightest-surface)}ax-donut-chart .ax-donut-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;overflow:hidden;color:rgb(var(--ax-comp-donut-chart-data-labels-color));background-color:rgb(var(--ax-comp-donut-chart-bg-color))}ax-donut-chart .ax-donut-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:visible}ax-donut-chart .ax-donut-chart-no-data-message{text-align:center;background-color:rgb(var(--ax-comp-donut-chart-bg-color));padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 12px #00000014;width:80%;max-width:300px}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-donut-chart .ax-donut-chart-no-data-message .ax-donut-chart-no-data-help{font-size:.8rem;opacity:.6}\n"] }]
|
|
642
752
|
}], ctorParameters: () => [] });
|
|
643
753
|
|
|
644
754
|
/**
|