@acorex/charts 21.0.0-next.10 → 21.0.0-next.12
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 +9 -5
- package/donut-chart/index.d.ts +4 -5
- package/fesm2022/acorex-charts-bar-chart.mjs +96 -17
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +6 -11
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-gauge-chart.mjs +13 -12
- package/fesm2022/acorex-charts-gauge-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-hierarchy-chart.mjs +19 -13
- package/fesm2022/acorex-charts-hierarchy-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-line-chart.mjs +7 -17
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts.mjs +71 -7
- package/fesm2022/acorex-charts.mjs.map +1 -1
- package/gauge-chart/index.d.ts +6 -6
- package/hierarchy-chart/index.d.ts +4 -5
- package/index.d.ts +39 -4
- package/line-chart/index.d.ts +4 -6
- package/package.json +1 -3
package/bar-chart/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { AXAnimationEasing, NXNativeEvent,
|
|
1
|
+
import * as _acorex_charts from '@acorex/charts';
|
|
2
|
+
import { AXAnimationEasing, NXNativeEvent, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
|
|
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';
|
|
7
6
|
import { AXChartLegendCompatible, AXChartLegendItem } from '@acorex/charts/chart-legend';
|
|
8
7
|
import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
|
|
9
8
|
|
|
@@ -88,7 +87,7 @@ type AXBarChartValue = AXBarChartData[] | AXBarChartClusteredData[];
|
|
|
88
87
|
* Bar Chart Component
|
|
89
88
|
* Renders data as vertical bars with interactive hover effects and animations
|
|
90
89
|
*/
|
|
91
|
-
declare class AXBarChartComponent extends
|
|
90
|
+
declare class AXBarChartComponent extends AXChartComponent implements OnDestroy, AXChartLegendCompatible, AXChartComponentBase {
|
|
92
91
|
/** Chart data input */
|
|
93
92
|
data: _angular_core.InputSignal<AXBarChartValue>;
|
|
94
93
|
/** Chart options input */
|
|
@@ -137,7 +136,7 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
|
|
|
137
136
|
barWidth?: number;
|
|
138
137
|
cornerRadius?: number;
|
|
139
138
|
animationDuration?: number;
|
|
140
|
-
animationEasing?:
|
|
139
|
+
animationEasing?: _acorex_charts.AXAnimationEasing;
|
|
141
140
|
messages?: AXBarChartMessages;
|
|
142
141
|
}>;
|
|
143
142
|
protected effectiveMessages: _angular_core.Signal<{
|
|
@@ -215,8 +214,13 @@ declare class AXBarChartComponent extends NXComponent implements OnDestroy, AXCh
|
|
|
215
214
|
private handleBarHover;
|
|
216
215
|
/**
|
|
217
216
|
* Updates tooltip position based on mouse coordinates
|
|
217
|
+
* Enhanced to handle overflow issues by positioning tooltips more intelligently
|
|
218
218
|
*/
|
|
219
219
|
private updateTooltipPosition;
|
|
220
|
+
/**
|
|
221
|
+
* Enhanced tooltip positioning that considers chart boundaries and prevents overflow
|
|
222
|
+
*/
|
|
223
|
+
private computeEnhancedTooltipPosition;
|
|
220
224
|
/**
|
|
221
225
|
* Handles bar click event
|
|
222
226
|
*/
|
package/donut-chart/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { AXAnimationEasing } from '@acorex/
|
|
1
|
+
import * as _acorex_charts from '@acorex/charts';
|
|
2
|
+
import { AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
|
|
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';
|
|
7
6
|
import { AXChartLegendCompatible, AXChartLegendItem } from '@acorex/charts/chart-legend';
|
|
8
7
|
import { AXChartTooltipData } from '@acorex/charts/chart-tooltip';
|
|
9
8
|
|
|
@@ -122,7 +121,7 @@ type AXDonutChartValue = AXDonutChartData[];
|
|
|
122
121
|
* Donut Chart Component
|
|
123
122
|
* Displays data in a circular donut chart with interactive segments
|
|
124
123
|
*/
|
|
125
|
-
declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatible, AXChartComponentBase {
|
|
124
|
+
declare class AXDonutChartComponent extends AXChartComponent implements OnDestroy, AXChartLegendCompatible, AXChartComponentBase {
|
|
126
125
|
#private;
|
|
127
126
|
private cdr;
|
|
128
127
|
/** Chart data input */
|
|
@@ -164,7 +163,7 @@ declare class AXDonutChartComponent implements OnDestroy, AXChartLegendCompatibl
|
|
|
164
163
|
donutWidth?: number;
|
|
165
164
|
cornerRadius?: number;
|
|
166
165
|
animationDuration?: number;
|
|
167
|
-
animationEasing?:
|
|
166
|
+
animationEasing?: _acorex_charts.AXAnimationEasing;
|
|
168
167
|
messages?: AXDonutChartMessages;
|
|
169
168
|
}>;
|
|
170
169
|
private readonly TOOLTIP_GAP;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AX_CHART_COLOR_PALETTE, getEasingFunction, computeTooltipPosition, getChartColor } from '@acorex/charts';
|
|
1
|
+
import { AXChartComponent, AX_CHART_COLOR_PALETTE, getEasingFunction, getChartColor } from '@acorex/charts';
|
|
3
2
|
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken,
|
|
6
|
-
import { AX_GLOBAL_CONFIG } from '@acorex/core/config';
|
|
7
|
-
import { set } from 'lodash-es';
|
|
4
|
+
import { InjectionToken, input, output, viewChild, signal, inject, computed, afterNextRender, effect, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
8
5
|
|
|
9
6
|
const AXBarChartDefaultConfig = {
|
|
10
7
|
showXAxis: true,
|
|
@@ -28,11 +25,7 @@ const AXBarChartDefaultConfig = {
|
|
|
28
25
|
};
|
|
29
26
|
const AX_BAR_CHART_CONFIG = new InjectionToken('AX_BAR_CHART_CONFIG', {
|
|
30
27
|
providedIn: 'root',
|
|
31
|
-
factory: () =>
|
|
32
|
-
const global = inject(AX_GLOBAL_CONFIG);
|
|
33
|
-
set(global, 'chart.barChart', AXBarChartDefaultConfig);
|
|
34
|
-
return AXBarChartDefaultConfig;
|
|
35
|
-
},
|
|
28
|
+
factory: () => AXBarChartDefaultConfig,
|
|
36
29
|
});
|
|
37
30
|
function barChartConfig(config = {}) {
|
|
38
31
|
const result = {
|
|
@@ -46,7 +39,7 @@ function barChartConfig(config = {}) {
|
|
|
46
39
|
* Bar Chart Component
|
|
47
40
|
* Renders data as vertical bars with interactive hover effects and animations
|
|
48
41
|
*/
|
|
49
|
-
class AXBarChartComponent extends
|
|
42
|
+
class AXBarChartComponent extends AXChartComponent {
|
|
50
43
|
// Inputs
|
|
51
44
|
/** Chart data input */
|
|
52
45
|
data = input([], ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
@@ -600,13 +593,28 @@ class AXBarChartComponent extends NXComponent {
|
|
|
600
593
|
.style('fill', 'rgb(var(--ax-comp-bar-chart-data-labels-color))')
|
|
601
594
|
.style('opacity', 0) // Start invisible for animation
|
|
602
595
|
.text((d) => d.value);
|
|
603
|
-
// Animate data labels
|
|
596
|
+
// Animate data labels with smart positioning to avoid clipping
|
|
604
597
|
barGroups
|
|
605
598
|
.selectAll('.ax-bar-chart-data-label')
|
|
606
599
|
.transition()
|
|
607
600
|
.duration(animationDuration)
|
|
608
601
|
.delay((d, i) => i * 50 + 100) // Slightly delayed after bar animation
|
|
609
|
-
.attr('y', (d) =>
|
|
602
|
+
.attr('y', (d) => {
|
|
603
|
+
const barTop = this.yScale(d.value);
|
|
604
|
+
const labelOffset = 8;
|
|
605
|
+
const minTopSpace = 20; // Minimum space from top of chart
|
|
606
|
+
// If bar is near the top (100% or close), position label inside the bar
|
|
607
|
+
if (barTop < minTopSpace) {
|
|
608
|
+
return barTop + labelOffset; // Position inside the bar
|
|
609
|
+
}
|
|
610
|
+
// Otherwise, position above the bar
|
|
611
|
+
return barTop - labelOffset;
|
|
612
|
+
})
|
|
613
|
+
.attr('data-inside-bar', (d) => {
|
|
614
|
+
const barTop = this.yScale(d.value);
|
|
615
|
+
const minTopSpace = 20;
|
|
616
|
+
return barTop < minTopSpace ? 'true' : 'false';
|
|
617
|
+
})
|
|
610
618
|
.style('opacity', 1)
|
|
611
619
|
.ease(animationEasing);
|
|
612
620
|
}
|
|
@@ -734,7 +742,25 @@ class AXBarChartComponent extends NXComponent {
|
|
|
734
742
|
.delay((_, i) => i * 50 + 100)
|
|
735
743
|
.attr('y', (d) => {
|
|
736
744
|
const item = d.group.chartData[d.seriesIndex];
|
|
737
|
-
|
|
745
|
+
if (!item)
|
|
746
|
+
return this.height;
|
|
747
|
+
const barTop = this.yScale(item.value);
|
|
748
|
+
const labelOffset = 8;
|
|
749
|
+
const minTopSpace = 20; // Minimum space from top of chart
|
|
750
|
+
// If bar is near the top (100% or close), position label inside the bar
|
|
751
|
+
if (barTop < minTopSpace) {
|
|
752
|
+
return barTop + labelOffset; // Position inside the bar
|
|
753
|
+
}
|
|
754
|
+
// Otherwise, position above the bar
|
|
755
|
+
return barTop - labelOffset;
|
|
756
|
+
})
|
|
757
|
+
.attr('data-inside-bar', (d) => {
|
|
758
|
+
const item = d.group.chartData[d.seriesIndex];
|
|
759
|
+
if (!item)
|
|
760
|
+
return 'false';
|
|
761
|
+
const barTop = this.yScale(item.value);
|
|
762
|
+
const minTopSpace = 20;
|
|
763
|
+
return barTop < minTopSpace ? 'true' : 'false';
|
|
738
764
|
})
|
|
739
765
|
.style('opacity', 1)
|
|
740
766
|
.ease(animationEasing);
|
|
@@ -827,6 +853,7 @@ class AXBarChartComponent extends NXComponent {
|
|
|
827
853
|
}
|
|
828
854
|
/**
|
|
829
855
|
* Updates tooltip position based on mouse coordinates
|
|
856
|
+
* Enhanced to handle overflow issues by positioning tooltips more intelligently
|
|
830
857
|
*/
|
|
831
858
|
updateTooltipPosition(event) {
|
|
832
859
|
const containerEl = this.chartContainerEl()?.nativeElement;
|
|
@@ -835,9 +862,61 @@ class AXBarChartComponent extends NXComponent {
|
|
|
835
862
|
const containerRect = containerEl.getBoundingClientRect();
|
|
836
863
|
const tooltipEl = containerEl.querySelector('.chart-tooltip');
|
|
837
864
|
const tooltipRect = tooltipEl ? tooltipEl.getBoundingClientRect() : null;
|
|
838
|
-
|
|
865
|
+
// Enhanced positioning logic for better tooltip placement
|
|
866
|
+
const pos = this.computeEnhancedTooltipPosition(containerRect, tooltipRect, event.clientX, event.clientY);
|
|
839
867
|
this._tooltipPosition.set(pos);
|
|
840
868
|
}
|
|
869
|
+
/**
|
|
870
|
+
* Enhanced tooltip positioning that considers chart boundaries and prevents overflow
|
|
871
|
+
*/
|
|
872
|
+
computeEnhancedTooltipPosition(containerRect, tooltipRect, clientX, clientY) {
|
|
873
|
+
const cursorX = clientX - containerRect.left;
|
|
874
|
+
const cursorY = clientY - containerRect.top;
|
|
875
|
+
if (!tooltipRect) {
|
|
876
|
+
// Default positioning when tooltip dimensions are unknown
|
|
877
|
+
return {
|
|
878
|
+
x: Math.min(cursorX + this.TOOLTIP_GAP, containerRect.width - this.TOOLTIP_GAP),
|
|
879
|
+
y: Math.max(this.TOOLTIP_GAP, Math.min(cursorY, containerRect.height - this.TOOLTIP_GAP)),
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
// Calculate available space in each direction
|
|
883
|
+
const spaceRight = containerRect.width - cursorX;
|
|
884
|
+
const spaceLeft = cursorX;
|
|
885
|
+
const spaceBelow = containerRect.height - cursorY;
|
|
886
|
+
const spaceAbove = cursorY;
|
|
887
|
+
// Determine best horizontal position
|
|
888
|
+
let x;
|
|
889
|
+
if (spaceRight >= tooltipRect.width + this.TOOLTIP_GAP) {
|
|
890
|
+
// Position to the right of cursor
|
|
891
|
+
x = cursorX + this.TOOLTIP_GAP;
|
|
892
|
+
}
|
|
893
|
+
else if (spaceLeft >= tooltipRect.width + this.TOOLTIP_GAP) {
|
|
894
|
+
// Position to the left of cursor
|
|
895
|
+
x = cursorX - tooltipRect.width - this.TOOLTIP_GAP;
|
|
896
|
+
}
|
|
897
|
+
else {
|
|
898
|
+
// Center horizontally if neither side has enough space
|
|
899
|
+
x = Math.max(this.TOOLTIP_GAP, Math.min((containerRect.width - tooltipRect.width) / 2, containerRect.width - tooltipRect.width - this.TOOLTIP_GAP));
|
|
900
|
+
}
|
|
901
|
+
// Calculate best vertical position
|
|
902
|
+
let y;
|
|
903
|
+
if (spaceBelow >= tooltipRect.height + this.TOOLTIP_GAP) {
|
|
904
|
+
// Position below cursor
|
|
905
|
+
y = cursorY + this.TOOLTIP_GAP;
|
|
906
|
+
}
|
|
907
|
+
else if (spaceAbove >= tooltipRect.height + this.TOOLTIP_GAP) {
|
|
908
|
+
// Position above cursor
|
|
909
|
+
y = cursorY - tooltipRect.height - this.TOOLTIP_GAP;
|
|
910
|
+
}
|
|
911
|
+
else {
|
|
912
|
+
// Center vertically if neither direction has enough space
|
|
913
|
+
y = Math.max(this.TOOLTIP_GAP, Math.min((containerRect.height - tooltipRect.height) / 2, containerRect.height - tooltipRect.height - this.TOOLTIP_GAP));
|
|
914
|
+
}
|
|
915
|
+
// Ensure tooltip stays within container bounds
|
|
916
|
+
x = Math.max(this.TOOLTIP_GAP, Math.min(x, containerRect.width - tooltipRect.width - this.TOOLTIP_GAP));
|
|
917
|
+
y = Math.max(this.TOOLTIP_GAP, Math.min(y, containerRect.height - tooltipRect.height - this.TOOLTIP_GAP));
|
|
918
|
+
return { x, y };
|
|
919
|
+
}
|
|
841
920
|
/**
|
|
842
921
|
* Handles bar click event
|
|
843
922
|
*/
|
|
@@ -1107,11 +1186,11 @@ class AXBarChartComponent extends NXComponent {
|
|
|
1107
1186
|
container.append('div').attr('class', 'ax-chart-message-help ax-bar-chart-no-data-help').text(helpText);
|
|
1108
1187
|
}
|
|
1109
1188
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXBarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1110
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.6", type: AXBarChartComponent, isStandalone: true, selector: "ax-bar-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: { barClick: "barClick" }, viewQueries: [{ propertyName: "chartContainerEl", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-bar-chart\" role=\"img\" #chartContainer>\n <!-- Shared 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-bar-chart{display:block;width:100%;height:100%;min-height:200px;--ax-comp-bar-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-data-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-grid-lines-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-bg-color: 0, 0, 0, 0}ax-bar-chart .ax-bar-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;
|
|
1189
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.6", type: AXBarChartComponent, isStandalone: true, selector: "ax-bar-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: { barClick: "barClick" }, viewQueries: [{ propertyName: "chartContainerEl", first: true, predicate: ["chartContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-bar-chart\" role=\"img\" #chartContainer>\n <!-- Shared 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-bar-chart{display:block;width:100%;height:100%;min-height:200px;--ax-comp-bar-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-data-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-grid-lines-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-bg-color: 0, 0, 0, 0}ax-bar-chart .ax-bar-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;background-color:rgba(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:hidden}ax-bar-chart .ax-bar-chart svg g:has(text){font-family:inherit}ax-bar-chart .ax-bar-chart .ax-bar-chart-data-label{pointer-events:none;-webkit-user-select:none;user-select:none}ax-bar-chart .ax-bar-chart .ax-bar-chart-data-label[data-inside-bar=true]{fill:#fff;font-weight:600;text-shadow:0 0 2px rgba(0,0,0,.3)}ax-bar-chart .ax-bar-chart-no-data-message{text-align:center;background-color:rgb(var(--ax-comp-bar-chart-bg-color));padding:1.5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-surface));width:80%;max-width:300px}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-help{font-size:.8rem;opacity:.6}\n"], dependencies: [{ kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1111
1190
|
}
|
|
1112
1191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: AXBarChartComponent, decorators: [{
|
|
1113
1192
|
type: Component,
|
|
1114
|
-
args: [{ selector: 'ax-bar-chart', encapsulation: ViewEncapsulation.None, imports: [AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-bar-chart\" role=\"img\" #chartContainer>\n <!-- Shared 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-bar-chart{display:block;width:100%;height:100%;min-height:200px;--ax-comp-bar-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-data-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-grid-lines-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-bg-color: 0, 0, 0, 0}ax-bar-chart .ax-bar-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;
|
|
1193
|
+
args: [{ selector: 'ax-bar-chart', encapsulation: ViewEncapsulation.None, imports: [AXChartTooltipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-bar-chart\" role=\"img\" #chartContainer>\n <!-- Shared 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-bar-chart{display:block;width:100%;height:100%;min-height:200px;--ax-comp-bar-chart-axis-label-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-data-labels-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-grid-lines-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-bar-chart-bg-color: 0, 0, 0, 0}ax-bar-chart .ax-bar-chart{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;border-radius:.5rem;background-color:rgba(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{width:100%;height:100%;max-width:100%;max-height:100%;overflow:hidden}ax-bar-chart .ax-bar-chart svg g:has(text){font-family:inherit}ax-bar-chart .ax-bar-chart .ax-bar-chart-data-label{pointer-events:none;-webkit-user-select:none;user-select:none}ax-bar-chart .ax-bar-chart .ax-bar-chart-data-label[data-inside-bar=true]{fill:#fff;font-weight:600;text-shadow:0 0 2px rgba(0,0,0,.3)}ax-bar-chart .ax-bar-chart-no-data-message{text-align:center;background-color:rgb(var(--ax-comp-bar-chart-bg-color));padding:1.5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-surface));width:80%;max-width:300px}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-icon{opacity:.6;margin-bottom:.75rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-text{font-size:1rem;font-weight:600;margin-bottom:.5rem}ax-bar-chart .ax-bar-chart-no-data-message .ax-bar-chart-no-data-help{font-size:.8rem;opacity:.6}\n"] }]
|
|
1115
1194
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], barClick: [{ type: i0.Output, args: ["barClick"] }], chartContainerEl: [{ type: i0.ViewChild, args: ['chartContainer', { isSignal: true }] }] } });
|
|
1116
1195
|
|
|
1117
1196
|
/**
|