@swimlane/ngx-charts 25.0.1 → 25.0.2

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.
@@ -1423,6 +1423,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1423
1423
  type: Input
1424
1424
  }] } });
1425
1425
 
1426
+ /** Max whole characters that fit in a pixel width (SSR / axis layout). */
1427
+ function maxCharsForPixelWidth(maxWidthPx, charWidth = 6) {
1428
+ if (maxWidthPx <= 0 || charWidth <= 0) {
1429
+ return 0;
1430
+ }
1431
+ return Math.floor(maxWidthPx / charWidth);
1432
+ }
1426
1433
  function trimLabel(s, max = 16) {
1427
1434
  if (typeof s !== 'string') {
1428
1435
  if (typeof s === 'number') {
@@ -2074,6 +2081,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2074
2081
  args: [XAxisTicksComponent]
2075
2082
  }] } });
2076
2083
 
2084
+ /** Must stay in sync with y-axis.component padding and calculateViewDimensions y-axis spacer. */
2085
+ const CATEGORY_AXIS_Y_PADDING = 5;
2086
+ const CATEGORY_AXIS_VIEW_DIMS_SPACER = 10;
2087
+ const CATEGORY_AXIS_INNER_TICK_SIZE = 6;
2088
+ const CATEGORY_AXIS_TICK_PADDING = 3;
2089
+ const CATEGORY_AXIS_LAYOUT_INSET = CATEGORY_AXIS_Y_PADDING + CATEGORY_AXIS_INNER_TICK_SIZE + CATEGORY_AXIS_TICK_PADDING - CATEGORY_AXIS_VIEW_DIMS_SPACER;
2090
+ const CATEGORY_AXIS_TRIM_CHAR_WIDTH = 7;
2091
+ /** Hard display cap per line (including ellipsis), matching SSR/print clip budget. */
2092
+ const CATEGORY_AXIS_MAX_LINE_CHARS = 23;
2093
+ /** trimLabel content budget so content + '...' fits in CATEGORY_AXIS_MAX_LINE_CHARS. */
2094
+ const CATEGORY_AXIS_MAX_CONTENT_CHARS = CATEGORY_AXIS_MAX_LINE_CHARS - 3;
2095
+ const DEFAULT_CATEGORY_WRAP_MAX_LINES = 2;
2096
+ function requiredCategoryAxisWidth(textWidth) {
2097
+ return Math.max(0, textWidth + CATEGORY_AXIS_LAYOUT_INSET);
2098
+ }
2099
+ const CATEGORY_AXIS_MAX_WIDTH = requiredCategoryAxisWidth(CATEGORY_AXIS_MAX_LINE_CHARS * CATEGORY_AXIS_TRIM_CHAR_WIDTH);
2100
+ function charsPerLine(yAxisWidth, charWidth = CATEGORY_AXIS_TRIM_CHAR_WIDTH) {
2101
+ if (yAxisWidth <= 0) {
2102
+ return 0;
2103
+ }
2104
+ return Math.min(CATEGORY_AXIS_MAX_LINE_CHARS, maxCharsForPixelWidth(yAxisWidth - CATEGORY_AXIS_LAYOUT_INSET, charWidth));
2105
+ }
2106
+ function displayWidthForLines(lines, charWidth = CATEGORY_AXIS_TRIM_CHAR_WIDTH) {
2107
+ if (!lines?.length) {
2108
+ return 0;
2109
+ }
2110
+ const maxChars = Math.max(0, ...lines.map(line => Math.min(line.length, CATEGORY_AXIS_MAX_LINE_CHARS)));
2111
+ return maxChars * charWidth;
2112
+ }
2113
+ function cappedCharsPerLine(pixelOrLayoutLimit) {
2114
+ if (pixelOrLayoutLimit <= 0) {
2115
+ return 0;
2116
+ }
2117
+ return Math.min(CATEGORY_AXIS_MAX_LINE_CHARS, pixelOrLayoutLimit);
2118
+ }
2119
+ /** Content chars for trimLabel so the rendered string (with ...) stays within displayLimit. */
2120
+ function contentCharsForDisplayLimit(displayLimit) {
2121
+ if (displayLimit <= 0) {
2122
+ return 0;
2123
+ }
2124
+ return Math.min(CATEGORY_AXIS_MAX_CONTENT_CHARS, Math.max(0, displayLimit - 3));
2125
+ }
2126
+ function effectiveCharsPerLine(yAxisWidth, trimTicks = true, label) {
2127
+ const slots = charsPerLine(yAxisWidth);
2128
+ if (!trimTicks || slots <= 0) {
2129
+ return slots;
2130
+ }
2131
+ if (label === undefined) {
2132
+ return slots;
2133
+ }
2134
+ const labelLength = String(label).trim().length;
2135
+ return labelLength > slots ? contentCharsForDisplayLimit(slots) : slots;
2136
+ }
2137
+ /** Greedy word-wrap for category y-axis labels; ellipsis only on the final line. */
2138
+ function wrapCategoryLabel(label, charsPerLineLimit, maxLines, trimTicks = true) {
2139
+ const text = String(label ?? '').trim();
2140
+ const displayLimit = cappedCharsPerLine(charsPerLineLimit);
2141
+ const contentLimit = contentCharsForDisplayLimit(displayLimit);
2142
+ if (!text) {
2143
+ return [''];
2144
+ }
2145
+ if (!trimTicks || displayLimit <= 0 || maxLines <= 0) {
2146
+ return [text];
2147
+ }
2148
+ if (maxLines === 1 || text.length <= displayLimit) {
2149
+ return text.length <= displayLimit ? [text] : [trimLabel(text, contentLimit)];
2150
+ }
2151
+ const words = text.split(/\s+/).filter(Boolean);
2152
+ const lines = [];
2153
+ let currentLine = '';
2154
+ const pushLine = (line) => {
2155
+ if (line) {
2156
+ lines.push(line);
2157
+ }
2158
+ };
2159
+ const trimRemaining = (remainingWords) => {
2160
+ // If we already filled maxLines, fold the last packed line into the truncated remainder.
2161
+ const overflowStart = lines.length >= maxLines ? maxLines - 1 : lines.length;
2162
+ const kept = lines.slice(0, overflowStart);
2163
+ const remainder = [...lines.slice(overflowStart), currentLine, ...remainingWords].filter(Boolean).join(' ').trim();
2164
+ kept.push(trimLabel(remainder, contentLimit));
2165
+ return kept;
2166
+ };
2167
+ for (let i = 0; i < words.length; i++) {
2168
+ const word = words[i];
2169
+ if (word.length > displayLimit) {
2170
+ pushLine(currentLine);
2171
+ currentLine = '';
2172
+ if (lines.length >= maxLines || lines.length === maxLines - 1) {
2173
+ return trimRemaining(words.slice(i));
2174
+ }
2175
+ lines.push(trimLabel(word, contentLimit));
2176
+ continue;
2177
+ }
2178
+ const candidate = currentLine ? `${currentLine} ${word}` : word;
2179
+ if (candidate.length <= displayLimit) {
2180
+ currentLine = candidate;
2181
+ continue;
2182
+ }
2183
+ pushLine(currentLine);
2184
+ currentLine = word;
2185
+ if (lines.length >= maxLines) {
2186
+ return trimRemaining(words.slice(i + 1));
2187
+ }
2188
+ }
2189
+ pushLine(currentLine);
2190
+ if (lines.length > maxLines) {
2191
+ const kept = lines.slice(0, maxLines - 1);
2192
+ const remainder = lines.slice(maxLines - 1).join(' ');
2193
+ kept.push(trimLabel(remainder, contentLimit));
2194
+ return kept;
2195
+ }
2196
+ return lines;
2197
+ }
2198
+ function displayLinesForLabel(label, yAxisWidth, trimTicks, wrapTicks, maxLines = DEFAULT_CATEGORY_WRAP_MAX_LINES) {
2199
+ const text = String(label).trim();
2200
+ if (!trimTicks) {
2201
+ return [text];
2202
+ }
2203
+ const limit = charsPerLine(yAxisWidth);
2204
+ if (limit <= 0) {
2205
+ return [trimLabel(text, CATEGORY_AXIS_MAX_CONTENT_CHARS)];
2206
+ }
2207
+ if (!wrapTicks || !/\s/.test(text)) {
2208
+ const contentMax = effectiveCharsPerLine(yAxisWidth, trimTicks, text);
2209
+ return text.length <= contentMax ? [text] : [trimLabel(text, contentMax)];
2210
+ }
2211
+ const wrapped = wrapCategoryLabel(text, limit, Math.min(maxLines, DEFAULT_CATEGORY_WRAP_MAX_LINES), trimTicks);
2212
+ return wrapped.length ? wrapped : [text];
2213
+ }
2214
+ function resolveCategoryAxisLayout(labels, trimTicks = true, wrapTicks = true, maxLines = DEFAULT_CATEGORY_WRAP_MAX_LINES, initialYAxisWidth = 0) {
2215
+ if (!labels?.length) {
2216
+ return { yAxisWidth: 0, charsPerLine: 0 };
2217
+ }
2218
+ const wrapLineLimit = Math.min(maxLines, DEFAULT_CATEGORY_WRAP_MAX_LINES);
2219
+ let yAxisWidth = initialYAxisWidth > 0
2220
+ ? Math.min(initialYAxisWidth, CATEGORY_AXIS_MAX_WIDTH)
2221
+ : requiredCategoryAxisWidth(Math.max(0, ...labels.map(label => {
2222
+ const text = String(label).trim();
2223
+ if (!trimTicks) {
2224
+ return Math.min(text.length, CATEGORY_AXIS_MAX_LINE_CHARS) * CATEGORY_AXIS_TRIM_CHAR_WIDTH;
2225
+ }
2226
+ const displayChars = text.length <= CATEGORY_AXIS_MAX_LINE_CHARS ? text.length : CATEGORY_AXIS_MAX_LINE_CHARS;
2227
+ return displayChars * CATEGORY_AXIS_TRIM_CHAR_WIDTH;
2228
+ })));
2229
+ yAxisWidth = Math.min(yAxisWidth, CATEGORY_AXIS_MAX_WIDTH);
2230
+ for (let i = 0; i < 5; i++) {
2231
+ let maxTextWidth = 0;
2232
+ for (const label of labels) {
2233
+ const lines = displayLinesForLabel(label, yAxisWidth, trimTicks, wrapTicks, wrapLineLimit);
2234
+ maxTextWidth = Math.max(maxTextWidth, displayWidthForLines(lines));
2235
+ }
2236
+ const nextYAxisWidth = Math.min(requiredCategoryAxisWidth(maxTextWidth), CATEGORY_AXIS_MAX_WIDTH);
2237
+ if (nextYAxisWidth === yAxisWidth) {
2238
+ break;
2239
+ }
2240
+ yAxisWidth = nextYAxisWidth;
2241
+ }
2242
+ return { yAxisWidth, charsPerLine: charsPerLine(yAxisWidth) };
2243
+ }
2244
+ /** Left edge of longest tick label given layout inputs (horizontal left y-axis). */
2245
+ function categoryLabelLeftFromLayout(marginsLeft, yAxisWidth, textWidth) {
2246
+ const tickOffset = CATEGORY_AXIS_Y_PADDING + CATEGORY_AXIS_INNER_TICK_SIZE + CATEGORY_AXIS_TICK_PADDING;
2247
+ return marginsLeft + yAxisWidth + CATEGORY_AXIS_VIEW_DIMS_SPACER - tickOffset - textWidth;
2248
+ }
2249
+
2077
2250
  class YAxisTicksComponent {
2078
2251
  constructor(platformId) {
2079
2252
  this.platformId = platformId;
@@ -2094,32 +2267,25 @@ class YAxisTicksComponent {
2094
2267
  this.outerTickSize = 6;
2095
2268
  this.rotateLabels = false;
2096
2269
  this.referenceLineLength = 0;
2270
+ /** Stable axis width for truncation/wrapping; never updated from DOM measurement. */
2271
+ this.layoutAxisWidth = 0;
2272
+ this.lastEmittedWidth = null;
2097
2273
  this.Orientation = Orientation;
2098
2274
  }
2099
2275
  ngOnChanges(changes) {
2100
2276
  this.update();
2101
2277
  }
2102
2278
  ngAfterViewInit() {
2103
- // Browser: measure after paint. SSR width is applied synchronously in update().
2104
2279
  if (isPlatformBrowser(this.platformId)) {
2105
2280
  setTimeout(() => this.updateDims());
2106
2281
  }
2107
2282
  }
2108
2283
  updateDims() {
2109
- if (!isPlatformBrowser(this.platformId)) {
2110
- // SSR: approximate — no DOM metrics available
2111
- const width = this.getApproximateAxisWidth();
2112
- if (width > 0 && width !== this.width) {
2113
- this.width = width;
2114
- this.dimensionsChanged.emit({ width: this.width });
2115
- }
2116
- return;
2117
- }
2118
- const width = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width, 10);
2119
- if (width !== this.width) {
2284
+ const width = Math.min(this.getMeasuredAxisWidth(), CATEGORY_AXIS_MAX_WIDTH);
2285
+ if (width > 0 && width !== this.lastEmittedWidth) {
2286
+ this.lastEmittedWidth = width;
2120
2287
  this.width = width;
2121
2288
  this.dimensionsChanged.emit({ width });
2122
- setTimeout(() => this.updateDims());
2123
2289
  }
2124
2290
  }
2125
2291
  update() {
@@ -2142,9 +2308,9 @@ class YAxisTicksComponent {
2142
2308
  return d.toLocaleString();
2143
2309
  };
2144
2310
  }
2311
+ this.resolveLayoutAxisWidth();
2145
2312
  this.adjustedScale = scale.bandwidth
2146
2313
  ? d => {
2147
- // position the tick to middle considering number of lines of the tick
2148
2314
  const positionMiddle = scale(d) + scale.bandwidth() * 0.5;
2149
2315
  if (this.wrapTicks && d.toString().length > this.maxTickLength) {
2150
2316
  const chunksLength = this.tickChunks(d).length;
@@ -2201,14 +2367,31 @@ class YAxisTicksComponent {
2201
2367
  break;
2202
2368
  default:
2203
2369
  }
2204
- // SSR must reserve axis width before HTML serialize (no deferred setTimeout).
2205
2370
  if (!isPlatformBrowser(this.platformId)) {
2206
- this.updateDims();
2371
+ this.applySsrAxisLayout();
2207
2372
  }
2208
2373
  else {
2209
2374
  setTimeout(() => this.updateDims());
2210
2375
  }
2211
2376
  }
2377
+ resolveLayoutAxisWidth() {
2378
+ if (!this.ticks?.length || !this.tickFormat) {
2379
+ return;
2380
+ }
2381
+ const labels = this.ticks.map(t => String(this.tickFormat(t)));
2382
+ const layout = YAxisTicksComponent.resolveAxisLayout(labels, this.trimTicks, this.maxTickLength, this.wrapTicks);
2383
+ this.layoutAxisWidth = layout.yAxisWidth;
2384
+ }
2385
+ applySsrAxisLayout() {
2386
+ if (this.layoutAxisWidth > 0 && this.layoutAxisWidth !== this.lastEmittedWidth) {
2387
+ this.lastEmittedWidth = this.layoutAxisWidth;
2388
+ this.width = this.layoutAxisWidth;
2389
+ this.dimensionsChanged.emit({ width: this.layoutAxisWidth });
2390
+ }
2391
+ else if (this.layoutAxisWidth > 0) {
2392
+ this.width = this.layoutAxisWidth;
2393
+ }
2394
+ }
2212
2395
  setReferencelines() {
2213
2396
  this.refMin = this.adjustedScale(Math.min.apply(null, this.referenceLines.map(item => item.value)));
2214
2397
  this.refMax = this.adjustedScale(Math.max.apply(null, this.referenceLines.map(item => item.value)));
@@ -2246,35 +2429,98 @@ class YAxisTicksComponent {
2246
2429
  return `translate(5,0)`;
2247
2430
  }
2248
2431
  tickTrim(label) {
2249
- return this.trimTicks ? trimLabel(label, this.maxTickLength) : label;
2432
+ if (!this.trimTicks) {
2433
+ return label;
2434
+ }
2435
+ return trimLabel(label, this.getEffectiveMaxTickLength(label));
2250
2436
  }
2251
- /** Approx px width for SSR / pre-measure seeding. */
2252
- static { this.APPROX_CHAR_WIDTH = 7; }
2253
- static approximateTickLabelsWidth(labels, trimTicks = true, maxTickLength = 16) {
2254
- if (!labels?.length) {
2255
- return 0;
2437
+ getEffectiveMaxTickLength(label) {
2438
+ if (this.orient !== Orientation.Left && this.orient !== Orientation.Right) {
2439
+ return this.maxTickLength;
2256
2440
  }
2257
- const maxChars = Math.max(0, ...labels.map(label => (trimTicks ? trimLabel(label, maxTickLength) : String(label)).length));
2258
- return maxChars * YAxisTicksComponent.APPROX_CHAR_WIDTH;
2441
+ if (this.layoutAxisWidth <= 0) {
2442
+ return this.maxTickLength;
2443
+ }
2444
+ return YAxisTicksComponent.effectiveMaxTickLength(this.layoutAxisWidth, this.maxTickLength, this.trimTicks, label);
2445
+ }
2446
+ static { this.Y_AXIS_PADDING = CATEGORY_AXIS_Y_PADDING; }
2447
+ static { this.VIEW_DIMS_Y_AXIS_SPACER = CATEGORY_AXIS_VIEW_DIMS_SPACER; }
2448
+ static { this.INNER_TICK_SIZE = CATEGORY_AXIS_INNER_TICK_SIZE; }
2449
+ static { this.TICK_PADDING = CATEGORY_AXIS_TICK_PADDING; }
2450
+ static { this.AXIS_LAYOUT_INSET = CATEGORY_AXIS_LAYOUT_INSET; }
2451
+ static { this.APPROX_CHAR_WIDTH = 6; }
2452
+ static { this.TRIM_CHAR_WIDTH = CATEGORY_AXIS_TRIM_CHAR_WIDTH; }
2453
+ static effectiveMaxTickLength(yAxisWidth, maxTickLength, trimTicks = true, label) {
2454
+ if (!trimTicks || yAxisWidth <= 0) {
2455
+ return maxTickLength;
2456
+ }
2457
+ const limit = charsPerLine(yAxisWidth);
2458
+ if (limit <= 0) {
2459
+ return maxTickLength;
2460
+ }
2461
+ if (label === undefined) {
2462
+ return limit;
2463
+ }
2464
+ const labelLength = String(label).trim().length;
2465
+ return labelLength > limit ? Math.max(0, limit - 3) : limit;
2466
+ }
2467
+ static approximateTickLabelsWidth(labels, trimTicks = true, maxTickLength = 16, wrapTicks = true) {
2468
+ return YAxisTicksComponent.resolveAxisLayout(labels, trimTicks, maxTickLength, wrapTicks).yAxisWidth;
2469
+ }
2470
+ static resolveAxisLayout(labels, trimTicks = true, maxTickLength = 16, wrapTicks = true) {
2471
+ const layout = resolveCategoryAxisLayout(labels, trimTicks, wrapTicks);
2472
+ return { yAxisWidth: layout.yAxisWidth, maxTickLength };
2473
+ }
2474
+ static requiredYAxisWidth(textWidth) {
2475
+ return requiredCategoryAxisWidth(textWidth);
2476
+ }
2477
+ static labelLeftFromLayout(marginsLeft, yAxisWidth, textWidth) {
2478
+ return categoryLabelLeftFromLayout(marginsLeft, yAxisWidth, textWidth);
2259
2479
  }
2260
2480
  getApproximateAxisWidth() {
2261
2481
  if (!this.ticks?.length || !this.tickFormat) {
2262
2482
  return 0;
2263
2483
  }
2264
- const labels = this.ticks.map(t => this.tickTrim(this.tickFormat(t)));
2265
- return YAxisTicksComponent.approximateTickLabelsWidth(labels, false, this.maxTickLength);
2484
+ const labels = this.ticks.map(t => String(this.tickFormat(t)));
2485
+ return YAxisTicksComponent.resolveAxisLayout(labels, this.trimTicks, this.maxTickLength, this.wrapTicks).yAxisWidth;
2486
+ }
2487
+ getMeasuredAxisWidth() {
2488
+ if (!isPlatformBrowser(this.platformId)) {
2489
+ return this.getApproximateAxisWidth();
2490
+ }
2491
+ if (!this.ticksElement?.nativeElement) {
2492
+ return 0;
2493
+ }
2494
+ const bboxWidth = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width, 10);
2495
+ const tickSpacing = this.tickSpacing ?? YAxisTicksComponent.INNER_TICK_SIZE + YAxisTicksComponent.TICK_PADDING;
2496
+ const textWidth = Math.max(0, bboxWidth - tickSpacing);
2497
+ return YAxisTicksComponent.requiredYAxisWidth(textWidth);
2266
2498
  }
2267
2499
  tickChunks(label) {
2268
- if (label.toString().length > this.maxTickLength && this.scale.bandwidth) {
2269
- // for y-axis the width of the tick is fixed
2270
- const preferredWidth = this.maxTickLength;
2500
+ const formatted = String(this.tickFormat(label));
2501
+ if (this.orient === Orientation.Left || this.orient === Orientation.Right) {
2502
+ if (!this.wrapTicks || !this.scale.bandwidth) {
2503
+ return [this.tickTrim(formatted)];
2504
+ }
2505
+ const maxLines = Math.min(Math.floor(this.scale.bandwidth() / 15), DEFAULT_CATEGORY_WRAP_MAX_LINES);
2506
+ if (maxLines <= 1) {
2507
+ return [this.tickTrim(formatted)];
2508
+ }
2509
+ const perLine = cappedCharsPerLine(this.layoutAxisWidth > 0 ? charsPerLine(this.layoutAxisWidth) : this.getEffectiveMaxTickLength(formatted));
2510
+ if (perLine <= 0 || formatted.length <= perLine) {
2511
+ return [formatted];
2512
+ }
2513
+ const lines = wrapCategoryLabel(formatted, perLine, maxLines, this.trimTicks);
2514
+ return lines.length > 1 ? lines : [this.tickTrim(formatted)];
2515
+ }
2516
+ if (formatted.length > this.maxTickLength && this.scale.bandwidth) {
2271
2517
  const maxLines = Math.floor(this.scale.bandwidth() / 15);
2272
2518
  if (maxLines <= 1) {
2273
- return [this.tickTrim(label)];
2519
+ return [this.tickTrim(formatted)];
2274
2520
  }
2275
- return getTickLines(label, preferredWidth, Math.min(maxLines, 5));
2521
+ return getTickLines(formatted, this.maxTickLength, Math.min(maxLines, DEFAULT_CATEGORY_WRAP_MAX_LINES));
2276
2522
  }
2277
- return [this.tickFormat(label)];
2523
+ return [formatted];
2278
2524
  }
2279
2525
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: YAxisTicksComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
2280
2526
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: YAxisTicksComponent, isStandalone: false, selector: "g[ngx-charts-y-axis-ticks]", inputs: { scale: "scale", orient: "orient", tickArguments: "tickArguments", tickValues: "tickValues", tickStroke: "tickStroke", trimTicks: "trimTicks", maxTickLength: "maxTickLength", tickFormatting: "tickFormatting", showGridLines: "showGridLines", gridLineWidth: "gridLineWidth", height: "height", referenceLines: "referenceLines", showRefLabels: "showRefLabels", showRefLines: "showRefLines", wrapTicks: "wrapTicks" }, outputs: { dimensionsChanged: "dimensionsChanged" }, viewQueries: [{ propertyName: "ticksElement", first: true, predicate: ["ticksel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
@@ -3894,6 +4140,12 @@ class TooltipArea {
3894
4140
  this.showPercentage = false;
3895
4141
  this.tooltipDisabled = false;
3896
4142
  this.hover = new EventEmitter();
4143
+ this.isSSR = false;
4144
+ }
4145
+ ngOnInit() {
4146
+ if (isPlatformServer(this.platformId)) {
4147
+ this.isSSR = true;
4148
+ }
3897
4149
  }
3898
4150
  getValues(xVal) {
3899
4151
  const results = [];
@@ -4026,7 +4278,7 @@ class TooltipArea {
4026
4278
  return result;
4027
4279
  }
4028
4280
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TooltipArea, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
4029
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: TooltipArea, isStandalone: false, selector: "g[ngx-charts-tooltip-area]", inputs: { dims: "dims", xSet: "xSet", xScale: "xScale", yScale: "yScale", results: "results", colors: "colors", showPercentage: "showPercentage", tooltipDisabled: "tooltipDisabled", tooltipTemplate: "tooltipTemplate" }, outputs: { hover: "hover" }, viewQueries: [{ propertyName: "tooltipAnchor", first: true, predicate: ["tooltipAnchor"], descendants: true }], ngImport: i0, template: `
4281
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: TooltipArea, isStandalone: false, selector: "g[ngx-charts-tooltip-area]", inputs: { dims: "dims", xSet: "xSet", xScale: "xScale", yScale: "yScale", results: "results", colors: "colors", showPercentage: "showPercentage", tooltipDisabled: "tooltipDisabled", tooltipTemplate: "tooltipTemplate" }, outputs: { hover: "hover" }, viewQueries: [{ propertyName: "tooltipAnchor", first: true, predicate: ["tooltipAnchor"], descendants: true }], ngImport: i0, template: `
4030
4282
  <svg:g>
4031
4283
  <svg:rect
4032
4284
  class="tooltip-area"
@@ -4046,6 +4298,7 @@ class TooltipArea {
4046
4298
  </xhtml:div>
4047
4299
  </xhtml:div>
4048
4300
  </ng-template>
4301
+ @if (!isSSR) {
4049
4302
  <svg:rect
4050
4303
  #tooltipAnchor
4051
4304
  [@animationState]="anchorOpacity !== 0 ? 'active' : 'inactive'"
@@ -4065,6 +4318,26 @@ class TooltipArea {
4065
4318
  [tooltipContext]="anchorValues"
4066
4319
  [tooltipImmediateExit]="true"
4067
4320
  />
4321
+ } @else {
4322
+ <svg:rect
4323
+ #tooltipAnchor
4324
+ class="tooltip-anchor"
4325
+ [attr.x]="anchorPos"
4326
+ y="0"
4327
+ [attr.width]="1"
4328
+ [attr.height]="dims.height"
4329
+ [style.opacity]="anchorOpacity"
4330
+ [style.pointer-events]="'none'"
4331
+ ngx-tooltip
4332
+ [tooltipDisabled]="tooltipDisabled"
4333
+ [tooltipPlacement]="placementTypes.Right"
4334
+ [tooltipType]="styleTypes.tooltip"
4335
+ [tooltipSpacing]="15"
4336
+ [tooltipTemplate]="tooltipTemplate ? tooltipTemplate : defaultTooltipTemplate"
4337
+ [tooltipContext]="anchorValues"
4338
+ [tooltipImmediateExit]="true"
4339
+ />
4340
+ }
4068
4341
  </svg:g>
4069
4342
  `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: TooltipDirective, selector: "[ngx-tooltip]", inputs: ["tooltipCssClass", "tooltipTitle", "tooltipAppendToBody", "tooltipSpacing", "tooltipDisabled", "tooltipShowCaret", "tooltipPlacement", "tooltipAlignment", "tooltipType", "tooltipCloseOnClickOutside", "tooltipCloseOnMouseLeave", "tooltipHideTimeout", "tooltipShowTimeout", "tooltipTemplate", "tooltipShowEvent", "tooltipContext", "tooltipImmediateExit"], outputs: ["show", "hide"] }], animations: [
4070
4343
  trigger('animationState', [
@@ -4107,6 +4380,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
4107
4380
  </xhtml:div>
4108
4381
  </xhtml:div>
4109
4382
  </ng-template>
4383
+ @if (!isSSR) {
4110
4384
  <svg:rect
4111
4385
  #tooltipAnchor
4112
4386
  [@animationState]="anchorOpacity !== 0 ? 'active' : 'inactive'"
@@ -4126,6 +4400,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
4126
4400
  [tooltipContext]="anchorValues"
4127
4401
  [tooltipImmediateExit]="true"
4128
4402
  />
4403
+ } @else {
4404
+ <svg:rect
4405
+ #tooltipAnchor
4406
+ class="tooltip-anchor"
4407
+ [attr.x]="anchorPos"
4408
+ y="0"
4409
+ [attr.width]="1"
4410
+ [attr.height]="dims.height"
4411
+ [style.opacity]="anchorOpacity"
4412
+ [style.pointer-events]="'none'"
4413
+ ngx-tooltip
4414
+ [tooltipDisabled]="tooltipDisabled"
4415
+ [tooltipPlacement]="placementTypes.Right"
4416
+ [tooltipType]="styleTypes.tooltip"
4417
+ [tooltipSpacing]="15"
4418
+ [tooltipTemplate]="tooltipTemplate ? tooltipTemplate : defaultTooltipTemplate"
4419
+ [tooltipContext]="anchorValues"
4420
+ [tooltipImmediateExit]="true"
4421
+ />
4422
+ }
4129
4423
  </svg:g>
4130
4424
  `,
4131
4425
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -7557,7 +7851,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
7557
7851
  }] } });
7558
7852
 
7559
7853
  class SeriesHorizontal {
7560
- constructor() {
7854
+ constructor(platformId) {
7855
+ this.platformId = platformId;
7561
7856
  this.type = BarChartType.Standard;
7562
7857
  this.tooltipDisabled = false;
7563
7858
  this.animations = true;
@@ -7569,6 +7864,12 @@ class SeriesHorizontal {
7569
7864
  this.dataLabelWidthChanged = new EventEmitter();
7570
7865
  this.barsForDataLabels = [];
7571
7866
  this.barOrientation = BarOrientation;
7867
+ this.isSSR = false;
7868
+ }
7869
+ ngOnInit() {
7870
+ if (isPlatformServer(this.platformId)) {
7871
+ this.isSSR = true;
7872
+ }
7572
7873
  }
7573
7874
  ngOnChanges() {
7574
7875
  this.update();
@@ -7729,38 +8030,73 @@ class SeriesHorizontal {
7729
8030
  click(data) {
7730
8031
  this.select.emit(data);
7731
8032
  }
7732
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SeriesHorizontal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7733
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: SeriesHorizontal, isStandalone: false, selector: "g[ngx-charts-series-horizontal]", inputs: { dims: "dims", type: "type", series: "series", xScale: "xScale", yScale: "yScale", colors: "colors", tooltipDisabled: "tooltipDisabled", gradient: "gradient", activeEntries: "activeEntries", seriesName: "seriesName", tooltipTemplate: "tooltipTemplate", roundEdges: "roundEdges", animations: "animations", showDataLabel: "showDataLabel", dataLabelFormatting: "dataLabelFormatting", noBarWhenZero: "noBarWhenZero" }, outputs: { select: "select", activate: "activate", deactivate: "deactivate", dataLabelWidthChanged: "dataLabelWidthChanged" }, usesOnChanges: true, ngImport: i0, template: `
7734
- <svg:g
7735
- ngx-charts-bar
7736
- *ngFor="let bar of bars; trackBy: trackBy"
7737
- [@animationState]="'active'"
7738
- [width]="bar.width"
7739
- [height]="bar.height"
7740
- [x]="bar.x"
7741
- [y]="bar.y"
7742
- [fill]="bar.color"
7743
- [stops]="bar.gradientStops"
7744
- [data]="bar.data"
7745
- [orientation]="barOrientation.Horizontal"
7746
- [roundEdges]="bar.roundEdges"
7747
- (select)="click($event)"
7748
- [gradient]="gradient"
7749
- [isActive]="isActive(bar.data)"
7750
- [ariaLabel]="bar.ariaLabel"
7751
- [animations]="animations"
7752
- (activate)="activate.emit($event)"
7753
- (deactivate)="deactivate.emit($event)"
7754
- ngx-tooltip
7755
- [tooltipDisabled]="tooltipDisabled"
7756
- [tooltipPlacement]="tooltipPlacement"
7757
- [tooltipType]="tooltipType"
7758
- [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"
7759
- [tooltipTemplate]="tooltipTemplate"
7760
- [tooltipContext]="bar.data"
7761
- [noBarWhenZero]="noBarWhenZero"
7762
- ></svg:g>
7763
- <svg:g *ngIf="showDataLabel">
8033
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SeriesHorizontal, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
8034
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SeriesHorizontal, isStandalone: false, selector: "g[ngx-charts-series-horizontal]", inputs: { dims: "dims", type: "type", series: "series", xScale: "xScale", yScale: "yScale", colors: "colors", tooltipDisabled: "tooltipDisabled", gradient: "gradient", activeEntries: "activeEntries", seriesName: "seriesName", tooltipTemplate: "tooltipTemplate", roundEdges: "roundEdges", animations: "animations", showDataLabel: "showDataLabel", dataLabelFormatting: "dataLabelFormatting", noBarWhenZero: "noBarWhenZero" }, outputs: { select: "select", activate: "activate", deactivate: "deactivate", dataLabelWidthChanged: "dataLabelWidthChanged" }, usesOnChanges: true, ngImport: i0, template: `
8035
+ @if (!isSSR) {
8036
+ <svg:g>
8037
+ <svg:g
8038
+ ngx-charts-bar
8039
+ *ngFor="let bar of bars; trackBy: trackBy"
8040
+ [@animationState]="'active'"
8041
+ [width]="bar.width"
8042
+ [height]="bar.height"
8043
+ [x]="bar.x"
8044
+ [y]="bar.y"
8045
+ [fill]="bar.color"
8046
+ [stops]="bar.gradientStops"
8047
+ [data]="bar.data"
8048
+ [orientation]="barOrientation.Horizontal"
8049
+ [roundEdges]="bar.roundEdges"
8050
+ (select)="click($event)"
8051
+ [gradient]="gradient"
8052
+ [isActive]="isActive(bar.data)"
8053
+ [ariaLabel]="bar.ariaLabel"
8054
+ [animations]="animations"
8055
+ (activate)="activate.emit($event)"
8056
+ (deactivate)="deactivate.emit($event)"
8057
+ ngx-tooltip
8058
+ [tooltipDisabled]="tooltipDisabled"
8059
+ [tooltipPlacement]="tooltipPlacement"
8060
+ [tooltipType]="tooltipType"
8061
+ [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"
8062
+ [tooltipTemplate]="tooltipTemplate"
8063
+ [tooltipContext]="bar.data"
8064
+ [noBarWhenZero]="noBarWhenZero"
8065
+ ></svg:g>
8066
+ </svg:g>
8067
+ } @else {
8068
+ <svg:g>
8069
+ <svg:g
8070
+ ngx-charts-bar
8071
+ *ngFor="let bar of bars; trackBy: trackBy"
8072
+ [width]="bar.width"
8073
+ [height]="bar.height"
8074
+ [x]="bar.x"
8075
+ [y]="bar.y"
8076
+ [fill]="bar.color"
8077
+ [stops]="bar.gradientStops"
8078
+ [data]="bar.data"
8079
+ [orientation]="barOrientation.Horizontal"
8080
+ [roundEdges]="bar.roundEdges"
8081
+ (select)="click($event)"
8082
+ [gradient]="gradient"
8083
+ [isActive]="isActive(bar.data)"
8084
+ [ariaLabel]="bar.ariaLabel"
8085
+ [animations]="animations"
8086
+ (activate)="activate.emit($event)"
8087
+ (deactivate)="deactivate.emit($event)"
8088
+ ngx-tooltip
8089
+ [tooltipDisabled]="tooltipDisabled"
8090
+ [tooltipPlacement]="tooltipPlacement"
8091
+ [tooltipType]="tooltipType"
8092
+ [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"
8093
+ [tooltipTemplate]="tooltipTemplate"
8094
+ [tooltipContext]="bar.data"
8095
+ [noBarWhenZero]="noBarWhenZero"
8096
+ ></svg:g>
8097
+ </svg:g>
8098
+ } @if (showDataLabel) {
8099
+ <svg:g>
7764
8100
  <svg:g
7765
8101
  ngx-charts-bar-label
7766
8102
  *ngFor="let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy"
@@ -7774,7 +8110,8 @@ class SeriesHorizontal {
7774
8110
  (dimensionsChanged)="dataLabelWidthChanged.emit({ size: $event, index: i })"
7775
8111
  />
7776
8112
  </svg:g>
7777
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TooltipDirective, selector: "[ngx-tooltip]", inputs: ["tooltipCssClass", "tooltipTitle", "tooltipAppendToBody", "tooltipSpacing", "tooltipDisabled", "tooltipShowCaret", "tooltipPlacement", "tooltipAlignment", "tooltipType", "tooltipCloseOnClickOutside", "tooltipCloseOnMouseLeave", "tooltipHideTimeout", "tooltipShowTimeout", "tooltipTemplate", "tooltipShowEvent", "tooltipContext", "tooltipImmediateExit"], outputs: ["show", "hide"] }, { kind: "component", type: BarComponent, selector: "g[ngx-charts-bar]", inputs: ["fill", "data", "width", "height", "x", "y", "orientation", "roundEdges", "gradient", "offset", "isActive", "stops", "animations", "ariaLabel", "noBarWhenZero"], outputs: ["select", "activate", "deactivate"] }, { kind: "component", type: BarLabelComponent, selector: "g[ngx-charts-bar-label]", inputs: ["value", "valueFormatting", "barX", "barY", "barWidth", "barHeight", "orientation"], outputs: ["dimensionsChanged"] }], animations: [
8113
+ }
8114
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: TooltipDirective, selector: "[ngx-tooltip]", inputs: ["tooltipCssClass", "tooltipTitle", "tooltipAppendToBody", "tooltipSpacing", "tooltipDisabled", "tooltipShowCaret", "tooltipPlacement", "tooltipAlignment", "tooltipType", "tooltipCloseOnClickOutside", "tooltipCloseOnMouseLeave", "tooltipHideTimeout", "tooltipShowTimeout", "tooltipTemplate", "tooltipShowEvent", "tooltipContext", "tooltipImmediateExit"], outputs: ["show", "hide"] }, { kind: "component", type: BarComponent, selector: "g[ngx-charts-bar]", inputs: ["fill", "data", "width", "height", "x", "y", "orientation", "roundEdges", "gradient", "offset", "isActive", "stops", "animations", "ariaLabel", "noBarWhenZero"], outputs: ["select", "activate", "deactivate"] }, { kind: "component", type: BarLabelComponent, selector: "g[ngx-charts-bar-label]", inputs: ["value", "valueFormatting", "barX", "barY", "barWidth", "barHeight", "orientation"], outputs: ["dimensionsChanged"] }], animations: [
7778
8115
  trigger('animationState', [
7779
8116
  transition(':leave', [
7780
8117
  style({
@@ -7790,36 +8127,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
7790
8127
  args: [{
7791
8128
  selector: 'g[ngx-charts-series-horizontal]',
7792
8129
  template: `
7793
- <svg:g
7794
- ngx-charts-bar
7795
- *ngFor="let bar of bars; trackBy: trackBy"
7796
- [@animationState]="'active'"
7797
- [width]="bar.width"
7798
- [height]="bar.height"
7799
- [x]="bar.x"
7800
- [y]="bar.y"
7801
- [fill]="bar.color"
7802
- [stops]="bar.gradientStops"
7803
- [data]="bar.data"
7804
- [orientation]="barOrientation.Horizontal"
7805
- [roundEdges]="bar.roundEdges"
7806
- (select)="click($event)"
7807
- [gradient]="gradient"
7808
- [isActive]="isActive(bar.data)"
7809
- [ariaLabel]="bar.ariaLabel"
7810
- [animations]="animations"
7811
- (activate)="activate.emit($event)"
7812
- (deactivate)="deactivate.emit($event)"
7813
- ngx-tooltip
7814
- [tooltipDisabled]="tooltipDisabled"
7815
- [tooltipPlacement]="tooltipPlacement"
7816
- [tooltipType]="tooltipType"
7817
- [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"
7818
- [tooltipTemplate]="tooltipTemplate"
7819
- [tooltipContext]="bar.data"
7820
- [noBarWhenZero]="noBarWhenZero"
7821
- ></svg:g>
7822
- <svg:g *ngIf="showDataLabel">
8130
+ @if (!isSSR) {
8131
+ <svg:g>
8132
+ <svg:g
8133
+ ngx-charts-bar
8134
+ *ngFor="let bar of bars; trackBy: trackBy"
8135
+ [@animationState]="'active'"
8136
+ [width]="bar.width"
8137
+ [height]="bar.height"
8138
+ [x]="bar.x"
8139
+ [y]="bar.y"
8140
+ [fill]="bar.color"
8141
+ [stops]="bar.gradientStops"
8142
+ [data]="bar.data"
8143
+ [orientation]="barOrientation.Horizontal"
8144
+ [roundEdges]="bar.roundEdges"
8145
+ (select)="click($event)"
8146
+ [gradient]="gradient"
8147
+ [isActive]="isActive(bar.data)"
8148
+ [ariaLabel]="bar.ariaLabel"
8149
+ [animations]="animations"
8150
+ (activate)="activate.emit($event)"
8151
+ (deactivate)="deactivate.emit($event)"
8152
+ ngx-tooltip
8153
+ [tooltipDisabled]="tooltipDisabled"
8154
+ [tooltipPlacement]="tooltipPlacement"
8155
+ [tooltipType]="tooltipType"
8156
+ [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"
8157
+ [tooltipTemplate]="tooltipTemplate"
8158
+ [tooltipContext]="bar.data"
8159
+ [noBarWhenZero]="noBarWhenZero"
8160
+ ></svg:g>
8161
+ </svg:g>
8162
+ } @else {
8163
+ <svg:g>
8164
+ <svg:g
8165
+ ngx-charts-bar
8166
+ *ngFor="let bar of bars; trackBy: trackBy"
8167
+ [width]="bar.width"
8168
+ [height]="bar.height"
8169
+ [x]="bar.x"
8170
+ [y]="bar.y"
8171
+ [fill]="bar.color"
8172
+ [stops]="bar.gradientStops"
8173
+ [data]="bar.data"
8174
+ [orientation]="barOrientation.Horizontal"
8175
+ [roundEdges]="bar.roundEdges"
8176
+ (select)="click($event)"
8177
+ [gradient]="gradient"
8178
+ [isActive]="isActive(bar.data)"
8179
+ [ariaLabel]="bar.ariaLabel"
8180
+ [animations]="animations"
8181
+ (activate)="activate.emit($event)"
8182
+ (deactivate)="deactivate.emit($event)"
8183
+ ngx-tooltip
8184
+ [tooltipDisabled]="tooltipDisabled"
8185
+ [tooltipPlacement]="tooltipPlacement"
8186
+ [tooltipType]="tooltipType"
8187
+ [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"
8188
+ [tooltipTemplate]="tooltipTemplate"
8189
+ [tooltipContext]="bar.data"
8190
+ [noBarWhenZero]="noBarWhenZero"
8191
+ ></svg:g>
8192
+ </svg:g>
8193
+ } @if (showDataLabel) {
8194
+ <svg:g>
7823
8195
  <svg:g
7824
8196
  ngx-charts-bar-label
7825
8197
  *ngFor="let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy"
@@ -7833,6 +8205,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
7833
8205
  (dimensionsChanged)="dataLabelWidthChanged.emit({ size: $event, index: i })"
7834
8206
  />
7835
8207
  </svg:g>
8208
+ }
7836
8209
  `,
7837
8210
  changeDetection: ChangeDetectionStrategy.OnPush,
7838
8211
  animations: [
@@ -7847,7 +8220,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
7847
8220
  ],
7848
8221
  standalone: false
7849
8222
  }]
7850
- }], propDecorators: { dims: [{
8223
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
8224
+ type: Inject,
8225
+ args: [PLATFORM_ID]
8226
+ }] }], propDecorators: { dims: [{
7851
8227
  type: Input
7852
8228
  }], type: [{
7853
8229
  type: Input
@@ -7961,7 +8337,7 @@ class BarHorizontalComponent extends BaseChartComponent {
7961
8337
  return;
7962
8338
  }
7963
8339
  const labels = this.results.map(d => formatLabel(d.name ?? d.label));
7964
- this.yAxisWidth = YAxisTicksComponent.approximateTickLabelsWidth(labels, this.trimYAxisTicks !== false, this.maxYAxisTickLength ?? 16);
8340
+ this.yAxisWidth = YAxisTicksComponent.approximateTickLabelsWidth(labels, this.trimYAxisTicks !== false, this.maxYAxisTickLength ?? 16, this.wrapTicks !== false);
7965
8341
  }
7966
8342
  getXScale() {
7967
8343
  this.xDomain = this.getXDomain();
@@ -8015,7 +8391,7 @@ class BarHorizontalComponent extends BaseChartComponent {
8015
8391
  return opts;
8016
8392
  }
8017
8393
  updateYAxisWidth({ width }) {
8018
- if (width === this.yAxisWidth) {
8394
+ if (Math.abs(width - this.yAxisWidth) <= 1) {
8019
8395
  return;
8020
8396
  }
8021
8397
  this.yAxisWidth = width;
@@ -8343,6 +8719,8 @@ class BarHorizontal2DComponent extends BaseChartComponent {
8343
8719
  this.dataLabelMaxWidth = { negative: 0, positive: 0 };
8344
8720
  }
8345
8721
  this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];
8722
+ // Seed axis width before first measure so SSR/print HTML reserves label space.
8723
+ this.seedYAxisWidthFromResults();
8346
8724
  this.dims = calculateViewDimensions({
8347
8725
  width: this.width,
8348
8726
  height: this.height,
@@ -8368,6 +8746,14 @@ class BarHorizontal2DComponent extends BaseChartComponent {
8368
8746
  this.legendOptions = this.getLegendOptions();
8369
8747
  this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;
8370
8748
  }
8749
+ /** Approx Y-axis width from category labels when not yet measured (SSR-safe). */
8750
+ seedYAxisWidthFromResults() {
8751
+ if (!this.yAxis || this.yAxisWidth > 0 || !this.results?.length) {
8752
+ return;
8753
+ }
8754
+ const labels = this.results.map(d => formatLabel(d.name ?? d.label));
8755
+ this.yAxisWidth = YAxisTicksComponent.approximateTickLabelsWidth(labels, this.trimYAxisTicks !== false, this.maxYAxisTickLength ?? 16, this.wrapTicks !== false);
8756
+ }
8371
8757
  getGroupScale() {
8372
8758
  const spacing = this.groupDomain.length / (this.dims.height / this.groupPadding + 1);
8373
8759
  return scaleBand()
@@ -8457,10 +8843,16 @@ class BarHorizontal2DComponent extends BaseChartComponent {
8457
8843
  return opts;
8458
8844
  }
8459
8845
  updateYAxisWidth({ width }) {
8846
+ if (Math.abs(width - this.yAxisWidth) <= 1) {
8847
+ return;
8848
+ }
8460
8849
  this.yAxisWidth = width;
8461
8850
  this.update();
8462
8851
  }
8463
8852
  updateXAxisHeight({ height }) {
8853
+ if (height === this.xAxisHeight) {
8854
+ return;
8855
+ }
8464
8856
  this.xAxisHeight = height;
8465
8857
  this.update();
8466
8858
  }
@@ -8871,6 +9263,8 @@ class BarHorizontalNormalizedComponent extends BaseChartComponent {
8871
9263
  }
8872
9264
  update() {
8873
9265
  super.update();
9266
+ // Seed axis width before first measure so SSR/print HTML reserves label space.
9267
+ this.seedYAxisWidthFromResults();
8874
9268
  this.dims = calculateViewDimensions({
8875
9269
  width: this.width,
8876
9270
  height: this.height,
@@ -8894,6 +9288,14 @@ class BarHorizontalNormalizedComponent extends BaseChartComponent {
8894
9288
  this.legendOptions = this.getLegendOptions();
8895
9289
  this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;
8896
9290
  }
9291
+ /** Approx Y-axis width from category labels when not yet measured (SSR-safe). */
9292
+ seedYAxisWidthFromResults() {
9293
+ if (!this.yAxis || this.yAxisWidth > 0 || !this.results?.length) {
9294
+ return;
9295
+ }
9296
+ const labels = this.results.map(d => formatLabel(d.name ?? d.label));
9297
+ this.yAxisWidth = YAxisTicksComponent.approximateTickLabelsWidth(labels, this.trimYAxisTicks !== false, this.maxYAxisTickLength ?? 16, this.wrapTicks !== false);
9298
+ }
8897
9299
  getGroupDomain() {
8898
9300
  const domain = [];
8899
9301
  for (const group of this.results) {
@@ -8961,10 +9363,16 @@ class BarHorizontalNormalizedComponent extends BaseChartComponent {
8961
9363
  return opts;
8962
9364
  }
8963
9365
  updateYAxisWidth({ width }) {
9366
+ if (Math.abs(width - this.yAxisWidth) <= 1) {
9367
+ return;
9368
+ }
8964
9369
  this.yAxisWidth = width;
8965
9370
  this.update();
8966
9371
  }
8967
9372
  updateXAxisHeight({ height }) {
9373
+ if (height === this.xAxisHeight) {
9374
+ return;
9375
+ }
8968
9376
  this.xAxisHeight = height;
8969
9377
  this.update();
8970
9378
  }
@@ -9321,6 +9729,8 @@ class BarHorizontalStackedComponent extends BaseChartComponent {
9321
9729
  this.dataLabelMaxWidth = { negative: 0, positive: 0 };
9322
9730
  }
9323
9731
  this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];
9732
+ // Seed axis width before first measure so SSR/print HTML reserves label space.
9733
+ this.seedYAxisWidthFromResults();
9324
9734
  this.dims = calculateViewDimensions({
9325
9735
  width: this.width,
9326
9736
  height: this.height,
@@ -9345,6 +9755,14 @@ class BarHorizontalStackedComponent extends BaseChartComponent {
9345
9755
  this.legendOptions = this.getLegendOptions();
9346
9756
  this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;
9347
9757
  }
9758
+ /** Approx Y-axis width from category labels when not yet measured (SSR-safe). */
9759
+ seedYAxisWidthFromResults() {
9760
+ if (!this.yAxis || this.yAxisWidth > 0 || !this.results?.length) {
9761
+ return;
9762
+ }
9763
+ const labels = this.results.map(d => formatLabel(d.name ?? d.label));
9764
+ this.yAxisWidth = YAxisTicksComponent.approximateTickLabelsWidth(labels, this.trimYAxisTicks !== false, this.maxYAxisTickLength ?? 16, this.wrapTicks !== false);
9765
+ }
9348
9766
  getGroupDomain() {
9349
9767
  const domain = [];
9350
9768
  for (const group of this.results) {
@@ -9438,10 +9856,16 @@ class BarHorizontalStackedComponent extends BaseChartComponent {
9438
9856
  return opts;
9439
9857
  }
9440
9858
  updateYAxisWidth({ width }) {
9859
+ if (Math.abs(width - this.yAxisWidth) <= 1) {
9860
+ return;
9861
+ }
9441
9862
  this.yAxisWidth = width;
9442
9863
  this.update();
9443
9864
  }
9444
9865
  updateXAxisHeight({ height }) {
9866
+ if (height === this.xAxisHeight) {
9867
+ return;
9868
+ }
9445
9869
  this.xAxisHeight = height;
9446
9870
  this.update();
9447
9871
  }
@@ -12551,13 +12975,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
12551
12975
  }] } });
12552
12976
 
12553
12977
  class BoxSeriesComponent {
12554
- constructor() {
12978
+ constructor(platformId) {
12979
+ this.platformId = platformId;
12555
12980
  this.animations = true;
12556
12981
  this.tooltipDisabled = false;
12557
12982
  this.gradient = false;
12558
12983
  this.select = new EventEmitter();
12559
12984
  this.activate = new EventEmitter();
12560
12985
  this.deactivate = new EventEmitter();
12986
+ this.isSSR = false;
12987
+ }
12988
+ ngOnInit() {
12989
+ if (isPlatformServer(this.platformId)) {
12990
+ this.isSSR = true;
12991
+ }
12561
12992
  }
12562
12993
  ngOnChanges(changes) {
12563
12994
  this.update();
@@ -12658,37 +13089,71 @@ class BoxSeriesComponent {
12658
13089
  }
12659
13090
  }
12660
13091
  }
12661
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BoxSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12662
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: BoxSeriesComponent, isStandalone: false, selector: "g[ngx-charts-box-series]", inputs: { dims: "dims", series: "series", xScale: "xScale", yScale: "yScale", colors: "colors", animations: "animations", strokeColor: "strokeColor", strokeWidth: "strokeWidth", tooltipDisabled: "tooltipDisabled", tooltipTemplate: "tooltipTemplate", tooltipPlacement: "tooltipPlacement", tooltipType: "tooltipType", roundEdges: "roundEdges", gradient: "gradient" }, outputs: { select: "select", activate: "activate", deactivate: "deactivate" }, usesOnChanges: true, ngImport: i0, template: `
12663
- <svg:g
12664
- ngx-charts-box
12665
- [@animationState]="'active'"
12666
- [@.disabled]="!animations"
12667
- [width]="box.width"
12668
- [height]="box.height"
12669
- [x]="box.x"
12670
- [y]="box.y"
12671
- [roundEdges]="box.roundEdges"
12672
- [fill]="box.color"
12673
- [gradientStops]="box.gradientStops"
12674
- [strokeColor]="strokeColor"
12675
- [strokeWidth]="strokeWidth"
12676
- [data]="box.data"
12677
- [lineCoordinates]="box.lineCoordinates"
12678
- [gradient]="gradient"
12679
- [ariaLabel]="box.ariaLabel"
12680
- (select)="onClick($event)"
12681
- (activate)="activate.emit($event)"
12682
- (deactivate)="deactivate.emit($event)"
12683
- ngx-tooltip
12684
- [tooltipDisabled]="tooltipDisabled"
12685
- [tooltipPlacement]="tooltipPlacement"
12686
- [tooltipType]="tooltipType"
12687
- [tooltipTitle]="tooltipTitle"
12688
- [tooltipTemplate]="tooltipTemplate"
12689
- [tooltipContext]="box.data"
12690
- [animations]="animations"
12691
- ></svg:g>
13092
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BoxSeriesComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
13093
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BoxSeriesComponent, isStandalone: false, selector: "g[ngx-charts-box-series]", inputs: { dims: "dims", series: "series", xScale: "xScale", yScale: "yScale", colors: "colors", animations: "animations", strokeColor: "strokeColor", strokeWidth: "strokeWidth", tooltipDisabled: "tooltipDisabled", tooltipTemplate: "tooltipTemplate", tooltipPlacement: "tooltipPlacement", tooltipType: "tooltipType", roundEdges: "roundEdges", gradient: "gradient" }, outputs: { select: "select", activate: "activate", deactivate: "deactivate" }, usesOnChanges: true, ngImport: i0, template: `
13094
+ @if (!isSSR) {
13095
+ <svg:g>
13096
+ <svg:g
13097
+ ngx-charts-box
13098
+ [@animationState]="'active'"
13099
+ [@.disabled]="!animations"
13100
+ [width]="box.width"
13101
+ [height]="box.height"
13102
+ [x]="box.x"
13103
+ [y]="box.y"
13104
+ [roundEdges]="box.roundEdges"
13105
+ [fill]="box.color"
13106
+ [gradientStops]="box.gradientStops"
13107
+ [strokeColor]="strokeColor"
13108
+ [strokeWidth]="strokeWidth"
13109
+ [data]="box.data"
13110
+ [lineCoordinates]="box.lineCoordinates"
13111
+ [gradient]="gradient"
13112
+ [ariaLabel]="box.ariaLabel"
13113
+ (select)="onClick($event)"
13114
+ (activate)="activate.emit($event)"
13115
+ (deactivate)="deactivate.emit($event)"
13116
+ ngx-tooltip
13117
+ [tooltipDisabled]="tooltipDisabled"
13118
+ [tooltipPlacement]="tooltipPlacement"
13119
+ [tooltipType]="tooltipType"
13120
+ [tooltipTitle]="tooltipTitle"
13121
+ [tooltipTemplate]="tooltipTemplate"
13122
+ [tooltipContext]="box.data"
13123
+ [animations]="animations"
13124
+ ></svg:g>
13125
+ </svg:g>
13126
+ } @else {
13127
+ <svg:g>
13128
+ <svg:g
13129
+ ngx-charts-box
13130
+ [width]="box.width"
13131
+ [height]="box.height"
13132
+ [x]="box.x"
13133
+ [y]="box.y"
13134
+ [roundEdges]="box.roundEdges"
13135
+ [fill]="box.color"
13136
+ [gradientStops]="box.gradientStops"
13137
+ [strokeColor]="strokeColor"
13138
+ [strokeWidth]="strokeWidth"
13139
+ [data]="box.data"
13140
+ [lineCoordinates]="box.lineCoordinates"
13141
+ [gradient]="gradient"
13142
+ [ariaLabel]="box.ariaLabel"
13143
+ (select)="onClick($event)"
13144
+ (activate)="activate.emit($event)"
13145
+ (deactivate)="deactivate.emit($event)"
13146
+ ngx-tooltip
13147
+ [tooltipDisabled]="tooltipDisabled"
13148
+ [tooltipPlacement]="tooltipPlacement"
13149
+ [tooltipType]="tooltipType"
13150
+ [tooltipTitle]="tooltipTitle"
13151
+ [tooltipTemplate]="tooltipTemplate"
13152
+ [tooltipContext]="box.data"
13153
+ [animations]="animations"
13154
+ ></svg:g>
13155
+ </svg:g>
13156
+ }
12692
13157
  `, isInline: true, dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[ngx-tooltip]", inputs: ["tooltipCssClass", "tooltipTitle", "tooltipAppendToBody", "tooltipSpacing", "tooltipDisabled", "tooltipShowCaret", "tooltipPlacement", "tooltipAlignment", "tooltipType", "tooltipCloseOnClickOutside", "tooltipCloseOnMouseLeave", "tooltipHideTimeout", "tooltipShowTimeout", "tooltipTemplate", "tooltipShowEvent", "tooltipContext", "tooltipImmediateExit"], outputs: ["show", "hide"] }, { kind: "component", type: BoxComponent, selector: "g[ngx-charts-box]", inputs: ["strokeColor", "strokeWidth", "fill", "data", "width", "height", "x", "y", "lineCoordinates", "roundEdges", "gradient", "gradientStops", "offset", "isActive", "animations", "ariaLabel", "noBarWhenZero"], outputs: ["select", "activate", "deactivate"] }], animations: [
12693
13158
  trigger('animationState', [
12694
13159
  transition(':leave', [
@@ -12705,35 +13170,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
12705
13170
  args: [{
12706
13171
  selector: 'g[ngx-charts-box-series]',
12707
13172
  template: `
12708
- <svg:g
12709
- ngx-charts-box
12710
- [@animationState]="'active'"
12711
- [@.disabled]="!animations"
12712
- [width]="box.width"
12713
- [height]="box.height"
12714
- [x]="box.x"
12715
- [y]="box.y"
12716
- [roundEdges]="box.roundEdges"
12717
- [fill]="box.color"
12718
- [gradientStops]="box.gradientStops"
12719
- [strokeColor]="strokeColor"
12720
- [strokeWidth]="strokeWidth"
12721
- [data]="box.data"
12722
- [lineCoordinates]="box.lineCoordinates"
12723
- [gradient]="gradient"
12724
- [ariaLabel]="box.ariaLabel"
12725
- (select)="onClick($event)"
12726
- (activate)="activate.emit($event)"
12727
- (deactivate)="deactivate.emit($event)"
12728
- ngx-tooltip
12729
- [tooltipDisabled]="tooltipDisabled"
12730
- [tooltipPlacement]="tooltipPlacement"
12731
- [tooltipType]="tooltipType"
12732
- [tooltipTitle]="tooltipTitle"
12733
- [tooltipTemplate]="tooltipTemplate"
12734
- [tooltipContext]="box.data"
12735
- [animations]="animations"
12736
- ></svg:g>
13173
+ @if (!isSSR) {
13174
+ <svg:g>
13175
+ <svg:g
13176
+ ngx-charts-box
13177
+ [@animationState]="'active'"
13178
+ [@.disabled]="!animations"
13179
+ [width]="box.width"
13180
+ [height]="box.height"
13181
+ [x]="box.x"
13182
+ [y]="box.y"
13183
+ [roundEdges]="box.roundEdges"
13184
+ [fill]="box.color"
13185
+ [gradientStops]="box.gradientStops"
13186
+ [strokeColor]="strokeColor"
13187
+ [strokeWidth]="strokeWidth"
13188
+ [data]="box.data"
13189
+ [lineCoordinates]="box.lineCoordinates"
13190
+ [gradient]="gradient"
13191
+ [ariaLabel]="box.ariaLabel"
13192
+ (select)="onClick($event)"
13193
+ (activate)="activate.emit($event)"
13194
+ (deactivate)="deactivate.emit($event)"
13195
+ ngx-tooltip
13196
+ [tooltipDisabled]="tooltipDisabled"
13197
+ [tooltipPlacement]="tooltipPlacement"
13198
+ [tooltipType]="tooltipType"
13199
+ [tooltipTitle]="tooltipTitle"
13200
+ [tooltipTemplate]="tooltipTemplate"
13201
+ [tooltipContext]="box.data"
13202
+ [animations]="animations"
13203
+ ></svg:g>
13204
+ </svg:g>
13205
+ } @else {
13206
+ <svg:g>
13207
+ <svg:g
13208
+ ngx-charts-box
13209
+ [width]="box.width"
13210
+ [height]="box.height"
13211
+ [x]="box.x"
13212
+ [y]="box.y"
13213
+ [roundEdges]="box.roundEdges"
13214
+ [fill]="box.color"
13215
+ [gradientStops]="box.gradientStops"
13216
+ [strokeColor]="strokeColor"
13217
+ [strokeWidth]="strokeWidth"
13218
+ [data]="box.data"
13219
+ [lineCoordinates]="box.lineCoordinates"
13220
+ [gradient]="gradient"
13221
+ [ariaLabel]="box.ariaLabel"
13222
+ (select)="onClick($event)"
13223
+ (activate)="activate.emit($event)"
13224
+ (deactivate)="deactivate.emit($event)"
13225
+ ngx-tooltip
13226
+ [tooltipDisabled]="tooltipDisabled"
13227
+ [tooltipPlacement]="tooltipPlacement"
13228
+ [tooltipType]="tooltipType"
13229
+ [tooltipTitle]="tooltipTitle"
13230
+ [tooltipTemplate]="tooltipTemplate"
13231
+ [tooltipContext]="box.data"
13232
+ [animations]="animations"
13233
+ ></svg:g>
13234
+ </svg:g>
13235
+ }
12737
13236
  `,
12738
13237
  changeDetection: ChangeDetectionStrategy.OnPush,
12739
13238
  animations: [
@@ -12748,7 +13247,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
12748
13247
  ],
12749
13248
  standalone: false
12750
13249
  }]
12751
- }], propDecorators: { dims: [{
13250
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
13251
+ type: Inject,
13252
+ args: [PLATFORM_ID]
13253
+ }] }], propDecorators: { dims: [{
12752
13254
  type: Input
12753
13255
  }], series: [{
12754
13256
  type: Input
@@ -21064,5 +21566,5 @@ function tickFormat(fieldType, groupByType) {
21064
21566
  * Generated bundle index. Do not edit.
21065
21567
  */
21066
21568
 
21067
- export { AdvancedLegendComponent, AdvancedPieChartComponent, AreaChartComponent, AreaChartModule, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaComponent, AreaSeriesComponent, AxesModule, AxisLabelComponent, BarChartModule, BarChartType, BarComponent, BarHorizontal2DComponent, BarHorizontalComponent, BarHorizontalNormalizedComponent, BarHorizontalStackedComponent, BarLabelComponent, BarOrientation, BarVertical2DComponent, BarVerticalComponent, BarVerticalNormalizedComponent, BarVerticalStackedComponent, BaseChartComponent, BoxChartComponent, BoxChartModule, BoxComponent, BoxSeriesComponent, BubbleChartComponent, BubbleChartModule, BubbleSeriesComponent, CardComponent, CardSeriesComponent, ChartCommonModule, ChartComponent, CircleComponent, CircleSeriesComponent, ColorHelper, CountUpDirective, D0Types, GaugeArcComponent, GaugeAxisComponent, GaugeComponent, GaugeModule, GridPanelComponent, GridPanelSeriesComponent, HeatCellSeriesComponent, HeatMapCellComponent, HeatMapComponent, HeatMapModule, LegendComponent, LegendEntryComponent, LegendPosition, LegendType, LineChartComponent, LineChartModule, LineComponent, LineSeriesComponent, LinearGaugeComponent, NgxChartsModule, NumberCardComponent, NumberCardModule, Orientation, PercentGaugeComponent, PieArcComponent, PieChartComponent, PieChartModule, PieGridComponent, PieGridSeriesComponent, PieLabelComponent, PieSeriesComponent, PlacementTypes, PolarChartComponent, PolarChartModule, PolarSeriesComponent, SankeyComponent, SankeyModule, ScaleLegendComponent, ScaleType, SeriesHorizontal, SeriesType, SeriesVerticalComponent, ShowTypes, StyleTypes, SvgLinearGradientComponent, SvgRadialGradientComponent, TextAnchor, Timeline, TooltipArea, TooltipContentComponent, TooltipDirective, TooltipModule, TooltipService, TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent, TreeMapModule, VisibilityObserver, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent, calculateViewDimensions, cloneLineCoordinates, clonePoint, cloneVector2d, colorSets, count, decimalChecker, escapeLabel, formatLabel, getDomain, getScale, getScaleType, getTickLines, getUniqueXDomainValues, getXDomainArray, gridLayout, gridSize, hexToRgb, id, invertColor, reduceTicks, shadeRGBColor, sortByDomain, sortByTime, sortLinear, throttle, throttleable, tickFormat, trimLabel };
21569
+ export { AdvancedLegendComponent, AdvancedPieChartComponent, AreaChartComponent, AreaChartModule, AreaChartNormalizedComponent, AreaChartStackedComponent, AreaComponent, AreaSeriesComponent, AxesModule, AxisLabelComponent, BarChartModule, BarChartType, BarComponent, BarHorizontal2DComponent, BarHorizontalComponent, BarHorizontalNormalizedComponent, BarHorizontalStackedComponent, BarLabelComponent, BarOrientation, BarVertical2DComponent, BarVerticalComponent, BarVerticalNormalizedComponent, BarVerticalStackedComponent, BaseChartComponent, BoxChartComponent, BoxChartModule, BoxComponent, BoxSeriesComponent, BubbleChartComponent, BubbleChartModule, BubbleSeriesComponent, CardComponent, CardSeriesComponent, ChartCommonModule, ChartComponent, CircleComponent, CircleSeriesComponent, ColorHelper, CountUpDirective, D0Types, GaugeArcComponent, GaugeAxisComponent, GaugeComponent, GaugeModule, GridPanelComponent, GridPanelSeriesComponent, HeatCellSeriesComponent, HeatMapCellComponent, HeatMapComponent, HeatMapModule, LegendComponent, LegendEntryComponent, LegendPosition, LegendType, LineChartComponent, LineChartModule, LineComponent, LineSeriesComponent, LinearGaugeComponent, NgxChartsModule, NumberCardComponent, NumberCardModule, Orientation, PercentGaugeComponent, PieArcComponent, PieChartComponent, PieChartModule, PieGridComponent, PieGridSeriesComponent, PieLabelComponent, PieSeriesComponent, PlacementTypes, PolarChartComponent, PolarChartModule, PolarSeriesComponent, SankeyComponent, SankeyModule, ScaleLegendComponent, ScaleType, SeriesHorizontal, SeriesType, SeriesVerticalComponent, ShowTypes, StyleTypes, SvgLinearGradientComponent, SvgRadialGradientComponent, TextAnchor, Timeline, TooltipArea, TooltipContentComponent, TooltipDirective, TooltipModule, TooltipService, TreeMapCellComponent, TreeMapCellSeriesComponent, TreeMapComponent, TreeMapModule, VisibilityObserver, XAxisComponent, XAxisTicksComponent, YAxisComponent, YAxisTicksComponent, calculateViewDimensions, cloneLineCoordinates, clonePoint, cloneVector2d, colorSets, count, decimalChecker, escapeLabel, formatLabel, getDomain, getScale, getScaleType, getTickLines, getUniqueXDomainValues, getXDomainArray, gridLayout, gridSize, hexToRgb, id, invertColor, maxCharsForPixelWidth, reduceTicks, shadeRGBColor, sortByDomain, sortByTime, sortLinear, throttle, throttleable, tickFormat, trimLabel };
21068
21570
  //# sourceMappingURL=swimlane-ngx-charts.mjs.map