@acorex/charts 21.0.2-next.9 → 21.0.3-next.1

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.
@@ -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;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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;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;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-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,SAAS;AACV,KAAA;AACF,CAAA;AAIH;;;;;AAKG;AACG,SAAU,aAAa,CAAC,KAAa,EAAE,OAAiB,EAAA;IAC5D,OAAO,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;AACxC;;ACnDA;;;AAGG;MAEmB,gBAAgB,CAAA;AACpC,IAAA,WAAW,GAA4B,MAAM,CAAC,UAAU,CAAC;AACzD,IAAA,WAAW,GAAG,MAAM,CAAC,KAAK,kFAAC;AAEjB,IAAA,UAAU,GAAG,I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ACG,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/charts",
3
- "version": "21.0.2-next.9",
3
+ "version": "21.0.3-next.1",
4
4
  "peerDependencies": {
5
5
  "d3": ">=7.9.0"
6
6
  },
@@ -52,6 +52,7 @@
52
52
  "default": "./fesm2022/acorex-charts-line-chart.mjs"
53
53
  }
54
54
  },
55
+ "type": "module",
55
56
  "dependencies": {
56
57
  "tslib": "^2.3.0"
57
58
  }
@@ -16,6 +16,19 @@ interface AXHeatmapMessages {
16
16
  noDataHelp?: string;
17
17
  noDataIcon?: string;
18
18
  }
19
+ /**
20
+ * Heatmap chart options interface
21
+ *
22
+ * Component supports the following CSS custom properties (design tokens):
23
+ * - `--ax-comp-heatmap-chart-labels-color`: Color for axis tick labels.
24
+ * Default: `--ax-sys-color-on-lightest-surface` (applied with 0.7 opacity)
25
+ * - `--ax-comp-heatmap-chart-axis-label-color`: Color for X/Y axis titles.
26
+ * Default: `--ax-sys-color-on-lightest-surface`
27
+ * - `--ax-comp-heatmap-chart-axis-color`: Color for axis lines.
28
+ * Default: `--ax-sys-color-on-lightest-surface`
29
+ * - `--ax-comp-heatmap-chart-bg-color`: Background color for the chart.
30
+ * Default: transparent
31
+ */
19
32
  interface AXHeatmapChartOption {
20
33
  width?: number;
21
34
  height?: number;
@@ -71,6 +84,7 @@ declare class AXHeatmapChartComponent extends AXChartComponent implements OnDest
71
84
  private readonly MAX_LABEL_LENGTH;
72
85
  private readonly TICK_AREA_PADDING;
73
86
  private readonly X_AXIS_TITLE_GAP;
87
+ private readonly X_AXIS_TITLE_FONT_SIZE;
74
88
  private readonly MIN_FONT_SIZE_X_AXIS;
75
89
  private readonly MAX_FONT_SIZE_X_AXIS;
76
90
  private readonly defaultConfig;
@@ -2,7 +2,7 @@ import * as _acorex_charts from '@acorex/charts';
2
2
  import { NXNativeEvent, AXAnimationEasing, AXChartComponent, AXChartComponentBase } from '@acorex/charts';
3
3
  import * as _acorex_charts_hierarchy_chart from '@acorex/charts/hierarchy-chart';
4
4
  import * as _angular_core from '@angular/core';
5
- import { TemplateRef, InjectionToken } from '@angular/core';
5
+ import { OnDestroy, TemplateRef, InjectionToken } from '@angular/core';
6
6
 
7
7
  /**
8
8
  * Represents a node in the hierarchy chart.
@@ -286,7 +286,7 @@ interface AXHierarchyChartToggleEvent {
286
286
  *
287
287
  * Supports both default node styling and custom node templates.
288
288
  */
289
- declare class AXHierarchyChartComponent extends AXChartComponent implements AXChartComponentBase {
289
+ declare class AXHierarchyChartComponent extends AXChartComponent implements AXChartComponentBase, OnDestroy {
290
290
  private chartContainer;
291
291
  customNodeTemplate: _angular_core.Signal<TemplateRef<AXHierarchyChartNodeContext>>;
292
292
  private ngZone;
@@ -299,6 +299,7 @@ declare class AXHierarchyChartComponent extends AXChartComponent implements AXCh
299
299
  private _dimensions;
300
300
  private _nodeElements;
301
301
  private _chartData;
302
+ private embeddedViews;
302
303
  data: _angular_core.InputSignal<AXHierarchyChartNode | AXHierarchyChartNode[]>;
303
304
  options: _angular_core.InputSignal<AXHierarchyChartOption>;
304
305
  nodeTemplate: _angular_core.InputSignal<TemplateRef<AXHierarchyChartNodeContext>>;
@@ -369,6 +370,8 @@ declare class AXHierarchyChartComponent extends AXChartComponent implements AXCh
369
370
  * Clear existing chart
370
371
  */
371
372
  cleanupChart(): void;
373
+ ngOnDestroy(): void;
374
+ private destroyEmbeddedViews;
372
375
  updateChart(): void;
373
376
  /**
374
377
  * Get D3 easing function from string name
@@ -113,6 +113,7 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
113
113
  private svg;
114
114
  private chart;
115
115
  private xScale;
116
+ private xScaleKind;
116
117
  private yScale;
117
118
  private xAxis;
118
119
  private yAxis;
@@ -174,15 +175,18 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
174
175
  allHiddenIcon: string;
175
176
  }>;
176
177
  private readonly MIN_DIMENSION;
177
- private readonly MIN_CONTAINER_DIMENSION;
178
178
  private readonly DEFAULT_MARGIN_TOP;
179
179
  private readonly DEFAULT_MARGIN_RIGHT;
180
180
  private readonly DEFAULT_MARGIN_BOTTOM;
181
181
  private readonly DEFAULT_MARGIN_LEFT;
182
182
  private readonly MIN_MARGIN_BOTTOM;
183
183
  private readonly MIN_MARGIN_LEFT;
184
- private readonly MAX_EXTRA_MARGIN;
185
- private readonly CHART_EDGE_PADDING;
184
+ private readonly X_AXIS_TITLE_GAP;
185
+ private readonly TICK_AREA_PADDING;
186
+ private readonly AXIS_TICK_PADDING;
187
+ private readonly ROTATION_TOLERANCE;
188
+ private readonly FORCE_ROTATE_LABEL_LENGTH;
189
+ private readonly Y_AXIS_TITLE_PADDING;
186
190
  private readonly DEFAULT_LINE_WIDTH;
187
191
  private readonly DEFAULT_POINT_RADIUS;
188
192
  private readonly DEFAULT_FILL_OPACITY;
@@ -198,7 +202,6 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
198
202
  private readonly POINT_ANIMATION_DELAY_MS;
199
203
  private readonly POINT_ANIMATION_DELAY_RATIO;
200
204
  private readonly POINT_ANIMATION_DURATION_RATIO;
201
- private readonly AXIS_LABEL_FONT_SIZE;
202
205
  private readonly CHAR_WIDTH_RATIO;
203
206
  private readonly FONT_WIDTH_MULTIPLIER;
204
207
  private readonly MAX_LABEL_LENGTH;
@@ -207,7 +210,37 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
207
210
  private readonly MIN_FONT_SIZE_Y;
208
211
  private readonly MAX_FONT_SIZE_Y;
209
212
  private readonly FONT_PADDING;
210
- private readonly Y_AXIS_PADDING;
213
+ private readonly xAxisLabelLayout;
214
+ /**
215
+ * Resolves X-axis tick font size, rotation, and reserved tick area height.
216
+ */
217
+ private resolveXAxisLabelLayout;
218
+ /**
219
+ * Returns truncated label length used for layout calculations.
220
+ */
221
+ private getEffectiveXLabelLength;
222
+ /**
223
+ * Estimates vertical space required below the X-axis for tick labels.
224
+ */
225
+ private estimateXAxisTickAreaHeight;
226
+ /**
227
+ * Measures rendered X-axis tick label area using the axis group bounding box.
228
+ */
229
+ private measureXAxisTickAreaHeight;
230
+ /**
231
+ * Measures rendered Y-axis tick label width using SVG bounding boxes.
232
+ */
233
+ private measureMaxYAxisTickLabelWidth;
234
+ /**
235
+ * Calculates required bottom margin for X-axis ticks, optional rotation, and title.
236
+ */
237
+ private calculateRequiredBottomMargin;
238
+ /**
239
+ * Calculates required left margin for Y-axis ticks and title.
240
+ */
241
+ private calculateRequiredLeftMargin;
242
+ private createXAxisTitle;
243
+ private createYAxisTitle;
211
244
  private readonly MAX_POINTS_TO_RENDER;
212
245
  private readonly POINT_COORDINATE_PRECISION;
213
246
  private readonly MANY_ITEMS_THRESHOLD;
@@ -222,9 +255,21 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
222
255
  */
223
256
  private getSeriesIdentifier;
224
257
  /**
225
- * Calculates dynamic font size based on available space
258
+ * Calculates adaptive X-axis tick font size based on chart width and label count.
259
+ */
260
+ private getXAxisTickFontSize;
261
+ /**
262
+ * Calculates adaptive Y-axis tick font size based on chart height.
263
+ */
264
+ private getYAxisTickFontSize;
265
+ /**
266
+ * Calculates axis title font size relative to tick labels.
267
+ */
268
+ private getAxisTitleFontSize;
269
+ /**
270
+ * Estimates inner chart dimensions before margins are finalized.
226
271
  */
227
- private calculateDynamicFontSize;
272
+ private estimateChartDimensions;
228
273
  /**
229
274
  * Creates a unique key for point coordinates (for overlap detection)
230
275
  */
@@ -255,6 +300,7 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
255
300
  private calculateMargins;
256
301
  private setupScales;
257
302
  private createAxes;
303
+ private getXPosition;
258
304
  private renderLines;
259
305
  private enablePointerEventsAfterAnimation;
260
306
  private handlePointGroupEnter;
@@ -263,6 +309,7 @@ declare class AXLineChartComponent extends AXChartComponent implements OnInit, A
263
309
  private handlePointHover;
264
310
  private showCrosshairLines;
265
311
  private updateTooltipPosition;
312
+ private scheduleTooltipPosition;
266
313
  private handlePointClick;
267
314
  private showNoDataMessage;
268
315
  private showAllSeriesHiddenMessage;