@acorex/charts 20.1.28 → 20.1.29

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.
@@ -84,11 +84,11 @@ class AXChartTooltipComponent {
84
84
  };
85
85
  }
86
86
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXChartTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
87
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXChartTooltipComponent, isStandalone: true, selector: "ax-chart-tooltip", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, showPercentage: { classPropertyName: "showPercentage", publicName: "showPercentage", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tooltipContainer", first: true, predicate: ["tooltipContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible() && data()) {\n<div #tooltipContainer\n class=\"chart-tooltip ax-absolute ax-pointer-events-none ax-py-2 ax-px-3 ax-rounded-md ax-text-[0.8rem] ax-z-10 ax-shadow-lg ax-backdrop-blur-[4px] ax-border ax-border-white/10 ax-transform ax-translate-x-[10px] ax--translate-y-1/2 ax-max-w-[400px] ax-transition ax-duration-150 ax-ease-in-out\"\n [style.background-color]=\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\"\n [style.color]=\"data()!.tooltipColor || 'white'\" [style.left.px]=\"position().x\" [style.top.px]=\"position().y\"\n [ngStyle]=\"style()\">\n <div class=\"chart-tooltip-content ax-flex ax-justify-between ax-items-center ax-gap-2\">\n <div class=\"chart-tooltip-body ax-flex ax-flex-col\">\n @if (!isTitleArray()) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (singleColor()) {\n <div class=\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\"\n [style.background-color]=\"singleColor()!\"></div>\n }\n <div\n class=\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\">\n {{ data()!.title }}</div>\n </div>\n } @else {\n <div class=\"chart-tooltip-title-list\">\n @for (t of titleList(); let i = $index; track $index) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (colorAt(i)) {\n <div class=\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\"\n [style.background-color]=\"colorAt(i)!\"></div>\n }\n <div\n class=\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\">\n {{ t }}</div>\n </div>\n }\n </div>\n }\n\n <div class=\"chart-tooltip-value-row ax-flex ax-gap-2 ax-items-center\">\n <div class=\"chart-tooltip-value ax-font-medium ax-flex-grow\">{{ data()!.value }}</div>\n @if (showPercentage() && data()!.percentage) {\n <div\n class=\"chart-tooltip-percentage ax-bg-white/20 ax-py-[0.125rem] ax-px-[0.375rem] ax-rounded-full ax-text-[0.7rem] ax-font-medium ax-flex-shrink-0\">\n {{ data()!.percentage }}</div>\n }\n </div>\n </div>\n </div>\n</div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
87
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXChartTooltipComponent, isStandalone: true, selector: "ax-chart-tooltip", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, showPercentage: { classPropertyName: "showPercentage", publicName: "showPercentage", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tooltipContainer", first: true, predicate: ["tooltipContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible() && data()) {\n <div\n #tooltipContainer\n class=\"chart-tooltip ax-pointer-events-none ax-absolute ax-z-10 ax-max-w-[200px] ax--translate-y-1/2 ax-translate-x-[10px] ax-transform ax-rounded-md ax-border ax-border-white/10 ax-px-3 ax-py-2 ax-text-[0.8rem] ax-shadow-lg ax-backdrop-blur-[4px] ax-transition ax-duration-150 ax-ease-in-out\"\n [style.background-color]=\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\"\n [style.color]=\"data()!.tooltipColor || 'white'\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\"\n [ngStyle]=\"style()\"\n >\n <div class=\"chart-tooltip-content ax-flex ax-items-center ax-justify-between ax-gap-2\">\n <div class=\"chart-tooltip-body ax-flex ax-flex-col ax-truncate\">\n @if (!isTitleArray()) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (singleColor()) {\n <div\n class=\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\"\n [style.background-color]=\"singleColor()!\"\n ></div>\n }\n <div\n class=\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\"\n >\n {{ data()!.title }}\n </div>\n </div>\n } @else {\n <div class=\"chart-tooltip-title-list\">\n @for (t of titleList(); let i = $index; track $index) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (colorAt(i)) {\n <div\n class=\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\"\n [style.background-color]=\"colorAt(i)!\"\n ></div>\n }\n <div\n class=\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\"\n >\n {{ t }}\n </div>\n </div>\n }\n </div>\n }\n\n <div class=\"chart-tooltip-value-row ax-flex ax-items-center ax-gap-2\">\n <div class=\"chart-tooltip-value ax-flex-grow ax-font-medium\">{{ data()!.value }}</div>\n @if (showPercentage() && data()!.percentage) {\n <div\n class=\"chart-tooltip-percentage ax-flex-shrink-0 ax-rounded-full ax-bg-white/20 ax-px-[0.375rem] ax-py-[0.125rem] ax-text-[0.7rem] ax-font-medium\"\n >\n {{ data()!.percentage }}\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
88
88
  }
89
89
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXChartTooltipComponent, decorators: [{
90
90
  type: Component,
91
- args: [{ selector: 'ax-chart-tooltip', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible() && data()) {\n<div #tooltipContainer\n class=\"chart-tooltip ax-absolute ax-pointer-events-none ax-py-2 ax-px-3 ax-rounded-md ax-text-[0.8rem] ax-z-10 ax-shadow-lg ax-backdrop-blur-[4px] ax-border ax-border-white/10 ax-transform ax-translate-x-[10px] ax--translate-y-1/2 ax-max-w-[400px] ax-transition ax-duration-150 ax-ease-in-out\"\n [style.background-color]=\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\"\n [style.color]=\"data()!.tooltipColor || 'white'\" [style.left.px]=\"position().x\" [style.top.px]=\"position().y\"\n [ngStyle]=\"style()\">\n <div class=\"chart-tooltip-content ax-flex ax-justify-between ax-items-center ax-gap-2\">\n <div class=\"chart-tooltip-body ax-flex ax-flex-col\">\n @if (!isTitleArray()) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (singleColor()) {\n <div class=\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\"\n [style.background-color]=\"singleColor()!\"></div>\n }\n <div\n class=\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\">\n {{ data()!.title }}</div>\n </div>\n } @else {\n <div class=\"chart-tooltip-title-list\">\n @for (t of titleList(); let i = $index; track $index) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (colorAt(i)) {\n <div class=\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\"\n [style.background-color]=\"colorAt(i)!\"></div>\n }\n <div\n class=\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\">\n {{ t }}</div>\n </div>\n }\n </div>\n }\n\n <div class=\"chart-tooltip-value-row ax-flex ax-gap-2 ax-items-center\">\n <div class=\"chart-tooltip-value ax-font-medium ax-flex-grow\">{{ data()!.value }}</div>\n @if (showPercentage() && data()!.percentage) {\n <div\n class=\"chart-tooltip-percentage ax-bg-white/20 ax-py-[0.125rem] ax-px-[0.375rem] ax-rounded-full ax-text-[0.7rem] ax-font-medium ax-flex-shrink-0\">\n {{ data()!.percentage }}</div>\n }\n </div>\n </div>\n </div>\n</div>\n}" }]
91
+ args: [{ selector: 'ax-chart-tooltip', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible() && data()) {\n <div\n #tooltipContainer\n class=\"chart-tooltip ax-pointer-events-none ax-absolute ax-z-10 ax-max-w-[200px] ax--translate-y-1/2 ax-translate-x-[10px] ax-transform ax-rounded-md ax-border ax-border-white/10 ax-px-3 ax-py-2 ax-text-[0.8rem] ax-shadow-lg ax-backdrop-blur-[4px] ax-transition ax-duration-150 ax-ease-in-out\"\n [style.background-color]=\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\"\n [style.color]=\"data()!.tooltipColor || 'white'\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\"\n [ngStyle]=\"style()\"\n >\n <div class=\"chart-tooltip-content ax-flex ax-items-center ax-justify-between ax-gap-2\">\n <div class=\"chart-tooltip-body ax-flex ax-flex-col ax-truncate\">\n @if (!isTitleArray()) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (singleColor()) {\n <div\n class=\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\"\n [style.background-color]=\"singleColor()!\"\n ></div>\n }\n <div\n class=\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\"\n >\n {{ data()!.title }}\n </div>\n </div>\n } @else {\n <div class=\"chart-tooltip-title-list\">\n @for (t of titleList(); let i = $index; track $index) {\n <div class=\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\">\n @if (colorAt(i)) {\n <div\n class=\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\"\n [style.background-color]=\"colorAt(i)!\"\n ></div>\n }\n <div\n class=\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\"\n >\n {{ t }}\n </div>\n </div>\n }\n </div>\n }\n\n <div class=\"chart-tooltip-value-row ax-flex ax-items-center ax-gap-2\">\n <div class=\"chart-tooltip-value ax-flex-grow ax-font-medium\">{{ data()!.value }}</div>\n @if (showPercentage() && data()!.percentage) {\n <div\n class=\"chart-tooltip-percentage ax-flex-shrink-0 ax-rounded-full ax-bg-white/20 ax-px-[0.375rem] ax-py-[0.125rem] ax-text-[0.7rem] ax-font-medium\"\n >\n {{ data()!.percentage }}\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n}\n" }]
92
92
  }], ctorParameters: () => [] });
93
93
 
94
94
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-charts-chart-tooltip.mjs","sources":["../tmp-esm2022/chart-tooltip/lib/chart-tooltip.component.js","../tmp-esm2022/chart-tooltip/acorex-charts-chart-tooltip.js"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, NgZone, afterNextRender, inject, input, viewChild, } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/common\";\nexport class AXChartTooltipComponent {\n ngZone = inject(NgZone);\n data = input(null, ...(ngDevMode ? [{ debugName: \"data\" }] : []));\n position = input({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: \"position\" }] : []));\n visible = input(false, ...(ngDevMode ? [{ debugName: \"visible\" }] : []));\n /**\n * Whether to show the tooltip's percentage badge\n */\n showPercentage = input(true, ...(ngDevMode ? [{ debugName: \"showPercentage\" }] : []));\n /**\n * Optional custom styling for the tooltip\n */\n style = input({}, ...(ngDevMode ? [{ debugName: \"style\" }] : []));\n /**\n * Reference to tooltip container for measuring dimensions\n */\n tooltipContainer = viewChild('tooltipContainer', ...(ngDevMode ? [{ debugName: \"tooltipContainer\" }] : []));\n // Tooltip dimensions\n tooltipWidth = 0;\n tooltipHeight = 0;\n constructor() {\n afterNextRender(() => {\n // Update tooltip dimensions when visible changes\n this.updateTooltipDimensions();\n });\n }\n // Helpers to support color as string | string[]\n isColorArray() {\n const color = this.data()?.color;\n return Array.isArray(color);\n }\n colorList() {\n const color = this.data()?.color;\n return Array.isArray(color) ? color : [];\n }\n singleColor() {\n const color = this.data()?.color;\n return typeof color === 'string' ? color : null;\n }\n isTitleArray() {\n const t = this.data()?.title;\n return Array.isArray(t);\n }\n titleList() {\n const t = this.data()?.title;\n return Array.isArray(t) ? t : [];\n }\n colorAt(index) {\n const c = this.data()?.color;\n if (Array.isArray(c)) {\n return c[index] ?? null;\n }\n return typeof c === 'string' ? c : null;\n }\n /**\n * Updates tooltip dimensions after it's rendered\n */\n updateTooltipDimensions() {\n if (this.visible() && this.tooltipContainer) {\n this.ngZone.runOutsideAngular(() => {\n // Use requestAnimationFrame to ensure dimensions are calculated after render\n requestAnimationFrame(() => {\n if (this.tooltipContainer()?.nativeElement) {\n this.tooltipWidth = this.tooltipContainer().nativeElement.offsetWidth;\n this.tooltipHeight = this.tooltipContainer().nativeElement.offsetHeight;\n }\n });\n });\n }\n }\n /**\n * Get adjusted tooltip position\n * Exposes properties for parent components to query tooltip dimensions\n */\n getDimensions() {\n return {\n width: this.tooltipWidth,\n height: this.tooltipHeight,\n };\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.8\", ngImport: i0, type: AXChartTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"20.1.8\", type: AXChartTooltipComponent, isStandalone: true, selector: \"ax-chart-tooltip\", inputs: { data: { classPropertyName: \"data\", publicName: \"data\", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: \"position\", publicName: \"position\", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: \"visible\", publicName: \"visible\", isSignal: true, isRequired: false, transformFunction: null }, showPercentage: { classPropertyName: \"showPercentage\", publicName: \"showPercentage\", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: \"style\", publicName: \"style\", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: \"tooltipContainer\", first: true, predicate: [\"tooltipContainer\"], descendants: true, isSignal: true }], ngImport: i0, template: \"@if (visible() && data()) {\\n<div #tooltipContainer\\n class=\\\"chart-tooltip ax-absolute ax-pointer-events-none ax-py-2 ax-px-3 ax-rounded-md ax-text-[0.8rem] ax-z-10 ax-shadow-lg ax-backdrop-blur-[4px] ax-border ax-border-white/10 ax-transform ax-translate-x-[10px] ax--translate-y-1/2 ax-max-w-[400px] ax-transition ax-duration-150 ax-ease-in-out\\\"\\n [style.background-color]=\\\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\\\"\\n [style.color]=\\\"data()!.tooltipColor || 'white'\\\" [style.left.px]=\\\"position().x\\\" [style.top.px]=\\\"position().y\\\"\\n [ngStyle]=\\\"style()\\\">\\n <div class=\\\"chart-tooltip-content ax-flex ax-justify-between ax-items-center ax-gap-2\\\">\\n <div class=\\\"chart-tooltip-body ax-flex ax-flex-col\\\">\\n @if (!isTitleArray()) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (singleColor()) {\\n <div class=\\\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\\\"\\n [style.background-color]=\\\"singleColor()!\\\"></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\\\">\\n {{ data()!.title }}</div>\\n </div>\\n } @else {\\n <div class=\\\"chart-tooltip-title-list\\\">\\n @for (t of titleList(); let i = $index; track $index) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (colorAt(i)) {\\n <div class=\\\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\\\"\\n [style.background-color]=\\\"colorAt(i)!\\\"></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\\\">\\n {{ t }}</div>\\n </div>\\n }\\n </div>\\n }\\n\\n <div class=\\\"chart-tooltip-value-row ax-flex ax-gap-2 ax-items-center\\\">\\n <div class=\\\"chart-tooltip-value ax-font-medium ax-flex-grow\\\">{{ data()!.value }}</div>\\n @if (showPercentage() && data()!.percentage) {\\n <div\\n class=\\\"chart-tooltip-percentage ax-bg-white/20 ax-py-[0.125rem] ax-px-[0.375rem] ax-rounded-full ax-text-[0.7rem] ax-font-medium ax-flex-shrink-0\\\">\\n {{ data()!.percentage }}</div>\\n }\\n </div>\\n </div>\\n </div>\\n</div>\\n}\", styles: [\"\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"directive\", type: i1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.8\", ngImport: i0, type: AXChartTooltipComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ax-chart-tooltip', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: \"@if (visible() && data()) {\\n<div #tooltipContainer\\n class=\\\"chart-tooltip ax-absolute ax-pointer-events-none ax-py-2 ax-px-3 ax-rounded-md ax-text-[0.8rem] ax-z-10 ax-shadow-lg ax-backdrop-blur-[4px] ax-border ax-border-white/10 ax-transform ax-translate-x-[10px] ax--translate-y-1/2 ax-max-w-[400px] ax-transition ax-duration-150 ax-ease-in-out\\\"\\n [style.background-color]=\\\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\\\"\\n [style.color]=\\\"data()!.tooltipColor || 'white'\\\" [style.left.px]=\\\"position().x\\\" [style.top.px]=\\\"position().y\\\"\\n [ngStyle]=\\\"style()\\\">\\n <div class=\\\"chart-tooltip-content ax-flex ax-justify-between ax-items-center ax-gap-2\\\">\\n <div class=\\\"chart-tooltip-body ax-flex ax-flex-col\\\">\\n @if (!isTitleArray()) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (singleColor()) {\\n <div class=\\\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\\\"\\n [style.background-color]=\\\"singleColor()!\\\"></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\\\">\\n {{ data()!.title }}</div>\\n </div>\\n } @else {\\n <div class=\\\"chart-tooltip-title-list\\\">\\n @for (t of titleList(); let i = $index; track $index) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (colorAt(i)) {\\n <div class=\\\"chart-tooltip-color ax-w-[10px] ax-h-[10px] ax-rounded-[2px] ax-flex-shrink-0\\\"\\n [style.background-color]=\\\"colorAt(i)!\\\"></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-font-semibold ax-whitespace-nowrap ax-overflow-hidden ax-text-ellipsis ax-leading-[1.2]\\\">\\n {{ t }}</div>\\n </div>\\n }\\n </div>\\n }\\n\\n <div class=\\\"chart-tooltip-value-row ax-flex ax-gap-2 ax-items-center\\\">\\n <div class=\\\"chart-tooltip-value ax-font-medium ax-flex-grow\\\">{{ data()!.value }}</div>\\n @if (showPercentage() && data()!.percentage) {\\n <div\\n class=\\\"chart-tooltip-percentage ax-bg-white/20 ax-py-[0.125rem] ax-px-[0.375rem] ax-rounded-full ax-text-[0.7rem] ax-font-medium ax-flex-shrink-0\\\">\\n {{ data()!.percentage }}</div>\\n }\\n </div>\\n </div>\\n </div>\\n</div>\\n}\" }]\n }], ctorParameters: () => [] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQtdG9vbHRpcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jaGFydHMvY2hhcnQtdG9vbHRpcC9zcmMvb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SB7XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjbGFzcz1cImNoYXJ0LXRvb2x0aXAtcGVyY2VudGFnZSBheC1iZy13aGl0ZS8yMCBheC1weS1bMC4xMjVyZW1dIGF4LXB4LVswLjM3NXJlbV0gYXgtcm91bmRlZC1mdWxsIGF4LXRleHQtWzAuN3JlbV0gYXgtZm9udC1tZWRpdW0gYXgtZmxleC1zaHJpbmstMFwiPlxuICAgICAgICAgIHt7IGRhdGEoKSEucGVyY2VudGFnZSB9fTwvZGl2PlxuICAgICAgICB9XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L2Rpdj5cbn0iXX0=","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNoYXJ0cy1jaGFydC10b29sdGlwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY2hhcnRzL2NoYXJ0LXRvb2x0aXAvc3JjL2Fjb3JleC1jaGFydHMtY2hhcnQtdG9vbHRpcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ=="],"names":[],"mappings":";;;;;AAIO,MAAM,uBAAuB,CAAC;AACrC,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC3B,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;AACrE,IAAI,QAAQ,GAA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BAAuB,CAAC,MAAM,EAAE,QAAQ,EAAE,s3EAAs3E,EAAE;AACjhF,SAAS,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,CAAC;;AC1FvC;AACA;AACA;;;;"}
1
+ {"version":3,"file":"acorex-charts-chart-tooltip.mjs","sources":["../tmp-esm2022/chart-tooltip/lib/chart-tooltip.component.js","../tmp-esm2022/chart-tooltip/acorex-charts-chart-tooltip.js"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, NgZone, afterNextRender, inject, input, viewChild, } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/common\";\nexport class AXChartTooltipComponent {\n ngZone = inject(NgZone);\n data = input(null, ...(ngDevMode ? [{ debugName: \"data\" }] : []));\n position = input({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: \"position\" }] : []));\n visible = input(false, ...(ngDevMode ? [{ debugName: \"visible\" }] : []));\n /**\n * Whether to show the tooltip's percentage badge\n */\n showPercentage = input(true, ...(ngDevMode ? [{ debugName: \"showPercentage\" }] : []));\n /**\n * Optional custom styling for the tooltip\n */\n style = input({}, ...(ngDevMode ? [{ debugName: \"style\" }] : []));\n /**\n * Reference to tooltip container for measuring dimensions\n */\n tooltipContainer = viewChild('tooltipContainer', ...(ngDevMode ? [{ debugName: \"tooltipContainer\" }] : []));\n // Tooltip dimensions\n tooltipWidth = 0;\n tooltipHeight = 0;\n constructor() {\n afterNextRender(() => {\n // Update tooltip dimensions when visible changes\n this.updateTooltipDimensions();\n });\n }\n // Helpers to support color as string | string[]\n isColorArray() {\n const color = this.data()?.color;\n return Array.isArray(color);\n }\n colorList() {\n const color = this.data()?.color;\n return Array.isArray(color) ? color : [];\n }\n singleColor() {\n const color = this.data()?.color;\n return typeof color === 'string' ? color : null;\n }\n isTitleArray() {\n const t = this.data()?.title;\n return Array.isArray(t);\n }\n titleList() {\n const t = this.data()?.title;\n return Array.isArray(t) ? t : [];\n }\n colorAt(index) {\n const c = this.data()?.color;\n if (Array.isArray(c)) {\n return c[index] ?? null;\n }\n return typeof c === 'string' ? c : null;\n }\n /**\n * Updates tooltip dimensions after it's rendered\n */\n updateTooltipDimensions() {\n if (this.visible() && this.tooltipContainer) {\n this.ngZone.runOutsideAngular(() => {\n // Use requestAnimationFrame to ensure dimensions are calculated after render\n requestAnimationFrame(() => {\n if (this.tooltipContainer()?.nativeElement) {\n this.tooltipWidth = this.tooltipContainer().nativeElement.offsetWidth;\n this.tooltipHeight = this.tooltipContainer().nativeElement.offsetHeight;\n }\n });\n });\n }\n }\n /**\n * Get adjusted tooltip position\n * Exposes properties for parent components to query tooltip dimensions\n */\n getDimensions() {\n return {\n width: this.tooltipWidth,\n height: this.tooltipHeight,\n };\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.8\", ngImport: i0, type: AXChartTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"20.1.8\", type: AXChartTooltipComponent, isStandalone: true, selector: \"ax-chart-tooltip\", inputs: { data: { classPropertyName: \"data\", publicName: \"data\", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: \"position\", publicName: \"position\", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: \"visible\", publicName: \"visible\", isSignal: true, isRequired: false, transformFunction: null }, showPercentage: { classPropertyName: \"showPercentage\", publicName: \"showPercentage\", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: \"style\", publicName: \"style\", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: \"tooltipContainer\", first: true, predicate: [\"tooltipContainer\"], descendants: true, isSignal: true }], ngImport: i0, template: \"@if (visible() && data()) {\\n <div\\n #tooltipContainer\\n class=\\\"chart-tooltip ax-pointer-events-none ax-absolute ax-z-10 ax-max-w-[200px] ax--translate-y-1/2 ax-translate-x-[10px] ax-transform ax-rounded-md ax-border ax-border-white/10 ax-px-3 ax-py-2 ax-text-[0.8rem] ax-shadow-lg ax-backdrop-blur-[4px] ax-transition ax-duration-150 ax-ease-in-out\\\"\\n [style.background-color]=\\\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\\\"\\n [style.color]=\\\"data()!.tooltipColor || 'white'\\\"\\n [style.left.px]=\\\"position().x\\\"\\n [style.top.px]=\\\"position().y\\\"\\n [ngStyle]=\\\"style()\\\"\\n >\\n <div class=\\\"chart-tooltip-content ax-flex ax-items-center ax-justify-between ax-gap-2\\\">\\n <div class=\\\"chart-tooltip-body ax-flex ax-flex-col ax-truncate\\\">\\n @if (!isTitleArray()) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (singleColor()) {\\n <div\\n class=\\\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\\\"\\n [style.background-color]=\\\"singleColor()!\\\"\\n ></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\\\"\\n >\\n {{ data()!.title }}\\n </div>\\n </div>\\n } @else {\\n <div class=\\\"chart-tooltip-title-list\\\">\\n @for (t of titleList(); let i = $index; track $index) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (colorAt(i)) {\\n <div\\n class=\\\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\\\"\\n [style.background-color]=\\\"colorAt(i)!\\\"\\n ></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\\\"\\n >\\n {{ t }}\\n </div>\\n </div>\\n }\\n </div>\\n }\\n\\n <div class=\\\"chart-tooltip-value-row ax-flex ax-items-center ax-gap-2\\\">\\n <div class=\\\"chart-tooltip-value ax-flex-grow ax-font-medium\\\">{{ data()!.value }}</div>\\n @if (showPercentage() && data()!.percentage) {\\n <div\\n class=\\\"chart-tooltip-percentage ax-flex-shrink-0 ax-rounded-full ax-bg-white/20 ax-px-[0.375rem] ax-py-[0.125rem] ax-text-[0.7rem] ax-font-medium\\\"\\n >\\n {{ data()!.percentage }}\\n </div>\\n }\\n </div>\\n </div>\\n </div>\\n </div>\\n}\\n\", styles: [\"\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"directive\", type: i1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.8\", ngImport: i0, type: AXChartTooltipComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ax-chart-tooltip', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: \"@if (visible() && data()) {\\n <div\\n #tooltipContainer\\n class=\\\"chart-tooltip ax-pointer-events-none ax-absolute ax-z-10 ax-max-w-[200px] ax--translate-y-1/2 ax-translate-x-[10px] ax-transform ax-rounded-md ax-border ax-border-white/10 ax-px-3 ax-py-2 ax-text-[0.8rem] ax-shadow-lg ax-backdrop-blur-[4px] ax-transition ax-duration-150 ax-ease-in-out\\\"\\n [style.background-color]=\\\"data()!.tooltipBgColor || 'rgba(33,33,33,0.9)'\\\"\\n [style.color]=\\\"data()!.tooltipColor || 'white'\\\"\\n [style.left.px]=\\\"position().x\\\"\\n [style.top.px]=\\\"position().y\\\"\\n [ngStyle]=\\\"style()\\\"\\n >\\n <div class=\\\"chart-tooltip-content ax-flex ax-items-center ax-justify-between ax-gap-2\\\">\\n <div class=\\\"chart-tooltip-body ax-flex ax-flex-col ax-truncate\\\">\\n @if (!isTitleArray()) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (singleColor()) {\\n <div\\n class=\\\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\\\"\\n [style.background-color]=\\\"singleColor()!\\\"\\n ></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\\\"\\n >\\n {{ data()!.title }}\\n </div>\\n </div>\\n } @else {\\n <div class=\\\"chart-tooltip-title-list\\\">\\n @for (t of titleList(); let i = $index; track $index) {\\n <div class=\\\"chart-tooltip-title-row ax-flex ax-items-center ax-gap-1.5 ax-pb-2\\\">\\n @if (colorAt(i)) {\\n <div\\n class=\\\"chart-tooltip-color ax-h-[10px] ax-w-[10px] ax-flex-shrink-0 ax-rounded-[2px]\\\"\\n [style.background-color]=\\\"colorAt(i)!\\\"\\n ></div>\\n }\\n <div\\n class=\\\"chart-tooltip-title ax-overflow-hidden ax-text-ellipsis ax-whitespace-nowrap ax-font-semibold ax-leading-[1.2]\\\"\\n >\\n {{ t }}\\n </div>\\n </div>\\n }\\n </div>\\n }\\n\\n <div class=\\\"chart-tooltip-value-row ax-flex ax-items-center ax-gap-2\\\">\\n <div class=\\\"chart-tooltip-value ax-flex-grow ax-font-medium\\\">{{ data()!.value }}</div>\\n @if (showPercentage() && data()!.percentage) {\\n <div\\n class=\\\"chart-tooltip-percentage ax-flex-shrink-0 ax-rounded-full ax-bg-white/20 ax-px-[0.375rem] ax-py-[0.125rem] ax-text-[0.7rem] ax-font-medium\\\"\\n >\\n {{ data()!.percentage }}\\n </div>\\n }\\n </div>\\n </div>\\n </div>\\n </div>\\n}\\n\" }]\n }], ctorParameters: () => [] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQtdG9vbHRpcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlc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S4yXVwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIHt7IGRhdGEoKSEudGl0bGUgfX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICB9IEBlbHNlIHtcbiAgICAgICAgICA8ZGl2IGNsYXNzPVwiY2hhcnQtdG9vbHRpcC10aXRsZS1saXN0XCI+XG4gICAgICAgICAgICBAZm9yICh0IG9mIHRpdGxlTGlzdCgpOyBsZXQgaSA9ICRpbmRleDsgdHJhY2sgJGluZGV4KSB7XG4gICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJjaGFydC10b29sdGlwLXRpdGxlLXJvdyBheC1mbGV4IGF4LWl0ZW1zLWNlbnRlciBheC1nYXAtMS41IGF4LXBiLTJcIj5cbiAgICAgICAgICAgICAgICBAaWYgKGNvbG9yQXQoaSkpIHtcbiAgICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJjaGFydC10b29sdGlwLWNvbG9yIGF4LWgtWzEwcHhdIGF4LXctWzEwcHhdIGF4LWZsZXgtc2hyaW5rLTAgYXgtcm91bmRlZC1bMnB4XVwiXG4gICAgICAgICAgICAgICAgICAgIFtzdHlsZS5iYWNrZ3JvdW5kLWNvbG9yXT1cImNvbG9yQXQoaSkhXCJcbiAgICAgICAgICAgICAgICAgID48L2Rpdj5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgY2xhc3M9XCJjaGFydC10b29sdGlwLXRpdGxlIGF4LW92ZXJmbG93LWhpZGRlbiBheC10ZXh0LWVsbGlwc2lzIGF4LXdoaXRlc3BhY2Utbm93cmFwIGF4LWZvbnQtc2VtaWJvbGQgYXgtbGVhZGluZy1bMS4yXVwiXG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAge3sgdCB9fVxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgfVxuXG4gICAgICAgIDxkaXYgY2xhc3M9XCJjaGFydC10b29sdGlwLXZhbHVlLXJvdyBheC1mbGV4IGF4LWl0ZW1zLWNlbnRlciBheC1nYXAtMlwiPlxuICAgICAgICAgIDxkaXYgY2xhc3M9XCJjaGFydC10b29sdGlwLXZhbHVlIGF4LWZsZXgtZ3JvdyBheC1mb250LW1lZGl1bVwiPnt7IGRhdGEoKSEudmFsdWUgfX08L2Rpdj5cbiAgICAgICAgICBAaWYgKHNob3dQZXJjZW50YWdlKCkgJiYgZGF0YSgpIS5wZXJjZW50YWdlKSB7XG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgIGNsYXNzPVwiY2hhcnQtdG9vbHRpcC1wZXJjZW50YWdlIGF4LWZsZXgtc2hyaW5rLTAgYXgtcm91bmRlZC1mdWxsIGF4LWJnLXdoaXRlLzIwIGF4LXB4LVswLjM3NXJlbV0gYXgtcHktWzAuMTI1cmVtXSBheC10ZXh0LVswLjdyZW1dIGF4LWZvbnQtbWVkaXVtXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAge3sgZGF0YSgpIS5wZXJjZW50YWdlIH19XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICB9XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIDwvZGl2PlxufVxuIl19","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNoYXJ0cy1jaGFydC10b29sdGlwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY2hhcnRzL2NoYXJ0LXRvb2x0aXAvc3JjL2Fjb3JleC1jaGFydHMtY2hhcnQtdG9vbHRpcC50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AAI,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,CAAC,uBAAuB,CAAC,MAAM,EAAE,CAAC;AACl4H;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,UAAU,EAAE,CAAC;AACjI,YAAY,IAAI,EAAE,SAAS;AAC3B,YAAY,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,eAAe,EAAE,uBAAuB,CAAC,MAAM,EAAE,QAAQ,EAAE,+tFAA+tF,EAAE;AAC13F,SAAS,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,CAAC;;AC1FvC;AACA;AACA;;;;"}
@@ -1,4 +1,4 @@
1
- import { AX_CHART_COLOR_PALETTE, getChartColor } from '@acorex/charts';
1
+ import { AX_CHART_COLOR_PALETTE, getChartColor, getEasingFunction, computeTooltipPosition } from '@acorex/charts';
2
2
  import { AXChartTooltipComponent } from '@acorex/charts/chart-tooltip';
3
3
  import * as i0 from '@angular/core';
4
4
  import { InjectionToken, inject, ChangeDetectorRef, input, output, viewChild, signal, computed, afterNextRender, effect, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
@@ -93,6 +93,8 @@ class AXDonutChartComponent {
93
93
  ...this.options(),
94
94
  };
95
95
  }, ...(ngDevMode ? [{ debugName: "effectiveOptions" }] : []));
96
+ // Tooltip positioning gap in pixels
97
+ TOOLTIP_GAP = 10;
96
98
  // Messages with defaults
97
99
  effectiveMessages = computed(() => {
98
100
  const defaultMessages = {
@@ -315,27 +317,7 @@ class AXDonutChartComponent {
315
317
  if (!this.chartContainerEl()?.nativeElement)
316
318
  return;
317
319
  const container = this.chartContainerEl().nativeElement;
318
- this.d3.select(container).selectAll('svg, .ax-chart-message-container, .ax-donut-chart-no-data-message').remove();
319
- const messageContainer = this.d3
320
- .select(container)
321
- .append('div')
322
- // Apply generic container class and specific donut chart background class
323
- .attr('class', 'ax-chart-message-container ax-donut-chart-message-background ax-donut-chart-no-data-message');
324
- messageContainer
325
- .append('div')
326
- // Apply generic icon class and specific donut chart icon class
327
- .attr('class', 'ax-chart-message-icon ax-donut-chart-no-data-icon')
328
- .html(`<i class="${this.effectiveMessages().noDataIcon} fa-2x"></i>`); // Donut chart icon
329
- messageContainer
330
- .append('div')
331
- // Apply generic text class and specific donut chart text class
332
- .attr('class', 'ax-chart-message-text ax-donut-chart-no-data-text')
333
- .text(this.effectiveMessages().noData);
334
- messageContainer
335
- .append('div')
336
- // Apply generic help class and specific donut chart help class
337
- .attr('class', 'ax-chart-message-help ax-donut-chart-no-data-help')
338
- .text(this.effectiveMessages().noDataHelp);
320
+ this.renderMessage(container, this.effectiveMessages().noDataIcon, this.effectiveMessages().noData, this.effectiveMessages().noDataHelp, 'ax-donut-chart-no-data-message');
339
321
  }
340
322
  /**
341
323
  * Shows a message when all segments are hidden
@@ -344,27 +326,7 @@ class AXDonutChartComponent {
344
326
  if (!this.chartContainerEl()?.nativeElement)
345
327
  return;
346
328
  const container = this.chartContainerEl().nativeElement;
347
- this.d3.select(container).selectAll('svg, .ax-chart-message-container, .ax-donut-chart-no-data-message').remove();
348
- const messageContainer = this.d3
349
- .select(container)
350
- .append('div')
351
- // Apply generic container class and specific donut chart background class
352
- .attr('class', 'ax-chart-message-container ax-donut-chart-message-background ax-donut-chart-no-data-message');
353
- messageContainer
354
- .append('div')
355
- // Apply generic icon class and specific donut chart icon class if any distinction is needed later
356
- .attr('class', 'ax-chart-message-icon ax-donut-chart-no-data-icon')
357
- .html(`<i class="${this.effectiveMessages().allHiddenIcon} fa-2x"></i>`);
358
- messageContainer
359
- .append('div')
360
- // Apply generic text class and specific donut chart text class if needed
361
- .attr('class', 'ax-chart-message-text ax-donut-chart-no-data-text')
362
- .text(this.effectiveMessages().allHidden);
363
- messageContainer
364
- .append('div')
365
- // Apply generic help class and specific donut chart help class if needed
366
- .attr('class', 'ax-chart-message-help ax-donut-chart-no-data-help')
367
- .text(this.effectiveMessages().allHiddenHelp);
329
+ this.renderMessage(container, this.effectiveMessages().allHiddenIcon, this.effectiveMessages().allHidden, this.effectiveMessages().allHiddenHelp, 'ax-donut-chart-no-data-message');
368
330
  }
369
331
  /**
370
332
  * Setups chart dimensions based on container and options
@@ -448,7 +410,7 @@ class AXDonutChartComponent {
448
410
  .outerRadius(innerRadius + (radius * 0.95 - innerRadius) / 2);
449
411
  // Get animation options
450
412
  const animationDuration = this.effectiveOptions().animationDuration;
451
- const animationEasing = this.getEasingFunction(this.effectiveOptions().animationEasing);
413
+ const animationEasing = getEasingFunction(this.d3, this.effectiveOptions().animationEasing);
452
414
  // Generate pie data
453
415
  this.pieData = pie(data);
454
416
  // Add segments with animation
@@ -515,67 +477,80 @@ class AXDonutChartComponent {
515
477
  this.cdr.detectChanges();
516
478
  }
517
479
  });
518
- // Add data labels if enabled
480
+ // Add data labels if enabled and chart size is sufficient
519
481
  if (this.effectiveOptions().showDataLabels) {
520
- // Calculate optimal font size based on segment size and chart dimensions
521
- const calculateFontSize = (d) => {
522
- // Calculate angle size in radians for the segment
523
- const angleSize = d.endAngle - d.startAngle;
524
- // Calculate the segment's percentage of the whole
525
- const segmentPercentage = (d.data.value / total) * 100;
526
- // Base minimum font size on segment size
527
- const minFontSize = segmentPercentage < 5
528
- ? 0 // Hide very small segments
529
- : segmentPercentage < 10
530
- ? 7 // Smaller font for small segments
531
- : segmentPercentage < 15
532
- ? 8 // Medium font for medium segments
533
- : 9; // Regular font for large segments
534
- // Adjust font size based on chart size
535
- return Math.min(Math.max(minFontSize, (angleSize * radius) / 10), 12);
536
- };
537
- // Format percentage value with appropriate precision
538
- const formatPercentage = (value) => {
539
- if (value < 1)
540
- return '<1%';
541
- if (value < 10)
542
- return `${value.toFixed(1)}%`;
543
- return `${Math.round(value)}%`;
544
- };
545
- const labels = this.svg
546
- .selectAll('.ax-donut-chart-data-label')
547
- .data(this.pieData)
548
- .enter()
549
- .append('text')
550
- .attr('class', 'ax-donut-chart-data-label')
551
- .style('opacity', 0)
552
- .style('pointer-events', 'none')
553
- .style('fill', 'rgb(var(--ax-comp-donut-chart-data-labels-color))')
554
- .attr('transform', (d) => {
555
- // Calculate the centroid position for the label
556
- const centroid = labelArc.centroid(d);
557
- return `translate(${centroid[0]}, ${centroid[1]})`;
558
- })
559
- .attr('text-anchor', 'middle')
560
- .attr('dominant-baseline', 'middle')
561
- .style('font-size', (d) => `${calculateFontSize(d)}px`)
562
- .style('font-weight', (d) => ((d.data.value / total) * 100 >= 15 ? '600' : '500'))
563
- .text((d) => {
564
- // Calculate percentage for labels
565
- const percentage = (d.data.value / total) * 100;
566
- // Only show if segment is large enough to display text
567
- if (percentage < 1)
568
- return '';
569
- const label = d.data.label || '';
570
- const percentageText = formatPercentage(percentage);
571
- return label ? `${label} (${percentageText})` : percentageText;
572
- });
573
- // Animate labels
574
- labels
575
- .transition()
576
- .duration(animationDuration)
577
- .delay((d, i) => i * 50 + 200)
578
- .style('opacity', 1);
482
+ const minChartDimension = Math.min(chartWidth, chartHeight);
483
+ const isTooSmallChartForLabels = minChartDimension < 260; // Hide labels entirely on small charts
484
+ if (!isTooSmallChartForLabels) {
485
+ // Calculate optimal font size based on segment size and chart dimensions
486
+ const calculateFontSize = (d) => {
487
+ const angleSize = d.endAngle - d.startAngle; // radians
488
+ const segmentPercentage = (d.data.value / total) * 100;
489
+ // Drop labels for very small segments
490
+ if (segmentPercentage < 2)
491
+ return 0;
492
+ // Minimum readable font size; avoid tiny unreadable text
493
+ const minReadable = segmentPercentage < 8 ? 0 : 9;
494
+ // Base size scaled by arc angle and radius, capped
495
+ const scaled = (angleSize * radius) / 9;
496
+ return Math.min(Math.max(minReadable, scaled), 13);
497
+ };
498
+ const formatPercentage = (value) => {
499
+ if (value < 1)
500
+ return '<1%';
501
+ if (value < 10)
502
+ return `${value.toFixed(1)}%`;
503
+ return `${Math.round(value)}%`;
504
+ };
505
+ const labelRadius = innerRadius + (radius * 0.95 - innerRadius) / 2;
506
+ const approximateTextWidth = (text, fontSize) => {
507
+ // Approximate width: 0.55em per char
508
+ return text.length * fontSize * 0.55;
509
+ };
510
+ const arcLength = (d) => (d.endAngle - d.startAngle) * labelRadius;
511
+ const buildLabelText = (d) => {
512
+ const percentage = (d.data.value / total) * 100;
513
+ if (percentage < 1)
514
+ return '';
515
+ const label = d.data.label || '';
516
+ const percentageText = formatPercentage(percentage);
517
+ return label ? `${label} (${percentageText})` : percentageText;
518
+ };
519
+ const dataThatFits = this.pieData.filter((d) => {
520
+ const fontSize = calculateFontSize(d);
521
+ if (!fontSize)
522
+ return false;
523
+ const text = buildLabelText(d);
524
+ if (!text)
525
+ return false;
526
+ const available = arcLength(d);
527
+ const needed = approximateTextWidth(text, fontSize) + 6; // small padding
528
+ return needed <= available;
529
+ });
530
+ const labels = this.svg
531
+ .selectAll('.ax-donut-chart-data-label')
532
+ .data(dataThatFits)
533
+ .enter()
534
+ .append('text')
535
+ .attr('class', 'ax-donut-chart-data-label')
536
+ .style('opacity', 0)
537
+ .style('pointer-events', 'none')
538
+ .style('fill', 'rgb(var(--ax-comp-donut-chart-data-labels-color))')
539
+ .attr('transform', (d) => {
540
+ const centroid = labelArc.centroid(d);
541
+ return `translate(${centroid[0]}, ${centroid[1]})`;
542
+ })
543
+ .attr('text-anchor', 'middle')
544
+ .attr('dominant-baseline', 'middle')
545
+ .style('font-size', (d) => `${calculateFontSize(d)}px`)
546
+ .style('font-weight', (d) => ((d.data.value / total) * 100 >= 15 ? '600' : '500'))
547
+ .text((d) => buildLabelText(d));
548
+ labels
549
+ .transition()
550
+ .duration(animationDuration)
551
+ .delay((d, i) => i * 50 + 200)
552
+ .style('opacity', 1);
553
+ }
579
554
  }
580
555
  // Determine when all segment animations are complete (handle empty case)
581
556
  if (numSegments === 0) {
@@ -586,30 +561,7 @@ class AXDonutChartComponent {
586
561
  /**
587
562
  * Gets the appropriate D3 easing function based on the option string
588
563
  */
589
- getEasingFunction(easing) {
590
- switch (easing) {
591
- case 'linear':
592
- return this.d3.easeLinear;
593
- case 'ease':
594
- return this.d3.easePolyInOut;
595
- case 'ease-in':
596
- return this.d3.easePolyIn;
597
- case 'ease-out':
598
- return this.d3.easePolyOut;
599
- case 'ease-in-out':
600
- return this.d3.easePolyInOut;
601
- case 'cubic':
602
- return this.d3.easeCubic;
603
- case 'cubic-in':
604
- return this.d3.easeCubicIn;
605
- case 'cubic-out':
606
- return this.d3.easeCubicOut;
607
- case 'cubic-in-out':
608
- return this.d3.easeCubicInOut;
609
- default:
610
- return this.d3.easeCubicOut; // Default easing
611
- }
612
- }
564
+ // getEasingFunction moved to shared chart utils
613
565
  /**
614
566
  * Handle hover effects on a segment
615
567
  */
@@ -652,28 +604,14 @@ class AXDonutChartComponent {
652
604
  * Ensures the tooltip is visible by adjusting position when near edges
653
605
  */
654
606
  updateTooltipPosition(event) {
655
- const container = this.chartContainerEl().nativeElement.getBoundingClientRect();
656
- const tooltipEl = this.chartContainerEl().nativeElement.querySelector('.chart-tooltip');
657
- if (!tooltipEl) {
658
- const x = event.clientX - container.left;
659
- const y = event.clientY - container.top;
660
- this._tooltipPosition.set({ x, y });
607
+ const containerEl = this.chartContainerEl()?.nativeElement;
608
+ if (!containerEl)
661
609
  return;
662
- }
663
- const tooltipRect = tooltipEl.getBoundingClientRect();
664
- const cursorX = event.clientX - container.left;
665
- const cursorY = event.clientY - container.top;
666
- const gap = 20; // Gap between cursor and tooltip
667
- // Position tooltip to the right by default
668
- let x = cursorX + gap / 3;
669
- // If tooltip would go off the right edge, position it to the left
670
- if (x + tooltipRect.width > container.width) {
671
- x = cursorX - tooltipRect.width - gap;
672
- }
673
- // Keep tooltip within container bounds
674
- x = Math.max(gap, Math.min(x, container.width - tooltipRect.width - gap));
675
- const y = Math.max(gap, Math.min(cursorY, container.height - tooltipRect.height - gap));
676
- this._tooltipPosition.set({ x, y });
610
+ const containerRect = containerEl.getBoundingClientRect();
611
+ const tooltipEl = containerEl.querySelector('.chart-tooltip');
612
+ const tooltipRect = tooltipEl ? tooltipEl.getBoundingClientRect() : null;
613
+ const pos = computeTooltipPosition(containerRect, tooltipRect, event.clientX, event.clientY, this.TOOLTIP_GAP);
614
+ this._tooltipPosition.set(pos);
677
615
  }
678
616
  /**
679
617
  * Adds center display with total value
@@ -730,6 +668,22 @@ class AXDonutChartComponent {
730
668
  this._tooltipVisible.set(false);
731
669
  this._currentlyHighlightedSegment.set(null);
732
670
  }
671
+ // ===== Helper utilities for modularity and maintainability =====
672
+ renderMessage(container, iconClass, messageText, helpText, specificClass) {
673
+ // Clear container area first (preserve tooltip component)
674
+ this.d3.select(container).selectAll('svg, .ax-chart-message-container, .ax-donut-chart-no-data-message').remove();
675
+ const messageContainer = this.d3
676
+ .select(container)
677
+ .append('div')
678
+ .attr('class', `ax-chart-message-container ax-donut-chart-message-background ${specificClass}`);
679
+ messageContainer
680
+ .append('div')
681
+ .attr('class', 'ax-chart-message-icon ax-donut-chart-no-data-icon')
682
+ .html(`<i class="${iconClass} fa-2x"></i>`);
683
+ messageContainer.append('div').attr('class', 'ax-chart-message-text ax-donut-chart-no-data-text').text(messageText);
684
+ messageContainer.append('div').attr('class', 'ax-chart-message-help ax-donut-chart-no-data-help').text(helpText);
685
+ }
686
+ // computeTooltipPosition moved to shared chart utils
733
687
  /**
734
688
  * Gets an accessibility label describing the donut chart for screen readers
735
689
  */
@@ -766,11 +720,11 @@ class AXDonutChartComponent {
766
720
  });
767
721
  }
768
722
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXDonutChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
769
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.8", 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 svg g:has(text){font-family:inherit}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: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
723
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.8", 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-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;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 svg g:has(text){font-family:inherit}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: "component", type: AXChartTooltipComponent, selector: "ax-chart-tooltip", inputs: ["data", "position", "visible", "showPercentage", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
770
724
  }
771
725
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXDonutChartComponent, decorators: [{
772
726
  type: Component,
773
- args: [{ selector: 'ax-donut-chart', encapsulation: ViewEncapsulation.None, imports: [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 svg g:has(text){font-family:inherit}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"] }]
727
+ args: [{ selector: 'ax-donut-chart', encapsulation: ViewEncapsulation.None, imports: [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-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;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 svg g:has(text){font-family:inherit}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"] }]
774
728
  }], ctorParameters: () => [] });
775
729
 
776
730
  /**