@acorex/charts 21.0.3-next.8 → 21.1.0-next.0

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.
Files changed (29) hide show
  1. package/fesm2022/acorex-charts-bar-chart.mjs +52 -77
  2. package/fesm2022/acorex-charts-bar-chart.mjs.map +1 -1
  3. package/fesm2022/acorex-charts-chart-legend.mjs +2 -2
  4. package/fesm2022/acorex-charts-chart-legend.mjs.map +1 -1
  5. package/fesm2022/acorex-charts-chart-tooltip.mjs +2 -2
  6. package/fesm2022/acorex-charts-chart-tooltip.mjs.map +1 -1
  7. package/fesm2022/acorex-charts-donut-chart.mjs +80 -87
  8. package/fesm2022/acorex-charts-donut-chart.mjs.map +1 -1
  9. package/fesm2022/acorex-charts-funnel-chart.mjs +6 -8
  10. package/fesm2022/acorex-charts-funnel-chart.mjs.map +1 -1
  11. package/fesm2022/acorex-charts-gauge-chart.mjs +53 -34
  12. package/fesm2022/acorex-charts-gauge-chart.mjs.map +1 -1
  13. package/fesm2022/acorex-charts-heatmap-chart.mjs +6 -9
  14. package/fesm2022/acorex-charts-heatmap-chart.mjs.map +1 -1
  15. package/fesm2022/acorex-charts-hierarchy-chart.mjs +24 -65
  16. package/fesm2022/acorex-charts-hierarchy-chart.mjs.map +1 -1
  17. package/fesm2022/acorex-charts-line-chart.mjs +31 -98
  18. package/fesm2022/acorex-charts-line-chart.mjs.map +1 -1
  19. package/fesm2022/acorex-charts.mjs +65 -1
  20. package/fesm2022/acorex-charts.mjs.map +1 -1
  21. package/package.json +1 -1
  22. package/types/acorex-charts-bar-chart.d.ts +3 -28
  23. package/types/acorex-charts-donut-chart.d.ts +8 -22
  24. package/types/acorex-charts-funnel-chart.d.ts +3 -25
  25. package/types/acorex-charts-gauge-chart.d.ts +6 -21
  26. package/types/acorex-charts-heatmap-chart.d.ts +2 -28
  27. package/types/acorex-charts-hierarchy-chart.d.ts +2 -27
  28. package/types/acorex-charts-line-chart.d.ts +2 -38
  29. package/types/acorex-charts.d.ts +52 -2
@@ -82,6 +82,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
82
82
  type: Directive
83
83
  }] });
84
84
 
85
+ /**
86
+ * Renders a centered empty-state message inside a chart container.
87
+ * Clears prior SVG / empty-state nodes; leaves Angular tooltip hosts alone.
88
+ */
89
+ function renderChartEmptyMessage(d3, container, message) {
90
+ const root = d3.select(container);
91
+ root.selectAll('svg, .ax-chart-empty').remove();
92
+ const card = root.append('div').attr('class', 'ax-chart-empty').append('div').attr('class', 'ax-chart-empty__card');
93
+ card
94
+ .append('div')
95
+ .attr('class', 'ax-chart-empty__icon')
96
+ .html(`<i class="${message.icon} fa-2x" aria-hidden="true"></i>`);
97
+ card.append('div').attr('class', 'ax-chart-empty__title').text(message.title);
98
+ if (message.help) {
99
+ card.append('div').attr('class', 'ax-chart-empty__help').text(message.help);
100
+ }
101
+ }
102
+
103
+ const AX_CHART_DEFAULT_MESSAGES = {
104
+ noData: 'No data available',
105
+ noDataHelp: 'Please provide data to display the chart',
106
+ allHidden: 'All series are hidden',
107
+ allHiddenHelp: 'Click on legend items to show them',
108
+ noDataIcon: 'fa-light fa-chart-simple',
109
+ allHiddenIcon: 'fa-light fa-eye-slash',
110
+ };
111
+ function mergeChartMessages(defaults = {}, overrides) {
112
+ return {
113
+ ...AX_CHART_DEFAULT_MESSAGES,
114
+ ...defaults,
115
+ ...overrides,
116
+ };
117
+ }
118
+ /** Shallow merge options while preserving nested margin/messages defaults. */
119
+ function mergeChartOptions(defaults, options) {
120
+ const opts = (options ?? {});
121
+ const result = { ...defaults, ...opts };
122
+ const defaultRecord = defaults;
123
+ const optionRecord = opts;
124
+ if (defaultRecord.messages || optionRecord.messages) {
125
+ result.messages = mergeChartMessages(defaultRecord.messages, optionRecord.messages);
126
+ }
127
+ if (defaultRecord.margins || optionRecord.margins) {
128
+ result.margins = { ...defaultRecord.margins, ...optionRecord.margins };
129
+ }
130
+ if (defaultRecord.margin || optionRecord.margin) {
131
+ result.margin = { ...defaultRecord.margin, ...optionRecord.margin };
132
+ }
133
+ return result;
134
+ }
135
+
85
136
  /**
86
137
  * Resolves any CSS `<color>` the browser understands — including
87
138
  * `rgb(var(--token))`, `hsl(var(--token))`, `color-mix()`, etc. — to a computed
@@ -211,6 +262,19 @@ function getEasingFunction(d3, option) {
211
262
  const easing = d3[name];
212
263
  return typeof easing === 'function' ? easing : d3.easeCubicOut;
213
264
  }
265
+ /** Unique DOM id prefix per chart instance (SVG filters/gradients). */
266
+ function createChartInstanceId(prefix = 'ax-chart') {
267
+ return `${prefix}-${Math.random().toString(36).slice(2, 9)}`;
268
+ }
269
+ /**
270
+ * Normalizes barWidth: values > 1 are treated as 0–100 percentages (config default 80),
271
+ * values ≤ 1 as fractions.
272
+ */
273
+ function resolveBarWidthFraction(barWidth, fallbackPercent = 80) {
274
+ const raw = barWidth ?? fallbackPercent;
275
+ const fraction = raw > 1 ? raw / 100 : raw;
276
+ return Math.min(1, Math.max(0.05, fraction));
277
+ }
214
278
 
215
279
  const AX_CHARTS = 'ACOREX_CHARTS';
216
280
 
@@ -218,5 +282,5 @@ const AX_CHARTS = 'ACOREX_CHARTS';
218
282
  * Generated bundle index. Do not edit.
219
283
  */
220
284
 
221
- export { AXChartComponent, AX_CHARTS, AX_CHART_COLOR_PALETTE, computeTooltipPosition, formatLargeNumber, getChartColor, getEasingFunction, mapEasingName, resolveCssColorInContext };
285
+ export { AXChartComponent, AX_CHARTS, AX_CHART_COLOR_PALETTE, AX_CHART_DEFAULT_MESSAGES, computeTooltipPosition, createChartInstanceId, formatLargeNumber, getChartColor, getEasingFunction, mapEasingName, mergeChartMessages, mergeChartOptions, renderChartEmptyMessage, resolveBarWidthFraction, resolveCssColorInContext };
222
286
  //# sourceMappingURL=acorex-charts.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-charts.mjs","sources":["../../../../packages/charts/src/lib/chart-colors.ts","../../../../packages/charts/src/lib/chart-component-base.ts","../../../../packages/charts/src/lib/chart-utils.ts","../../../../packages/charts/src/index.ts","../../../../packages/charts/src/acorex-charts.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n// Default color palette for charts\nexport const AX_CHART_COLOR_PALETTE = new InjectionToken<string[]>(\n 'AX_CHART_COLOR_PALETTE',\n {\n providedIn: 'root',\n factory: () => [\n '#FF6B6B', // Vibrant Red\n '#4ECDC4', // Electric Teal\n '#45B7D1', // Bright Blue\n '#96CEB4', // Fresh Green\n '#FFEEAD', // Bright Yellow\n '#D4A5A5', // Rose Pink\n '#9B59B6', // Rich Purple\n '#3498DB', // Deep Blue\n '#E67E22', // Bright Orange\n '#2ECC71', // Emerald Green\n '#E74C3C', // Cherry Red\n '#1ABC9C', // Turquoise\n '#F1C40F', // Golden Yellow\n '#8E44AD', // Deep Purple\n '#16A085', // Dark Teal\n\n // --- Extended Colors (new) ---\n '#27AE60', // Forest Green\n '#2980B9', // Strong Blue\n '#F39C12', // Vivid Orange\n '#C0392B', // Dark Red\n '#7D3C98', // Plum Purple\n '#2C3E50', // Midnight Blue\n '#D35400', // Burnt Orange\n '#BDC3C7', // Soft Silver\n '#34495E', // Slate Gray\n '#1F618D', // Royal Blue\n '#58D68D', // Mint Green\n '#5DADE2', // Sky Blue\n '#F1948A', // Soft Coral\n '#A569BD', // Lavender Purple\n '#F8C471', // Warm Gold\n ],\n }\n);\n\n\n/**\n * Helper function to get a color from the palette by index\n * @param index The index of the color to get\n * @param palette The color palette to use\n * @returns The color at the specified index\n */\nexport function getChartColor(index: number, palette: string[]): string {\n return palette[index % palette.length];\n}\n","import { afterNextRender, Directive, ElementRef, inject, signal } from '@angular/core';\n\n/**\n * Base component class for all chart components\n * Copied from @acorex/cdk/common NXComponent to remove external dependency\n */\n@Directive()\nexport abstract class AXChartComponent {\n #elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n #isRendered = signal(false);\n\n protected isRendered = this.#isRendered.asReadonly();\n\n #afterNextRender = afterNextRender(() => {\n if (!this.isRendered()) {\n this.nativeElement['__axContext__'] = this;\n this.#isRendered.set(true);\n }\n });\n\n /**\n * Gets the native HTML element of the component\n */\n public get nativeElement(): HTMLElement {\n return this.#elementRef.nativeElement;\n }\n\n /**\n * Gets the host HTML element of the component (alias for nativeElement)\n * @returns T - The native DOM element associated with this component\n */\n public getHostElement<T = HTMLElement>(): T {\n return this.#elementRef.nativeElement as T;\n }\n}\n","export type TooltipPosition = { x: number; y: number };\n\n/**\n * Resolves any CSS `<color>` the browser understands — including\n * `rgb(var(--token))`, `hsl(var(--token))`, `color-mix()`, etc. — to a computed\n * `rgb()` / `rgba()` string, using the cascade from `scopeElement` (e.g. the chart\n * container) so design tokens on ancestors apply.\n */\nexport function resolveCssColorInContext(scopeElement: HTMLElement, cssColor: string): string {\n if (typeof window === 'undefined' || typeof document === 'undefined' || !getComputedStyle) {\n return cssColor;\n }\n const input = cssColor?.trim();\n if (!input) {\n return cssColor;\n }\n\n const probe = document.createElement('span');\n probe.style.cssText =\n 'position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;';\n probe.style.color = input;\n scopeElement.appendChild(probe);\n void probe.offsetHeight;\n const resolved = getComputedStyle(probe).color;\n probe.remove();\n\n return resolved || cssColor;\n}\n\n/**\n * Compute edge-aware tooltip position with intelligent placement,\n * considering available space in all directions and preventing overflow.\n */\nexport function computeTooltipPosition(\n containerRect: DOMRect,\n tooltipRect: DOMRect | null,\n clientX: number,\n clientY: number,\n gap: number,\n): TooltipPosition {\n const cursorX = clientX - containerRect.left;\n const cursorY = clientY - containerRect.top;\n\n if (!tooltipRect) {\n return {\n x: Math.min(cursorX + gap, containerRect.width - gap),\n y: Math.max(gap, Math.min(cursorY, containerRect.height - gap)),\n };\n }\n\n // Calculate available space in each direction\n const spaceRight = containerRect.width - cursorX;\n const spaceLeft = cursorX;\n const spaceBelow = containerRect.height - cursorY;\n const spaceAbove = cursorY;\n\n // Determine best horizontal position\n let x: number;\n if (spaceRight >= tooltipRect.width + gap) {\n // Position to the right of cursor\n x = cursorX + gap;\n } else if (spaceLeft >= tooltipRect.width + gap) {\n // Position to the left of cursor\n x = cursorX - tooltipRect.width - gap;\n } else {\n // Center horizontally if neither side has enough space\n x = Math.max(\n gap,\n Math.min((containerRect.width - tooltipRect.width) / 2, containerRect.width - tooltipRect.width - gap),\n );\n }\n\n // Determine best vertical position\n let y: number;\n if (spaceBelow >= tooltipRect.height + gap) {\n // Position below cursor\n y = cursorY + gap;\n } else if (spaceAbove >= tooltipRect.height + gap) {\n // Position above cursor\n y = cursorY - tooltipRect.height - gap;\n } else {\n // Center vertically if neither direction has enough space\n y = Math.max(\n gap,\n Math.min((containerRect.height - tooltipRect.height) / 2, containerRect.height - tooltipRect.height - gap),\n );\n }\n\n // Ensure tooltip stays within container bounds\n x = Math.max(gap, Math.min(x, containerRect.width - tooltipRect.width - gap));\n y = Math.max(gap, Math.min(y, containerRect.height - tooltipRect.height - gap));\n\n return { x, y };\n}\n\n/**\n * Map easing option to d3 easing function name that callers can lookup on d3.\n * Keeps mapping consistent across charts.\n */\nexport type D3EasingName =\n | 'easeLinear'\n | 'easePolyInOut'\n | 'easePolyIn'\n | 'easePolyOut'\n | 'easeCubic'\n | 'easeCubicIn'\n | 'easeCubicOut'\n | 'easeCubicInOut';\n\nexport function mapEasingName(option?: string): D3EasingName {\n switch (option) {\n case 'linear':\n return 'easeLinear';\n case 'ease':\n return 'easePolyInOut';\n case 'ease-in':\n return 'easePolyIn';\n case 'ease-out':\n return 'easePolyOut';\n case 'ease-in-out':\n return 'easePolyInOut';\n case 'cubic':\n return 'easeCubic';\n case 'cubic-in':\n return 'easeCubicIn';\n case 'cubic-out':\n return 'easeCubicOut';\n case 'cubic-in-out':\n return 'easeCubicInOut';\n default:\n return 'easeCubicOut';\n }\n}\n\n/**\n * Formats large numbers with abbreviations (K, M, B, T)\n */\nexport function formatLargeNumber(value: number): string {\n if (value === 0) return '0';\n\n const absValue = Math.abs(value);\n const sign = value < 0 ? '-' : '';\n\n if (absValue >= 1e12) {\n return `${sign}${(absValue / 1e12).toFixed(1)}T`;\n }\n if (absValue >= 1e9) {\n return `${sign}${(absValue / 1e9).toFixed(1)}B`;\n }\n if (absValue >= 1e6) {\n return `${sign}${(absValue / 1e6).toFixed(1)}M`;\n }\n if (absValue >= 1e3) {\n return `${sign}${(absValue / 1e3).toFixed(1)}K`;\n }\n\n return value.toLocaleString();\n}\n\n/**\n * Returns a D3 easing function for the provided option.\n */\nexport function getEasingFunction(d3: typeof import('d3'), option?: string): (t: number) => number {\n const name = mapEasingName(option);\n const easing = (d3 as any)[name];\n return typeof easing === 'function' ? easing : (d3 as any).easeCubicOut;\n}\n","export const AX_CHARTS = 'ACOREX_CHARTS';\nexport * from './lib/chart-base.interface';\nexport * from './lib/chart-colors';\nexport * from './lib/chart-component-base';\nexport * from './lib/chart-types';\nexport * from './lib/chart-utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;MACa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB,EACxB;AACE,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;AACb,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;;AAGT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAA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,CAAA,EAAG,IAAI,CAAA,EAAG,CAAC,QAAQ,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG;IACjD;AACA,IAAA,IAAI,QAAQ,IAAI,GAAG,EAAE;AACnB,QAAA,OAAO,CAAA,EAAG,IAAI,CAAA,EAAG,CAAC,QAAQ,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG;IACjD;AAEA,IAAA,OAAO,KAAK,CAAC,cAAc,EAAE;AAC/B;AAEA;;AAEG;AACG,SAAU,iBAAiB,CAAC,EAAuB,EAAE,MAAe,EAAA;AACxE,IAAA,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC;AAClC,IAAA,MAAM,MAAM,GAAI,EAAU,CAAC,IAAI,CAAC;AAChC,IAAA,OAAO,OAAO,MAAM,KAAK,UAAU,GAAG,MAAM,GAAI,EAAU,CAAC,YAAY;AACzE;;ACtKO,MAAM,SAAS,GAAG;;ACAzB;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-charts.mjs","sources":["../../../../packages/charts/src/lib/chart-colors.ts","../../../../packages/charts/src/lib/chart-component-base.ts","../../../../packages/charts/src/lib/chart-empty-state.ts","../../../../packages/charts/src/lib/chart-messages.ts","../../../../packages/charts/src/lib/chart-utils.ts","../../../../packages/charts/src/index.ts","../../../../packages/charts/src/acorex-charts.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n// Default color palette for charts\nexport const AX_CHART_COLOR_PALETTE = new InjectionToken<string[]>(\n 'AX_CHART_COLOR_PALETTE',\n {\n providedIn: 'root',\n factory: () => [\n '#FF6B6B', // Vibrant Red\n '#4ECDC4', // Electric Teal\n '#45B7D1', // Bright Blue\n '#96CEB4', // Fresh Green\n '#FFEEAD', // Bright Yellow\n '#D4A5A5', // Rose Pink\n '#9B59B6', // Rich Purple\n '#3498DB', // Deep Blue\n '#E67E22', // Bright Orange\n '#2ECC71', // Emerald Green\n '#E74C3C', // Cherry Red\n '#1ABC9C', // Turquoise\n '#F1C40F', // Golden Yellow\n '#8E44AD', // Deep Purple\n '#16A085', // Dark Teal\n\n // --- Extended Colors (new) ---\n '#27AE60', // Forest Green\n '#2980B9', // Strong Blue\n '#F39C12', // Vivid Orange\n '#C0392B', // Dark Red\n '#7D3C98', // Plum Purple\n '#2C3E50', // Midnight Blue\n '#D35400', // Burnt Orange\n '#BDC3C7', // Soft Silver\n '#34495E', // Slate Gray\n '#1F618D', // Royal Blue\n '#58D68D', // Mint Green\n '#5DADE2', // Sky Blue\n '#F1948A', // Soft Coral\n '#A569BD', // Lavender Purple\n '#F8C471', // Warm Gold\n ],\n }\n);\n\n\n/**\n * Helper function to get a color from the palette by index\n * @param index The index of the color to get\n * @param palette The color palette to use\n * @returns The color at the specified index\n */\nexport function getChartColor(index: number, palette: string[]): string {\n return palette[index % palette.length];\n}\n","import { afterNextRender, Directive, ElementRef, inject, signal } from '@angular/core';\n\n/**\n * Base component class for all chart components\n * Copied from @acorex/cdk/common NXComponent to remove external dependency\n */\n@Directive()\nexport abstract class AXChartComponent {\n #elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n #isRendered = signal(false);\n\n protected isRendered = this.#isRendered.asReadonly();\n\n #afterNextRender = afterNextRender(() => {\n if (!this.isRendered()) {\n this.nativeElement['__axContext__'] = this;\n this.#isRendered.set(true);\n }\n });\n\n /**\n * Gets the native HTML element of the component\n */\n public get nativeElement(): HTMLElement {\n return this.#elementRef.nativeElement;\n }\n\n /**\n * Gets the host HTML element of the component (alias for nativeElement)\n * @returns T - The native DOM element associated with this component\n */\n public getHostElement<T = HTMLElement>(): T {\n return this.#elementRef.nativeElement as T;\n }\n}\n","export interface AXChartEmptyMessageContent {\n icon: string;\n title: string;\n help?: string;\n}\n\n/**\n * Renders a centered empty-state message inside a chart container.\n * Clears prior SVG / empty-state nodes; leaves Angular tooltip hosts alone.\n */\nexport function renderChartEmptyMessage(\n d3: { select: (node: HTMLElement) => D3EmptySelection },\n container: HTMLElement,\n message: AXChartEmptyMessageContent,\n): void {\n const root = d3.select(container);\n root.selectAll('svg, .ax-chart-empty').remove();\n\n const card = root.append('div').attr('class', 'ax-chart-empty').append('div').attr('class', 'ax-chart-empty__card');\n\n card\n .append('div')\n .attr('class', 'ax-chart-empty__icon')\n .html(`<i class=\"${message.icon} fa-2x\" aria-hidden=\"true\"></i>`);\n\n card.append('div').attr('class', 'ax-chart-empty__title').text(message.title);\n\n if (message.help) {\n card.append('div').attr('class', 'ax-chart-empty__help').text(message.help);\n }\n}\n\n/** Minimal D3 selection surface used by empty-state rendering. */\ninterface D3EmptySelection {\n selectAll: (selector: string) => { remove: () => unknown };\n append: (tag: string) => D3EmptyAppend;\n}\n\ninterface D3EmptyAppend {\n attr: (name: string, value: string) => D3EmptyAppend;\n append: (tag: string) => D3EmptyAppend;\n html: (value: string) => D3EmptyAppend;\n text: (value: string) => D3EmptyAppend;\n}\n","/**\n * Shared empty-state copy for all charts.\n * Per-chart configs may override icons; default title/help stay consistent.\n */\nexport interface AXChartMessages {\n noData?: string;\n noDataHelp?: string;\n allHidden?: string;\n allHiddenHelp?: string;\n noDataIcon?: string;\n allHiddenIcon?: string;\n}\n\nexport const AX_CHART_DEFAULT_MESSAGES: Required<AXChartMessages> = {\n noData: 'No data available',\n noDataHelp: 'Please provide data to display the chart',\n allHidden: 'All series are hidden',\n allHiddenHelp: 'Click on legend items to show them',\n noDataIcon: 'fa-light fa-chart-simple',\n allHiddenIcon: 'fa-light fa-eye-slash',\n};\n\nexport function mergeChartMessages(\n defaults: AXChartMessages = {},\n overrides?: AXChartMessages,\n): Required<AXChartMessages> {\n return {\n ...AX_CHART_DEFAULT_MESSAGES,\n ...defaults,\n ...overrides,\n };\n}\n\n/** Shallow merge options while preserving nested margin/messages defaults. */\nexport function mergeChartOptions<T extends object>(defaults: T, options?: Partial<T> | null): T {\n const opts = (options ?? {}) as Partial<T>;\n const result = { ...defaults, ...opts } as T & {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n\n const defaultRecord = defaults as {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n const optionRecord = opts as {\n messages?: AXChartMessages;\n margins?: object;\n margin?: object;\n };\n\n if (defaultRecord.messages || optionRecord.messages) {\n result.messages = mergeChartMessages(defaultRecord.messages, optionRecord.messages);\n }\n if (defaultRecord.margins || optionRecord.margins) {\n result.margins = { ...defaultRecord.margins, ...optionRecord.margins };\n }\n if (defaultRecord.margin || optionRecord.margin) {\n result.margin = { ...defaultRecord.margin, ...optionRecord.margin };\n }\n\n return result;\n}\n","export type TooltipPosition = { x: number; y: number };\n\n/**\n * Resolves any CSS `<color>` the browser understands — including\n * `rgb(var(--token))`, `hsl(var(--token))`, `color-mix()`, etc. — to a computed\n * `rgb()` / `rgba()` string, using the cascade from `scopeElement` (e.g. the chart\n * container) so design tokens on ancestors apply.\n */\nexport function resolveCssColorInContext(scopeElement: HTMLElement, cssColor: string): string {\n if (typeof window === 'undefined' || typeof document === 'undefined' || !getComputedStyle) {\n return cssColor;\n }\n const input = cssColor?.trim();\n if (!input) {\n return cssColor;\n }\n\n const probe = document.createElement('span');\n probe.style.cssText =\n 'position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;';\n probe.style.color = input;\n scopeElement.appendChild(probe);\n void probe.offsetHeight;\n const resolved = getComputedStyle(probe).color;\n probe.remove();\n\n return resolved || cssColor;\n}\n\n/**\n * Compute edge-aware tooltip position with intelligent placement,\n * considering available space in all directions and preventing overflow.\n */\nexport function computeTooltipPosition(\n containerRect: DOMRect,\n tooltipRect: DOMRect | null,\n clientX: number,\n clientY: number,\n gap: number,\n): TooltipPosition {\n const cursorX = clientX - containerRect.left;\n const cursorY = clientY - containerRect.top;\n\n if (!tooltipRect) {\n return {\n x: Math.min(cursorX + gap, containerRect.width - gap),\n y: Math.max(gap, Math.min(cursorY, containerRect.height - gap)),\n };\n }\n\n // Calculate available space in each direction\n const spaceRight = containerRect.width - cursorX;\n const spaceLeft = cursorX;\n const spaceBelow = containerRect.height - cursorY;\n const spaceAbove = cursorY;\n\n // Determine best horizontal position\n let x: number;\n if (spaceRight >= tooltipRect.width + gap) {\n // Position to the right of cursor\n x = cursorX + gap;\n } else if (spaceLeft >= tooltipRect.width + gap) {\n // Position to the left of cursor\n x = cursorX - tooltipRect.width - gap;\n } else {\n // Center horizontally if neither side has enough space\n x = Math.max(\n gap,\n Math.min((containerRect.width - tooltipRect.width) / 2, containerRect.width - tooltipRect.width - gap),\n );\n }\n\n // Determine best vertical position\n let y: number;\n if (spaceBelow >= tooltipRect.height + gap) {\n // Position below cursor\n y = cursorY + gap;\n } else if (spaceAbove >= tooltipRect.height + gap) {\n // Position above cursor\n y = cursorY - tooltipRect.height - gap;\n } else {\n // Center vertically if neither direction has enough space\n y = Math.max(\n gap,\n Math.min((containerRect.height - tooltipRect.height) / 2, containerRect.height - tooltipRect.height - gap),\n );\n }\n\n // Ensure tooltip stays within container bounds\n x = Math.max(gap, Math.min(x, containerRect.width - tooltipRect.width - gap));\n y = Math.max(gap, Math.min(y, containerRect.height - tooltipRect.height - gap));\n\n return { x, y };\n}\n\n/**\n * Map easing option to d3 easing function name that callers can lookup on d3.\n * Keeps mapping consistent across charts.\n */\nexport type D3EasingName =\n | 'easeLinear'\n | 'easePolyInOut'\n | 'easePolyIn'\n | 'easePolyOut'\n | 'easeCubic'\n | 'easeCubicIn'\n | 'easeCubicOut'\n | 'easeCubicInOut';\n\nexport function mapEasingName(option?: string): D3EasingName {\n switch (option) {\n case 'linear':\n return 'easeLinear';\n case 'ease':\n return 'easePolyInOut';\n case 'ease-in':\n return 'easePolyIn';\n case 'ease-out':\n return 'easePolyOut';\n case 'ease-in-out':\n return 'easePolyInOut';\n case 'cubic':\n return 'easeCubic';\n case 'cubic-in':\n return 'easeCubicIn';\n case 'cubic-out':\n return 'easeCubicOut';\n case 'cubic-in-out':\n return 'easeCubicInOut';\n default:\n return 'easeCubicOut';\n }\n}\n\n/**\n * Formats large numbers with abbreviations (K, M, B, T)\n */\nexport function formatLargeNumber(value: number): string {\n if (value === 0) return '0';\n\n const absValue = Math.abs(value);\n const sign = value < 0 ? '-' : '';\n\n if (absValue >= 1e12) {\n return `${sign}${(absValue / 1e12).toFixed(1)}T`;\n }\n if (absValue >= 1e9) {\n return `${sign}${(absValue / 1e9).toFixed(1)}B`;\n }\n if (absValue >= 1e6) {\n return `${sign}${(absValue / 1e6).toFixed(1)}M`;\n }\n if (absValue >= 1e3) {\n return `${sign}${(absValue / 1e3).toFixed(1)}K`;\n }\n\n return value.toLocaleString();\n}\n\n/**\n * Returns a D3 easing function for the provided option.\n */\nexport function getEasingFunction(d3: typeof import('d3'), option?: string): (t: number) => number {\n const name = mapEasingName(option);\n const easing = (d3 as any)[name];\n return typeof easing === 'function' ? easing : (d3 as any).easeCubicOut;\n}\n\n/** Unique DOM id prefix per chart instance (SVG filters/gradients). */\nexport function createChartInstanceId(prefix = 'ax-chart'): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`;\n}\n\n/**\n * Normalizes barWidth: values > 1 are treated as 0–100 percentages (config default 80),\n * values ≤ 1 as fractions.\n */\nexport function resolveBarWidthFraction(barWidth: number | undefined, fallbackPercent = 80): number {\n const raw = barWidth ?? fallbackPercent;\n const fraction = raw > 1 ? raw / 100 : raw;\n return Math.min(1, Math.max(0.05, fraction));\n}\n","export const AX_CHARTS = 'ACOREX_CHARTS';\nexport * from './lib/chart-base.interface';\nexport * from './lib/chart-colors';\nexport * from './lib/chart-component-base';\nexport * from './lib/chart-empty-state';\nexport * from './lib/chart-messages';\nexport * from './lib/chart-types';\nexport * from './lib/chart-utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;MACa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB,EACxB;AACE,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;AACb,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;AACT,QAAA,SAAS;A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.8",
3
+ "version": "21.1.0-next.0",
4
4
  "peerDependencies": {
5
5
  "d3": ">=7.9.0"
6
6
  },
@@ -1,4 +1,3 @@
1
- import * as _acorex_charts_bar_chart from '@acorex/charts/bar-chart';
2
1
  import * as _acorex_charts from '@acorex/charts';
3
2
  import { NXNativeEvent, AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
4
3
  import * as d3 from 'd3';
@@ -72,6 +71,7 @@ interface AXBarChartOption {
72
71
  yAxisLabel?: string;
73
72
  rotateXAxisLabels?: boolean | 'auto';
74
73
  showTooltip?: boolean;
74
+ /** Percent of band width used by each bar (0–100). Default: 80. Values ≤ 1 are treated as fractions. */
75
75
  barWidth?: number;
76
76
  cornerRadius?: number;
77
77
  animationDuration?: number;
@@ -161,32 +161,8 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
161
161
  protected tooltipData: _angular_core.Signal<AXChartTooltipData>;
162
162
  private configToken;
163
163
  private chartColors;
164
- protected effectiveOptions: _angular_core.Signal<{
165
- width?: number;
166
- height?: number;
167
- showXAxis?: boolean;
168
- showYAxis?: boolean;
169
- showGrid?: boolean;
170
- showDataLabels?: boolean;
171
- xAxisLabel?: string;
172
- yAxisLabel?: string;
173
- rotateXAxisLabels?: boolean | "auto";
174
- showTooltip?: boolean;
175
- barWidth?: number;
176
- cornerRadius?: number;
177
- animationDuration?: number;
178
- animationDelay?: number;
179
- animationEasing?: _acorex_charts.AXAnimationEasing;
180
- messages?: _acorex_charts_bar_chart.AXBarChartMessages;
181
- }>;
182
- protected effectiveMessages: _angular_core.Signal<{
183
- noData: string;
184
- noDataHelp: string;
185
- allHidden: string;
186
- allHiddenHelp: string;
187
- noDataIcon: string;
188
- allHiddenIcon: string;
189
- }>;
164
+ protected effectiveOptions: _angular_core.Signal<AXBarChartOption>;
165
+ protected effectiveMessages: _angular_core.Signal<Required<_acorex_charts.AXChartMessages>>;
190
166
  private readonly hiddenBars;
191
167
  private readonly hiddenSeries;
192
168
  private readonly isClusteredMode;
@@ -319,7 +295,6 @@ declare class AXBarChartComponent extends AXChartComponent implements OnDestroy,
319
295
  */
320
296
  private getYAxisTickFontSizeBasedOnHeight;
321
297
  private buildXAxisCommon;
322
- private showMessage;
323
298
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXBarChartComponent, never>;
324
299
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXBarChartComponent, "ax-bar-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "barClick": "barClick"; }, never, never, true, never>;
325
300
  }
@@ -1,4 +1,3 @@
1
- import * as _acorex_charts_donut_chart from '@acorex/charts/donut-chart';
2
1
  import * as _acorex_charts from '@acorex/charts';
3
2
  import { AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
4
3
  import * as d3 from 'd3';
@@ -156,18 +155,7 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
156
155
  protected tooltipData: _angular_core.Signal<AXChartTooltipData>;
157
156
  private configToken;
158
157
  private chartColors;
159
- protected effectiveOptions: _angular_core.Signal<{
160
- width?: number;
161
- height?: number;
162
- totalLabel?: string;
163
- showTooltip?: boolean;
164
- showDataLabels?: boolean;
165
- donutWidth?: number;
166
- cornerRadius?: number;
167
- animationDuration?: number;
168
- animationEasing?: _acorex_charts.AXAnimationEasing;
169
- messages?: _acorex_charts_donut_chart.AXDonutChartMessages;
170
- }>;
158
+ protected effectiveOptions: _angular_core.Signal<AXDonutChartOption>;
171
159
  private readonly TOOLTIP_GAP;
172
160
  private readonly HIGHLIGHT_TRANSITION_DURATION;
173
161
  private readonly HIGHLIGHT_TRANSITION_NAME;
@@ -178,14 +166,9 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
178
166
  private readonly CHART_INSET;
179
167
  private readonly DIMMED_OPACITY;
180
168
  private readonly VISIBLE_OPACITY;
181
- protected effectiveMessages: _angular_core.Signal<{
182
- noData: string;
183
- noDataHelp: string;
184
- allHidden: string;
185
- allHiddenHelp: string;
186
- noDataIcon: string;
187
- allHiddenIcon: string;
188
- }>;
169
+ private readonly instanceId;
170
+ private get segmentShadowFilterId();
171
+ protected effectiveMessages: _angular_core.Signal<Required<_acorex_charts.AXChartMessages>>;
189
172
  protected chartDataArray: _angular_core.Signal<AXDonutChartData[]>;
190
173
  protected getColor(index: number): string;
191
174
  protected isSegmentHidden(id: string): boolean;
@@ -299,7 +282,6 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
299
282
  * Cleans up chart resources
300
283
  */
301
284
  cleanupChart(): void;
302
- private renderMessage;
303
285
  /**
304
286
  * Gets an accessibility label describing the donut chart for screen readers
305
287
  * @returns Descriptive string for screen readers
@@ -310,6 +292,10 @@ declare class AXDonutChartComponent extends AXChartComponent implements OnDestro
310
292
  * @implements AXChartLegendCompatible
311
293
  */
312
294
  getLegendItems(): AXChartLegendItem[];
295
+ private getSegmentLayoutValue;
296
+ private getLayoutTotal;
297
+ private getDisplayTotal;
298
+ private getSegmentPercentage;
313
299
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDonutChartComponent, never>;
314
300
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXDonutChartComponent, "ax-donut-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "segmentClick": "segmentClick"; "segmentHover": "segmentHover"; }, never, never, true, never>;
315
301
  }
@@ -1,4 +1,3 @@
1
- import * as _acorex_charts_funnel_chart from '@acorex/charts/funnel-chart';
2
1
  import * as _acorex_charts from '@acorex/charts';
3
2
  import { AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
4
3
  import * as d3 from 'd3';
@@ -15,6 +14,7 @@ interface AXFunnelData {
15
14
  }
16
15
  interface AXFunnelChartMessages {
17
16
  noData?: string;
17
+ noDataHelp?: string;
18
18
  noDataIcon?: string;
19
19
  }
20
20
  interface AXFunnelChartOption {
@@ -89,30 +89,8 @@ declare class AXFunnelChartComponent extends AXChartComponent implements OnDestr
89
89
  }>;
90
90
  protected tooltipData: _angular_core.Signal<AXChartTooltipData>;
91
91
  private configToken;
92
- protected effectiveOptions: _angular_core.Signal<{
93
- margin?: {
94
- top: number;
95
- right: number;
96
- bottom: number;
97
- left: number;
98
- };
99
- width?: number;
100
- height?: number;
101
- neckWidth?: number;
102
- colors?: string[];
103
- color?: string;
104
- valueRange?: {
105
- min: number;
106
- max: number;
107
- };
108
- showLabels?: boolean;
109
- showSegmentValues?: boolean;
110
- labelOffset?: number;
111
- showTooltip?: boolean;
112
- animationDuration?: number;
113
- animationEasing?: _acorex_charts.AXAnimationEasing;
114
- messages?: _acorex_charts_funnel_chart.AXFunnelChartMessages;
115
- }>;
92
+ protected effectiveOptions: _angular_core.Signal<AXFunnelChartOption>;
93
+ protected effectiveMessages: _angular_core.Signal<Required<_acorex_charts.AXChartMessages>>;
116
94
  constructor();
117
95
  ngOnDestroy(): void;
118
96
  protected loadD3(): Promise<void>;
@@ -1,4 +1,3 @@
1
- import * as _acorex_charts_gauge_chart from '@acorex/charts/gauge-chart';
2
1
  import * as _acorex_charts from '@acorex/charts';
3
2
  import { AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
4
3
  import * as d3 from 'd3';
@@ -85,7 +84,7 @@ interface AXGaugeChartOption {
85
84
  * Gauge chart data type
86
85
  * Represents a single gauge value
87
86
  */
88
- type AXGaugeChartValue = number;
87
+ type AXGaugeChartValue = number | null;
89
88
 
90
89
  /**
91
90
  * Gauge Chart Component
@@ -116,25 +115,8 @@ declare class AXGaugeChartComponent extends AXChartComponent implements OnDestro
116
115
  }>;
117
116
  protected tooltipData: _angular_core.Signal<AXChartTooltipData>;
118
117
  private configToken;
119
- protected effectiveOptions: _angular_core.Signal<{
120
- minValue?: number;
121
- maxValue?: number;
122
- width?: number;
123
- height?: number;
124
- gaugeWidth?: number;
125
- cornerRadius?: number;
126
- showValue?: boolean;
127
- showTooltip?: boolean;
128
- thresholds?: {
129
- value: number;
130
- color: string;
131
- label?: string;
132
- }[];
133
- label?: string;
134
- animationDuration?: number;
135
- animationEasing?: _acorex_charts.AXAnimationEasing;
136
- messages?: _acorex_charts_gauge_chart.AXGaugeChartMessages;
137
- }>;
118
+ protected effectiveOptions: _angular_core.Signal<AXGaugeChartOption>;
119
+ protected effectiveMessages: _angular_core.Signal<Required<_acorex_charts.AXChartMessages>>;
138
120
  private readonly TOOLTIP_GAP;
139
121
  private readonly HALF_CIRCLE_RADIANS;
140
122
  private readonly QUARTER_CIRCLE_RADIANS;
@@ -143,6 +125,9 @@ declare class AXGaugeChartComponent extends AXChartComponent implements OnDestro
143
125
  private readonly TICK_LABEL_CHAR_WIDTH_RATIO;
144
126
  private readonly TICK_LABEL_SIDE_PADDING;
145
127
  private readonly LABEL_TICK_CLEARANCE;
128
+ private readonly instanceId;
129
+ private get bgGradientId();
130
+ private thresholdGradientId;
146
131
  constructor();
147
132
  ngOnDestroy(): void;
148
133
  /**
@@ -1,4 +1,3 @@
1
- import * as _acorex_charts_heatmap_chart from '@acorex/charts/heatmap-chart';
2
1
  import * as _acorex_charts from '@acorex/charts';
3
2
  import { AXAnimationEasing, AXChartComponent } from '@acorex/charts';
4
3
  import * as _angular_core from '@angular/core';
@@ -106,33 +105,8 @@ declare class AXHeatmapChartComponent extends AXChartComponent implements OnDest
106
105
  }>;
107
106
  protected tooltipData: _angular_core.WritableSignal<AXChartTooltipData>;
108
107
  private _tooltipRafId;
109
- protected effectiveOptions: _angular_core.Signal<{
110
- width?: number;
111
- height?: number;
112
- margin?: {
113
- top: number;
114
- right: number;
115
- bottom: number;
116
- left: number;
117
- };
118
- colors?: string[];
119
- color?: string;
120
- valueRange?: {
121
- min: number;
122
- max: number;
123
- };
124
- cellPadding?: number;
125
- borderRadius?: number;
126
- showXAxis?: boolean;
127
- showYAxis?: boolean;
128
- xAxisLabel?: string;
129
- yAxisLabel?: string;
130
- rotateXAxisLabels?: boolean | "auto";
131
- showTooltip?: boolean;
132
- animationDuration?: number;
133
- animationEasing?: _acorex_charts.AXAnimationEasing;
134
- messages?: _acorex_charts_heatmap_chart.AXHeatmapMessages;
135
- }>;
108
+ protected effectiveOptions: _angular_core.Signal<AXHeatmapChartOption>;
109
+ protected effectiveMessages: _angular_core.Signal<Required<_acorex_charts.AXChartMessages>>;
136
110
  constructor();
137
111
  private init;
138
112
  updateChart(): void;
@@ -1,6 +1,5 @@
1
1
  import * as _acorex_charts from '@acorex/charts';
2
2
  import { NXNativeEvent, AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
3
- import * as _acorex_charts_hierarchy_chart from '@acorex/charts/hierarchy-chart';
4
3
  import * as _angular_core from '@angular/core';
5
4
  import { OnDestroy, TemplateRef, InjectionToken } from '@angular/core';
6
5
 
@@ -307,32 +306,8 @@ declare class AXHierarchyChartComponent extends AXChartComponent implements AXCh
307
306
  nodeToggle: _angular_core.OutputEmitterRef<AXHierarchyChartToggleEvent>;
308
307
  protected processedData: _angular_core.Signal<AXHierarchyChartNode>;
309
308
  protected hasCustomTemplate: _angular_core.Signal<boolean>;
310
- protected effectiveOptions: _angular_core.Signal<{
311
- width?: number;
312
- height?: number;
313
- margin?: _acorex_charts_hierarchy_chart.AXHierarchyChartMargin;
314
- nodeRadius?: number;
315
- nodeStrokeWidth?: number;
316
- linkWidth?: number;
317
- linkStyle?: "straight" | "curved" | "rounded" | "step";
318
- showTooltip?: boolean;
319
- direction?: "vertical" | "horizontal";
320
- nodeWidth?: number;
321
- nodeHeight?: number;
322
- nodeSpacingX?: number;
323
- nodeSpacingY?: number;
324
- collapsible?: boolean;
325
- expandAll?: boolean;
326
- className?: string;
327
- animationDuration?: number;
328
- animationEasing?: _acorex_charts.AXAnimationEasing;
329
- messages?: _acorex_charts_hierarchy_chart.AXHierarchyChartMessages;
330
- }>;
331
- protected effectiveMessages: _angular_core.Signal<{
332
- noData: string;
333
- noDataHelp: string;
334
- noDataIcon: string;
335
- }>;
309
+ protected effectiveOptions: _angular_core.Signal<AXHierarchyChartOption>;
310
+ protected effectiveMessages: _angular_core.Signal<Required<_acorex_charts.AXChartMessages>>;
336
311
  constructor();
337
312
  /**
338
313
  * Initialize the expanded state for all nodes
@@ -1,4 +1,3 @@
1
- import * as _acorex_charts_line_chart from '@acorex/charts/line-chart';
2
1
  import * as _acorex_charts from '@acorex/charts';
3
2
  import { AXAnimationEasing, NXNativeEvent, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
4
3
  import * as d3 from 'd3';
@@ -137,43 +136,8 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
137
136
  protected tooltipData: _angular_core.Signal<AXChartTooltipData>;
138
137
  private configToken;
139
138
  private chartColors;
140
- protected effectiveOptions: _angular_core.Signal<{
141
- width?: number;
142
- height?: number;
143
- margins?: {
144
- top?: number;
145
- right?: number;
146
- bottom?: number;
147
- left?: number;
148
- };
149
- showXAxis?: boolean;
150
- showYAxis?: boolean;
151
- showGrid?: boolean;
152
- showVerticalGrid?: boolean;
153
- xAxisLabel?: string;
154
- yAxisLabel?: string;
155
- yAxisStartsAtZero?: boolean;
156
- axisPadding?: number;
157
- showTooltip?: boolean;
158
- lineWidth?: number;
159
- showPoints?: boolean;
160
- pointRadius?: number;
161
- smoothLine?: boolean;
162
- fillArea?: boolean;
163
- fillOpacity?: number;
164
- showCrosshair?: boolean;
165
- animationDuration?: number;
166
- animationEasing?: _acorex_charts.AXAnimationEasing;
167
- messages?: _acorex_charts_line_chart.AXLineChartMessages;
168
- }>;
169
- protected effectiveMessages: _angular_core.Signal<{
170
- noData: string;
171
- noDataHelp: string;
172
- allHidden: string;
173
- allHiddenHelp: string;
174
- noDataIcon: string;
175
- allHiddenIcon: string;
176
- }>;
139
+ protected effectiveOptions: _angular_core.Signal<AXLineChartOption>;
140
+ protected effectiveMessages: _angular_core.Signal<Required<_acorex_charts.AXChartMessages>>;
177
141
  private readonly MIN_DIMENSION;
178
142
  private readonly DEFAULT_MARGIN_TOP;
179
143
  private readonly DEFAULT_MARGIN_RIGHT;
@@ -37,6 +37,49 @@ declare abstract class AXChartComponent {
37
37
  static ɵdir: i0.ɵɵDirectiveDeclaration<AXChartComponent, never, never, {}, {}, never, never, true, never>;
38
38
  }
39
39
 
40
+ interface AXChartEmptyMessageContent {
41
+ icon: string;
42
+ title: string;
43
+ help?: string;
44
+ }
45
+ /**
46
+ * Renders a centered empty-state message inside a chart container.
47
+ * Clears prior SVG / empty-state nodes; leaves Angular tooltip hosts alone.
48
+ */
49
+ declare function renderChartEmptyMessage(d3: {
50
+ select: (node: HTMLElement) => D3EmptySelection;
51
+ }, container: HTMLElement, message: AXChartEmptyMessageContent): void;
52
+ /** Minimal D3 selection surface used by empty-state rendering. */
53
+ interface D3EmptySelection {
54
+ selectAll: (selector: string) => {
55
+ remove: () => unknown;
56
+ };
57
+ append: (tag: string) => D3EmptyAppend;
58
+ }
59
+ interface D3EmptyAppend {
60
+ attr: (name: string, value: string) => D3EmptyAppend;
61
+ append: (tag: string) => D3EmptyAppend;
62
+ html: (value: string) => D3EmptyAppend;
63
+ text: (value: string) => D3EmptyAppend;
64
+ }
65
+
66
+ /**
67
+ * Shared empty-state copy for all charts.
68
+ * Per-chart configs may override icons; default title/help stay consistent.
69
+ */
70
+ interface AXChartMessages {
71
+ noData?: string;
72
+ noDataHelp?: string;
73
+ allHidden?: string;
74
+ allHiddenHelp?: string;
75
+ noDataIcon?: string;
76
+ allHiddenIcon?: string;
77
+ }
78
+ declare const AX_CHART_DEFAULT_MESSAGES: Required<AXChartMessages>;
79
+ declare function mergeChartMessages(defaults?: AXChartMessages, overrides?: AXChartMessages): Required<AXChartMessages>;
80
+ /** Shallow merge options while preserving nested margin/messages defaults. */
81
+ declare function mergeChartOptions<T extends object>(defaults: T, options?: Partial<T> | null): T;
82
+
40
83
  /**
41
84
  * Animation easing options for charts
42
85
  * Copied from @acorex/cdk/common to remove external dependency
@@ -81,8 +124,15 @@ declare function formatLargeNumber(value: number): string;
81
124
  * Returns a D3 easing function for the provided option.
82
125
  */
83
126
  declare function getEasingFunction(d3: typeof d3, option?: string): (t: number) => number;
127
+ /** Unique DOM id prefix per chart instance (SVG filters/gradients). */
128
+ declare function createChartInstanceId(prefix?: string): string;
129
+ /**
130
+ * Normalizes barWidth: values > 1 are treated as 0–100 percentages (config default 80),
131
+ * values ≤ 1 as fractions.
132
+ */
133
+ declare function resolveBarWidthFraction(barWidth: number | undefined, fallbackPercent?: number): number;
84
134
 
85
135
  declare const AX_CHARTS = "ACOREX_CHARTS";
86
136
 
87
- export { AXChartComponent, AX_CHARTS, AX_CHART_COLOR_PALETTE, computeTooltipPosition, formatLargeNumber, getChartColor, getEasingFunction, mapEasingName, resolveCssColorInContext };
88
- export type { AXAnimationEasing, AXChartComponentBase, D3EasingName, NXNativeEvent, TooltipPosition };
137
+ export { AXChartComponent, AX_CHARTS, AX_CHART_COLOR_PALETTE, AX_CHART_DEFAULT_MESSAGES, computeTooltipPosition, createChartInstanceId, formatLargeNumber, getChartColor, getEasingFunction, mapEasingName, mergeChartMessages, mergeChartOptions, renderChartEmptyMessage, resolveBarWidthFraction, resolveCssColorInContext };
138
+ export type { AXAnimationEasing, AXChartComponentBase, AXChartEmptyMessageContent, AXChartMessages, D3EasingName, NXNativeEvent, TooltipPosition };