@acorex/charts 21.0.3-next.3 → 21.0.3-next.30
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/fesm2022/acorex-charts-bar-chart.mjs +52 -77
- package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-legend.mjs +1 -1
- package/fesm2022/acorex-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/acorex-charts-chart-tooltip.mjs +1 -1
- package/fesm2022/acorex-charts-chart-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-charts-donut-chart.mjs +80 -87
- package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-funnel-chart.mjs +6 -8
- package/fesm2022/acorex-charts-funnel-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-gauge-chart.mjs +53 -34
- package/fesm2022/acorex-charts-gauge-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-heatmap-chart.mjs +6 -9
- package/fesm2022/acorex-charts-heatmap-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-hierarchy-chart.mjs +24 -65
- package/fesm2022/acorex-charts-hierarchy-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts-line-chart.mjs +31 -98
- package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
- package/fesm2022/acorex-charts.mjs +65 -1
- package/fesm2022/acorex-charts.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-charts-bar-chart.d.ts +3 -28
- package/types/acorex-charts-donut-chart.d.ts +8 -22
- package/types/acorex-charts-funnel-chart.d.ts +3 -25
- package/types/acorex-charts-gauge-chart.d.ts +6 -21
- package/types/acorex-charts-heatmap-chart.d.ts +2 -28
- package/types/acorex-charts-hierarchy-chart.d.ts +2 -27
- package/types/acorex-charts-line-chart.d.ts +2 -38
- package/types/acorex-charts.d.ts +52 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AXChartComponent, AX_CHART_COLOR_PALETTE, formatLargeNumber, getEasingFunction, getChartColor } from '@acorex/charts';
|
|
1
|
+
import { AX_CHART_DEFAULT_MESSAGES, AXChartComponent, AX_CHART_COLOR_PALETTE, mergeChartOptions, mergeChartMessages, resolveBarWidthFraction, formatLargeNumber, getEasingFunction, renderChartEmptyMessage, getChartColor } from '@acorex/charts';
|
|
2
2
|
import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, input, output, viewChild, signal, inject, computed, afterNextRender, effect, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
@@ -15,12 +15,8 @@ const AXBarChartDefaultConfig = {
|
|
|
15
15
|
animationDuration: 800,
|
|
16
16
|
animationEasing: 'cubic-out',
|
|
17
17
|
messages: {
|
|
18
|
-
|
|
19
|
-
noDataHelp: 'Please provide data to display the chart',
|
|
20
|
-
allHidden: 'All bars are hidden',
|
|
21
|
-
allHiddenHelp: 'Click on legend items to show bars',
|
|
18
|
+
...AX_CHART_DEFAULT_MESSAGES,
|
|
22
19
|
noDataIcon: 'fa-light fa-chart-column',
|
|
23
|
-
allHiddenIcon: 'fa-light fa-eye-slash',
|
|
24
20
|
},
|
|
25
21
|
};
|
|
26
22
|
const AX_BAR_CHART_CONFIG = new InjectionToken('AX_BAR_CHART_CONFIG', {
|
|
@@ -28,11 +24,14 @@ const AX_BAR_CHART_CONFIG = new InjectionToken('AX_BAR_CHART_CONFIG', {
|
|
|
28
24
|
factory: () => AXBarChartDefaultConfig,
|
|
29
25
|
});
|
|
30
26
|
function barChartConfig(config = {}) {
|
|
31
|
-
|
|
27
|
+
return {
|
|
32
28
|
...AXBarChartDefaultConfig,
|
|
33
29
|
...config,
|
|
30
|
+
messages: {
|
|
31
|
+
...AXBarChartDefaultConfig.messages,
|
|
32
|
+
...config.messages,
|
|
33
|
+
},
|
|
34
34
|
};
|
|
35
|
-
return result;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
/**
|
|
@@ -129,27 +128,9 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
129
128
|
// Inject AXPlatform
|
|
130
129
|
// Removed unused AXPlatform injection
|
|
131
130
|
// Configuration with defaults
|
|
132
|
-
effectiveOptions = computed(() => {
|
|
133
|
-
return {
|
|
134
|
-
...this.configToken,
|
|
135
|
-
...this.options(),
|
|
136
|
-
};
|
|
137
|
-
}, ...(ngDevMode ? [{ debugName: "effectiveOptions" }] : /* istanbul ignore next */ []));
|
|
131
|
+
effectiveOptions = computed(() => mergeChartOptions(this.configToken, this.options()), ...(ngDevMode ? [{ debugName: "effectiveOptions" }] : /* istanbul ignore next */ []));
|
|
138
132
|
// Messages with defaults
|
|
139
|
-
effectiveMessages = computed(() => {
|
|
140
|
-
const defaultMessages = {
|
|
141
|
-
noData: 'No data available',
|
|
142
|
-
noDataHelp: 'Please provide data to display the chart',
|
|
143
|
-
allHidden: 'All bars are hidden',
|
|
144
|
-
allHiddenHelp: 'Click on legend items to show bars',
|
|
145
|
-
noDataIcon: 'fa-light fa-chart-column',
|
|
146
|
-
allHiddenIcon: 'fa-light fa-eye-slash',
|
|
147
|
-
};
|
|
148
|
-
return {
|
|
149
|
-
...defaultMessages,
|
|
150
|
-
...this.effectiveOptions().messages,
|
|
151
|
-
};
|
|
152
|
-
}, ...(ngDevMode ? [{ debugName: "effectiveMessages" }] : /* istanbul ignore next */ []));
|
|
133
|
+
effectiveMessages = computed(() => mergeChartMessages(this.configToken.messages, this.options()?.messages), ...(ngDevMode ? [{ debugName: "effectiveMessages" }] : /* istanbul ignore next */ []));
|
|
153
134
|
// Track hidden bars and series
|
|
154
135
|
hiddenBars = new Set();
|
|
155
136
|
hiddenSeries = new Set();
|
|
@@ -173,7 +154,7 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
173
154
|
const groups = value;
|
|
174
155
|
const seriesLabels = this.getClusterSeriesLabels(groups);
|
|
175
156
|
const visibleSeries = seriesLabels.filter((s) => !this.hiddenSeries.has(s));
|
|
176
|
-
return groups.some((g) => visibleSeries.some((
|
|
157
|
+
return groups.some((g) => visibleSeries.some((label) => !!g.chartData.find((item) => item.label === label)));
|
|
177
158
|
}
|
|
178
159
|
return value.some((d) => !this.hiddenBars.has(d.id));
|
|
179
160
|
}, ...(ngDevMode ? [{ debugName: "hasVisibleData" }] : /* istanbul ignore next */ []));
|
|
@@ -371,7 +352,7 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
371
352
|
return Math.max(this.MIN_PLOT_HEIGHT, optionHeight - bottomPadding);
|
|
372
353
|
}
|
|
373
354
|
if (containerHeight > 0) {
|
|
374
|
-
return Math.max(this.MIN_PLOT_HEIGHT, containerHeight - bottomPadding
|
|
355
|
+
return Math.max(this.MIN_PLOT_HEIGHT, containerHeight - bottomPadding);
|
|
375
356
|
}
|
|
376
357
|
return this.FALLBACK_PLOT_HEIGHT;
|
|
377
358
|
}
|
|
@@ -389,10 +370,8 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
389
370
|
* Creates x and y scales for the chart
|
|
390
371
|
*/
|
|
391
372
|
setupScales(data) {
|
|
392
|
-
|
|
393
|
-
const
|
|
394
|
-
// Calculate padding based on barWidth (inverse relationship)
|
|
395
|
-
const padding = Math.max(this.MIN_PADDING, 1 - barWidthPercent);
|
|
373
|
+
const barWidthFraction = resolveBarWidthFraction(this.effectiveOptions().barWidth);
|
|
374
|
+
const padding = Math.max(this.MIN_PADDING, 1 - barWidthFraction);
|
|
396
375
|
// Create x scale (band scale for categorical data)
|
|
397
376
|
this.xScale = this.d3
|
|
398
377
|
.scaleBand()
|
|
@@ -430,8 +409,8 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
430
409
|
// Y scale across all visible values (support negative values)
|
|
431
410
|
const allVisibleValues = [];
|
|
432
411
|
for (const g of groups) {
|
|
433
|
-
visibleSeries.forEach((
|
|
434
|
-
const item = g.chartData
|
|
412
|
+
visibleSeries.forEach((label) => {
|
|
413
|
+
const item = g.chartData.find((d) => d.label === label);
|
|
435
414
|
if (item && typeof item.value === 'number')
|
|
436
415
|
allVisibleValues.push(item.value);
|
|
437
416
|
});
|
|
@@ -572,8 +551,8 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
572
551
|
const seriesLabels = groups.length > 0 ? this.getClusterSeriesLabels(groups) : [];
|
|
573
552
|
const visibleSeries = seriesLabels.filter((s) => !this.hiddenSeries.has(s));
|
|
574
553
|
for (const g of groups) {
|
|
575
|
-
visibleSeries.forEach((
|
|
576
|
-
const item = g.chartData
|
|
554
|
+
visibleSeries.forEach((label) => {
|
|
555
|
+
const item = g.chartData.find((d) => d.label === label);
|
|
577
556
|
if (item && typeof item.value === 'number')
|
|
578
557
|
maxValue = Math.max(maxValue, item.value);
|
|
579
558
|
});
|
|
@@ -789,7 +768,15 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
789
768
|
.attr('transform', (g) => `translate(${this.xScale(g.id)},0)`);
|
|
790
769
|
const barGroups = groupSel
|
|
791
770
|
.selectAll('.ax-bar-chart-bar-group')
|
|
792
|
-
.data((g) => visibleSeries.map((label
|
|
771
|
+
.data((g) => visibleSeries.map((label) => {
|
|
772
|
+
const seriesIndex = seriesLabels.indexOf(label);
|
|
773
|
+
return {
|
|
774
|
+
group: g,
|
|
775
|
+
seriesLabel: label,
|
|
776
|
+
seriesIndex,
|
|
777
|
+
item: g.chartData.find((d) => d.label === label) ?? g.chartData[seriesIndex],
|
|
778
|
+
};
|
|
779
|
+
}))
|
|
793
780
|
.enter()
|
|
794
781
|
.append('g')
|
|
795
782
|
.style('cursor', 'pointer')
|
|
@@ -805,8 +792,7 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
805
792
|
return `M${x},${y} L${x},${y} L${x + width},${y} L${x + width},${y} Z`;
|
|
806
793
|
})
|
|
807
794
|
.attr('fill', (d) => {
|
|
808
|
-
|
|
809
|
-
return item?.color || this.getColor(d.seriesIndex);
|
|
795
|
+
return d.item?.color || this.getColor(d.seriesIndex);
|
|
810
796
|
});
|
|
811
797
|
if (this.effectiveOptions().showDataLabels !== false) {
|
|
812
798
|
barGroups
|
|
@@ -820,10 +806,9 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
820
806
|
.style('fill', 'rgb(var(--ax-comp-bar-chart-data-labels-color))')
|
|
821
807
|
.style('opacity', 0)
|
|
822
808
|
.text((d) => {
|
|
823
|
-
const value = d.
|
|
809
|
+
const value = d.item?.value;
|
|
824
810
|
if (value === undefined)
|
|
825
811
|
return '';
|
|
826
|
-
// Format large numbers in data labels
|
|
827
812
|
return value >= 1000 ? formatLargeNumber(value) : value;
|
|
828
813
|
});
|
|
829
814
|
const animationDelay = this.effectiveOptions().animationDelay ?? this.DEFAULT_ANIMATION_DELAY;
|
|
@@ -833,10 +818,9 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
833
818
|
.duration(animationDuration)
|
|
834
819
|
.delay((_d, i) => i * animationDelay + this.LABEL_ANIMATION_DELAY)
|
|
835
820
|
.attr('y', (d) => {
|
|
836
|
-
|
|
837
|
-
if (!item)
|
|
821
|
+
if (!d.item)
|
|
838
822
|
return this.height;
|
|
839
|
-
const barTop = this.yScale(item.value);
|
|
823
|
+
const barTop = this.yScale(d.item.value);
|
|
840
824
|
// If bar is near the top (100% or close), position label inside the bar
|
|
841
825
|
if (barTop < this.MIN_TOP_SPACE_FOR_LABEL) {
|
|
842
826
|
return barTop + this.LABEL_OFFSET;
|
|
@@ -845,10 +829,9 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
845
829
|
return barTop - this.LABEL_OFFSET;
|
|
846
830
|
})
|
|
847
831
|
.attr('data-inside-bar', (d) => {
|
|
848
|
-
|
|
849
|
-
if (!item)
|
|
832
|
+
if (!d.item)
|
|
850
833
|
return 'false';
|
|
851
|
-
const barTop = this.yScale(item.value);
|
|
834
|
+
const barTop = this.yScale(d.item.value);
|
|
852
835
|
return barTop < this.MIN_TOP_SPACE_FOR_LABEL ? 'true' : 'false';
|
|
853
836
|
})
|
|
854
837
|
.style('opacity', 1)
|
|
@@ -863,9 +846,8 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
863
846
|
.transition()
|
|
864
847
|
.duration(this.HOVER_TRANSITION_DURATION)
|
|
865
848
|
.style('filter', 'brightness(0.7) drop-shadow(0 0 2px rgba(0,0,0,0.1))');
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
this.handleBarHover(event, item, d.group);
|
|
849
|
+
if (d.item)
|
|
850
|
+
this.handleBarHover(event, d.item, d.group);
|
|
869
851
|
})
|
|
870
852
|
.on('mousemove', (event) => {
|
|
871
853
|
if (this._initialAnimationComplete())
|
|
@@ -881,9 +863,8 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
881
863
|
.on('click', (event, d) => {
|
|
882
864
|
if (!this._initialAnimationComplete())
|
|
883
865
|
return;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
this.handleBarClick(event, item);
|
|
866
|
+
if (d.item)
|
|
867
|
+
this.handleBarClick(event, d.item);
|
|
887
868
|
});
|
|
888
869
|
const animationDelay = this.effectiveOptions().animationDelay ?? this.DEFAULT_ANIMATION_DELAY;
|
|
889
870
|
bars
|
|
@@ -893,8 +874,7 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
893
874
|
.attrTween('d', (d) => {
|
|
894
875
|
const x = this.xSubScale(d.seriesLabel);
|
|
895
876
|
const width = this.xSubScale.bandwidth();
|
|
896
|
-
const
|
|
897
|
-
const finalHeight = item ? this.height - this.yScale(item.value) : 0;
|
|
877
|
+
const finalHeight = d.item ? this.height - this.yScale(d.item.value) : 0;
|
|
898
878
|
return (t) => {
|
|
899
879
|
const currentHeight = finalHeight * t;
|
|
900
880
|
const currentY = this.height - currentHeight;
|
|
@@ -1024,15 +1004,23 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
1024
1004
|
* Shows a message when no data is available
|
|
1025
1005
|
*/
|
|
1026
1006
|
showNoDataMessage(containerElement) {
|
|
1027
|
-
this.
|
|
1028
|
-
|
|
1007
|
+
const messages = this.effectiveMessages();
|
|
1008
|
+
renderChartEmptyMessage(this.d3, containerElement, {
|
|
1009
|
+
icon: messages.noDataIcon,
|
|
1010
|
+
title: messages.noData,
|
|
1011
|
+
help: messages.noDataHelp,
|
|
1012
|
+
});
|
|
1029
1013
|
}
|
|
1030
1014
|
/**
|
|
1031
1015
|
* Shows a message when all bars are hidden
|
|
1032
1016
|
*/
|
|
1033
1017
|
showAllBarsHiddenMessage(containerElement) {
|
|
1034
|
-
this.
|
|
1035
|
-
|
|
1018
|
+
const messages = this.effectiveMessages();
|
|
1019
|
+
renderChartEmptyMessage(this.d3, containerElement, {
|
|
1020
|
+
icon: messages.allHiddenIcon,
|
|
1021
|
+
title: messages.allHidden,
|
|
1022
|
+
help: messages.allHiddenHelp,
|
|
1023
|
+
});
|
|
1036
1024
|
}
|
|
1037
1025
|
/**
|
|
1038
1026
|
* Gets the color for a bar based on its index
|
|
@@ -1237,7 +1225,7 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
1237
1225
|
return this.chartContainerEl()?.nativeElement ?? null;
|
|
1238
1226
|
}
|
|
1239
1227
|
clearChartArea(containerElement) {
|
|
1240
|
-
this.d3.select(containerElement).selectAll('svg, .ax-chart-message-container').remove();
|
|
1228
|
+
this.d3.select(containerElement).selectAll('svg, .ax-chart-empty, .ax-chart-message-container').remove();
|
|
1241
1229
|
}
|
|
1242
1230
|
/**
|
|
1243
1231
|
* Truncates long labels with ellipsis
|
|
@@ -1325,25 +1313,12 @@ class AXBarChartComponent extends AXChartComponent {
|
|
|
1325
1313
|
this.createXAxisTitle(axesGroup, options.xAxisLabel, tickAreaHeight, gapBelowTicks);
|
|
1326
1314
|
}
|
|
1327
1315
|
}
|
|
1328
|
-
// computeTooltipPosition moved to shared chart utils
|
|
1329
|
-
showMessage(containerElement, iconClass, text, helpText, specificClass) {
|
|
1330
|
-
const container = this.d3
|
|
1331
|
-
.select(containerElement)
|
|
1332
|
-
.append('div')
|
|
1333
|
-
.attr('class', `ax-chart-message-container ax-bar-chart-message-background ${specificClass}`);
|
|
1334
|
-
container
|
|
1335
|
-
.append('div')
|
|
1336
|
-
.attr('class', 'ax-chart-message-icon ax-bar-chart-no-data-icon')
|
|
1337
|
-
.html(`<i class="${iconClass} fa-2x"></i>`);
|
|
1338
|
-
container.append('div').attr('class', 'ax-chart-message-text ax-bar-chart-no-data-text').text(text);
|
|
1339
|
-
container.append('div').attr('class', 'ax-chart-message-help ax-bar-chart-no-data-help').text(helpText);
|
|
1340
|
-
}
|
|
1341
1316
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXBarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1342
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", 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:clamp(220px,38vw,360px);--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;min-height:0;box-sizing:border-box;overflow:hidden;background-color:rgba(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%}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)}
|
|
1317
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", 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-chart-empty{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:1rem;pointer-events:none}.ax-chart-empty__card{text-align:center;padding:1.5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-surface));width:80%;max-width:300px;box-sizing:border-box}.ax-chart-empty__icon{opacity:.6;margin-bottom:.75rem}.ax-chart-empty__title{font-size:1rem;font-weight:600;margin-bottom:.5rem}.ax-chart-empty__help{font-size:.8rem;opacity:.6}ax-bar-chart{display:block;width:100%;height:100%;min-height:clamp(220px,38vw,360px);box-sizing:border-box;--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;min-height:0;box-sizing:border-box;overflow:hidden;background-color:rgba(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%}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)}\n"], dependencies: [{ kind: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1343
1318
|
}
|
|
1344
1319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXBarChartComponent, decorators: [{
|
|
1345
1320
|
type: Component,
|
|
1346
|
-
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:clamp(220px,38vw,360px);--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;min-height:0;box-sizing:border-box;overflow:hidden;background-color:rgba(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%}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)}
|
|
1321
|
+
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-chart-empty{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:1rem;pointer-events:none}.ax-chart-empty__card{text-align:center;padding:1.5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-surface));width:80%;max-width:300px;box-sizing:border-box}.ax-chart-empty__icon{opacity:.6;margin-bottom:.75rem}.ax-chart-empty__title{font-size:1rem;font-weight:600;margin-bottom:.5rem}.ax-chart-empty__help{font-size:.8rem;opacity:.6}ax-bar-chart{display:block;width:100%;height:100%;min-height:clamp(220px,38vw,360px);box-sizing:border-box;--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;min-height:0;box-sizing:border-box;overflow:hidden;background-color:rgba(var(--ax-comp-bar-chart-bg-color))}ax-bar-chart .ax-bar-chart svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%}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)}\n"] }]
|
|
1347
1322
|
}], 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 }] }] } });
|
|
1348
1323
|
|
|
1349
1324
|
/**
|