@nanahoshi/mona-ui 0.15.0 → 0.15.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.
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +352 -238
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-chart.d.ts +1195 -1195
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, TemplateRef, Directive, InjectionToken, ElementRef, input, isDevMode, Injectable, signal, computed, viewChild, contentChild,
|
|
3
|
+
import { inject, TemplateRef, Directive, InjectionToken, ElementRef, input, isDevMode, Injectable, signal, computed, DestroyRef, viewChild, contentChild, output, effect, untracked, afterNextRender, Component, model } from '@angular/core';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import { interpolate, parse, formatRgb, wcagContrast } from 'culori';
|
|
6
6
|
import { scaleLinear, scaleLog, scaleSymlog, scalePow, scaleSqrt, scaleTime, scaleUtc, scaleBand } from 'd3-scale';
|
|
@@ -69,7 +69,7 @@ class BrowserAnimationClock {
|
|
|
69
69
|
}
|
|
70
70
|
requestFrame(callback) {
|
|
71
71
|
if (typeof requestAnimationFrame !== "undefined") {
|
|
72
|
-
return requestAnimationFrame(callback);
|
|
72
|
+
return requestAnimationFrame(() => callback(this.now()));
|
|
73
73
|
}
|
|
74
74
|
return setTimeout(() => callback(this.now()), 16);
|
|
75
75
|
}
|
|
@@ -146,8 +146,8 @@ function getEasingFunction(easing) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
class CartesianPointSpatialIndex {
|
|
149
|
-
#cells = new Map();
|
|
150
149
|
#cellSize;
|
|
150
|
+
#cells = new Map();
|
|
151
151
|
constructor(cellSize = 32) {
|
|
152
152
|
this.#cellSize = Math.max(8, cellSize);
|
|
153
153
|
}
|
|
@@ -662,13 +662,13 @@ class GaugeHitIndex {
|
|
|
662
662
|
}
|
|
663
663
|
|
|
664
664
|
class TreemapHitIndex {
|
|
665
|
-
#
|
|
666
|
-
#cols;
|
|
667
|
-
#rows;
|
|
668
|
-
#cellWidth;
|
|
665
|
+
#allTargets;
|
|
669
666
|
#cellHeight;
|
|
667
|
+
#cellWidth;
|
|
668
|
+
#cols;
|
|
670
669
|
#grid;
|
|
671
|
-
#
|
|
670
|
+
#plotRect;
|
|
671
|
+
#rows;
|
|
672
672
|
constructor(plotRect, hitTargets) {
|
|
673
673
|
this.#plotRect = plotRect;
|
|
674
674
|
this.#allTargets = hitTargets;
|
|
@@ -9779,11 +9779,11 @@ function composeMarkKey(seriesPrefix, part, occurrenceRank) {
|
|
|
9779
9779
|
return JSON.stringify([seriesPrefix, part.type, part.value, occurrenceRank]);
|
|
9780
9780
|
}
|
|
9781
9781
|
class ChartMarkKeyResolver {
|
|
9782
|
+
#keyField;
|
|
9782
9783
|
#occurrenceTracker = new Map();
|
|
9783
|
-
#warnedDuplicateKeys = new Set();
|
|
9784
9784
|
#seriesId;
|
|
9785
9785
|
#seriesPrefix;
|
|
9786
|
-
#
|
|
9786
|
+
#warnedDuplicateKeys = new Set();
|
|
9787
9787
|
constructor(seriesId, keyField, seriesKey) {
|
|
9788
9788
|
this.#seriesId = seriesId;
|
|
9789
9789
|
const normKey = normalizeSeriesKey(seriesKey);
|
|
@@ -13495,8 +13495,8 @@ const noResult = { firstValidIndex: -1, lastValidIndex: -1, maxIndex: -1, minInd
|
|
|
13495
13495
|
* blocks directly and scan summaries for whole interior blocks.
|
|
13496
13496
|
*/
|
|
13497
13497
|
class CartesianMinMaxBlockIndex {
|
|
13498
|
-
#blocks = [];
|
|
13499
13498
|
#blockSize;
|
|
13499
|
+
#blocks = [];
|
|
13500
13500
|
#y;
|
|
13501
13501
|
constructor(y, blockSize = 256) {
|
|
13502
13502
|
this.#y = y;
|
|
@@ -23612,6 +23612,7 @@ class CartesianAxisDomainResolver {
|
|
|
23612
23612
|
}
|
|
23613
23613
|
|
|
23614
23614
|
class CartesianAxisLabelGeometry {
|
|
23615
|
+
static #cachedGetContext = null;
|
|
23615
23616
|
static #measureCanvas = null;
|
|
23616
23617
|
static #measureCtx = null;
|
|
23617
23618
|
static createTickKey(axis, axisType, value, index) {
|
|
@@ -23634,11 +23635,24 @@ class CartesianAxisLabelGeometry {
|
|
|
23634
23635
|
try {
|
|
23635
23636
|
if (!CartesianAxisLabelGeometry.#measureCanvas) {
|
|
23636
23637
|
CartesianAxisLabelGeometry.#measureCanvas = document.createElement("canvas");
|
|
23638
|
+
}
|
|
23639
|
+
// Cache the resolved 2D context, but invalidate it whenever
|
|
23640
|
+
// HTMLCanvasElement.prototype.getContext itself has changed identity (e.g. a test
|
|
23641
|
+
// installs/restores a vi.spyOn mock) so a swapped implementation is never frozen in
|
|
23642
|
+
// stale. This keeps the common case (thousands of tick-label measurements against a
|
|
23643
|
+
// stable getContext) a cheap reference reuse instead of re-invoking getContext (and,
|
|
23644
|
+
// under test mocks that fabricate a fresh context object per call, re-allocating one)
|
|
23645
|
+
// on every single call.
|
|
23646
|
+
const currentGetContext = CartesianAxisLabelGeometry.#measureCanvas.getContext;
|
|
23647
|
+
if (!CartesianAxisLabelGeometry.#measureCtx ||
|
|
23648
|
+
CartesianAxisLabelGeometry.#cachedGetContext !== currentGetContext) {
|
|
23637
23649
|
CartesianAxisLabelGeometry.#measureCtx = CartesianAxisLabelGeometry.#measureCanvas.getContext("2d");
|
|
23650
|
+
CartesianAxisLabelGeometry.#cachedGetContext = currentGetContext;
|
|
23638
23651
|
}
|
|
23639
|
-
|
|
23640
|
-
|
|
23641
|
-
|
|
23652
|
+
const ctx = CartesianAxisLabelGeometry.#measureCtx;
|
|
23653
|
+
if (ctx) {
|
|
23654
|
+
ctx.font = font;
|
|
23655
|
+
const measuredWidth = ctx.measureText(formattedText).width;
|
|
23642
23656
|
if (typeof measuredWidth === "number" && !isNaN(measuredWidth) && measuredWidth > 0) {
|
|
23643
23657
|
return {
|
|
23644
23658
|
height: 16,
|
|
@@ -27623,12 +27637,12 @@ function computeTightBounds(indices, u, v) {
|
|
|
27623
27637
|
class ChartSeriesMarkIdentityAuthority {
|
|
27624
27638
|
#extractNaturalKey;
|
|
27625
27639
|
#keyField;
|
|
27626
|
-
#occurrenceRanks;
|
|
27627
27640
|
#seriesId;
|
|
27628
27641
|
#seriesPrefix;
|
|
27629
|
-
#
|
|
27630
|
-
#reverseMap = null;
|
|
27642
|
+
#occurrenceRanks;
|
|
27631
27643
|
#released = false;
|
|
27644
|
+
#reverseMap = null;
|
|
27645
|
+
#sourceData;
|
|
27632
27646
|
constructor(seriesId, sourceData, options) {
|
|
27633
27647
|
this.#seriesId = seriesId;
|
|
27634
27648
|
this.#sourceData = sourceData;
|
|
@@ -36039,12 +36053,27 @@ class ChartLayoutEngine {
|
|
|
36039
36053
|
}
|
|
36040
36054
|
}
|
|
36041
36055
|
|
|
36056
|
+
/**
|
|
36057
|
+
* Small overflow allowance so marks whose stroke or radius sits exactly at a
|
|
36058
|
+
* domain extreme (a peak touching the max, a hovered point marker at the
|
|
36059
|
+
* first/last category) aren't visually chopped in half by the plot clip rect.
|
|
36060
|
+
*/
|
|
36061
|
+
const PLOT_CLIP_OVERFLOW = 8;
|
|
36042
36062
|
function crispPixel(pixel, lineWidth = 1) {
|
|
36043
36063
|
if (lineWidth % 2 === 1) {
|
|
36044
36064
|
return Math.floor(pixel) + 0.5;
|
|
36045
36065
|
}
|
|
36046
36066
|
return Math.round(pixel);
|
|
36047
36067
|
}
|
|
36068
|
+
/**
|
|
36069
|
+
* Clips the canvas context to `plotRect`, inflated on all four sides by
|
|
36070
|
+
* {@link PLOT_CLIP_OVERFLOW} so marks touching a domain extreme aren't cut in half.
|
|
36071
|
+
*/
|
|
36072
|
+
function clipToPlotRect(context, plotRect) {
|
|
36073
|
+
context.beginPath();
|
|
36074
|
+
context.rect(plotRect.x - PLOT_CLIP_OVERFLOW, plotRect.y - PLOT_CLIP_OVERFLOW, plotRect.width + PLOT_CLIP_OVERFLOW * 2, plotRect.height + PLOT_CLIP_OVERFLOW * 2);
|
|
36075
|
+
context.clip();
|
|
36076
|
+
}
|
|
36048
36077
|
function drawRoundedRectCorners(context, x, y, width, height, radii) {
|
|
36049
36078
|
if (width <= 0 || height <= 0) {
|
|
36050
36079
|
return;
|
|
@@ -36873,9 +36902,7 @@ class CartesianOverlayRenderer {
|
|
|
36873
36902
|
return;
|
|
36874
36903
|
}
|
|
36875
36904
|
context.save();
|
|
36876
|
-
context
|
|
36877
|
-
context.rect(plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
36878
|
-
context.clip();
|
|
36905
|
+
clipToPlotRect(context, plotRect);
|
|
36879
36906
|
// 1. Overlay Bands
|
|
36880
36907
|
for (const band of overlayScene.referenceBands) {
|
|
36881
36908
|
if (band.layer === "overlay") {
|
|
@@ -36900,9 +36927,7 @@ class CartesianOverlayRenderer {
|
|
|
36900
36927
|
return;
|
|
36901
36928
|
}
|
|
36902
36929
|
context.save();
|
|
36903
|
-
context
|
|
36904
|
-
context.rect(plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
36905
|
-
context.clip();
|
|
36930
|
+
clipToPlotRect(context, plotRect);
|
|
36906
36931
|
// 1. Underlay Bands
|
|
36907
36932
|
for (const band of overlayScene.referenceBands) {
|
|
36908
36933
|
if (band.layer === "underlay") {
|
|
@@ -36947,9 +36972,7 @@ class CartesianCrosshairRenderer {
|
|
|
36947
36972
|
}
|
|
36948
36973
|
const dash = getCrosshairDash$1(registration.lineStyle());
|
|
36949
36974
|
context.save();
|
|
36950
|
-
context
|
|
36951
|
-
context.rect(plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
36952
|
-
context.clip();
|
|
36975
|
+
clipToPlotRect(context, plotRect);
|
|
36953
36976
|
context.strokeStyle = style.color;
|
|
36954
36977
|
context.lineWidth = style.width;
|
|
36955
36978
|
context.globalAlpha = style.opacity;
|
|
@@ -36999,9 +37022,7 @@ class CartesianInteractionOverlayRenderer {
|
|
|
36999
37022
|
return;
|
|
37000
37023
|
}
|
|
37001
37024
|
context.save();
|
|
37002
|
-
context
|
|
37003
|
-
context.rect(plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
37004
|
-
context.clip();
|
|
37025
|
+
clipToPlotRect(context, plotRect);
|
|
37005
37026
|
const markerStrokeColor = styleResolver.resolveCssVariable("--mona-chart-marker-stroke-color") ||
|
|
37006
37027
|
styleResolver.resolveCssVariable("--color-surface") ||
|
|
37007
37028
|
"#ffffff";
|
|
@@ -37141,9 +37162,7 @@ class CartesianSelectionOverlayRenderer {
|
|
|
37141
37162
|
}
|
|
37142
37163
|
const { color = "#3b82f6", fillOpacity = 0.12, plotRect, strokeWidth = 2 } = options;
|
|
37143
37164
|
ctx.save();
|
|
37144
|
-
ctx
|
|
37145
|
-
ctx.rect(plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
37146
|
-
ctx.clip();
|
|
37165
|
+
clipToPlotRect(ctx, plotRect);
|
|
37147
37166
|
ctx.strokeStyle = color;
|
|
37148
37167
|
ctx.lineWidth = strokeWidth;
|
|
37149
37168
|
for (const hit of scene.hits) {
|
|
@@ -37468,9 +37487,7 @@ class CartesianChartRenderer {
|
|
|
37468
37487
|
static renderSeriesLayer(context, scene) {
|
|
37469
37488
|
const { plotRect, series } = scene;
|
|
37470
37489
|
context.save();
|
|
37471
|
-
context
|
|
37472
|
-
context.rect(plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
37473
|
-
context.clip();
|
|
37490
|
+
clipToPlotRect(context, plotRect);
|
|
37474
37491
|
for (const s of series) {
|
|
37475
37492
|
switch (s.type) {
|
|
37476
37493
|
case "area":
|
|
@@ -39199,13 +39216,13 @@ class CanvasChartRenderBackend {
|
|
|
39199
39216
|
#context;
|
|
39200
39217
|
#viewport;
|
|
39201
39218
|
constructor(canvas) {
|
|
39202
|
-
this.kind = "canvas";
|
|
39203
39219
|
this.#context = null;
|
|
39204
39220
|
this.#viewport = {
|
|
39205
39221
|
devicePixelRatio: 1,
|
|
39206
39222
|
height: 0,
|
|
39207
39223
|
width: 0
|
|
39208
39224
|
};
|
|
39225
|
+
this.kind = "canvas";
|
|
39209
39226
|
this.#canvas = canvas;
|
|
39210
39227
|
this.#context = canvas.getContext("2d");
|
|
39211
39228
|
}
|
|
@@ -41274,6 +41291,12 @@ class SvgRangeBarSeriesRenderer {
|
|
|
41274
41291
|
}
|
|
41275
41292
|
}
|
|
41276
41293
|
|
|
41294
|
+
/**
|
|
41295
|
+
* Small overflow allowance so marks whose stroke or radius sits exactly at a
|
|
41296
|
+
* domain extreme (a peak touching the max, a point at the first/last category)
|
|
41297
|
+
* aren't visually chopped in half by the plot clip rectangle.
|
|
41298
|
+
*/
|
|
41299
|
+
const SERIES_CLIP_OVERFLOW$1 = 8;
|
|
41277
41300
|
class SvgCartesianChartRenderer {
|
|
41278
41301
|
#axisRenderer;
|
|
41279
41302
|
#brushRenderer;
|
|
@@ -41468,7 +41491,7 @@ class SvgCartesianChartRenderer {
|
|
|
41468
41491
|
return;
|
|
41469
41492
|
}
|
|
41470
41493
|
this.#clearCrossfadeScopes();
|
|
41471
|
-
const plotClipUrl = defs.useClipRect("plot-clip", plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
41494
|
+
const plotClipUrl = defs.useClipRect("plot-clip", plotRect.x - SERIES_CLIP_OVERFLOW$1, plotRect.y - SERIES_CLIP_OVERFLOW$1, plotRect.width + SERIES_CLIP_OVERFLOW$1 * 2, plotRect.height + SERIES_CLIP_OVERFLOW$1 * 2);
|
|
41472
41495
|
// 1. Grid
|
|
41473
41496
|
this.#gridRenderer.render(scene, styleResolver);
|
|
41474
41497
|
// 2. Static Underlays
|
|
@@ -41527,7 +41550,7 @@ class SvgCartesianChartRenderer {
|
|
|
41527
41550
|
const fromOpacity = Math.max(0, Math.min(1, 1 - p));
|
|
41528
41551
|
const toOpacity = Math.max(0, Math.min(1, p));
|
|
41529
41552
|
const toDefs = defs.withScope("cf-to");
|
|
41530
|
-
const toPlotClipUrl = toDefs.useClipRect("plot-clip", toScene.plotRect.x, toScene.plotRect.y, toScene.plotRect.width, toScene.plotRect.height);
|
|
41553
|
+
const toPlotClipUrl = toDefs.useClipRect("plot-clip", toScene.plotRect.x - SERIES_CLIP_OVERFLOW$1, toScene.plotRect.y - SERIES_CLIP_OVERFLOW$1, toScene.plotRect.width + SERIES_CLIP_OVERFLOW$1 * 2, toScene.plotRect.height + SERIES_CLIP_OVERFLOW$1 * 2);
|
|
41531
41554
|
// Persistent selection and data labels are suppressed during animation
|
|
41532
41555
|
this.#selectionRenderer.clear();
|
|
41533
41556
|
this.#dataLabelRenderer.clear();
|
|
@@ -41572,7 +41595,7 @@ class SvgCartesianChartRenderer {
|
|
|
41572
41595
|
this.#layers.series.removeAttribute("clip-path");
|
|
41573
41596
|
if (fromScene) {
|
|
41574
41597
|
const fromDefs = defs.withScope("cf-from");
|
|
41575
|
-
const fromPlotClipUrl = fromDefs.useClipRect("plot-clip", fromScene.plotRect.x, fromScene.plotRect.y, fromScene.plotRect.width, fromScene.plotRect.height);
|
|
41598
|
+
const fromPlotClipUrl = fromDefs.useClipRect("plot-clip", fromScene.plotRect.x - SERIES_CLIP_OVERFLOW$1, fromScene.plotRect.y - SERIES_CLIP_OVERFLOW$1, fromScene.plotRect.width + SERIES_CLIP_OVERFLOW$1 * 2, fromScene.plotRect.height + SERIES_CLIP_OVERFLOW$1 * 2);
|
|
41576
41599
|
if (!this.#crossfadeFromScope) {
|
|
41577
41600
|
this.#crossfadeFromScope = createSvgElement("g");
|
|
41578
41601
|
this.#crossfadeFromScope.setAttribute("data-crossfade-scope", "from");
|
|
@@ -41641,6 +41664,12 @@ class SvgCartesianChartRenderer {
|
|
|
41641
41664
|
}
|
|
41642
41665
|
}
|
|
41643
41666
|
|
|
41667
|
+
/**
|
|
41668
|
+
* Small overflow allowance so marks whose stroke or radius sits exactly at a
|
|
41669
|
+
* domain extreme (a peak touching the max, a point at the first/last category)
|
|
41670
|
+
* aren't visually chopped in half by the plot clip rectangle.
|
|
41671
|
+
*/
|
|
41672
|
+
const SERIES_CLIP_OVERFLOW = 8;
|
|
41644
41673
|
class SvgCartesianContentRenderer {
|
|
41645
41674
|
#axesGroup;
|
|
41646
41675
|
#axisRenderer;
|
|
@@ -41778,7 +41807,7 @@ class SvgCartesianContentRenderer {
|
|
|
41778
41807
|
this.clear();
|
|
41779
41808
|
return;
|
|
41780
41809
|
}
|
|
41781
|
-
const plotClipUrl = defs.useClipRect("plot-clip", plotRect.x, plotRect.y, plotRect.width, plotRect.height);
|
|
41810
|
+
const plotClipUrl = defs.useClipRect("plot-clip", plotRect.x - SERIES_CLIP_OVERFLOW, plotRect.y - SERIES_CLIP_OVERFLOW, plotRect.width + SERIES_CLIP_OVERFLOW * 2, plotRect.height + SERIES_CLIP_OVERFLOW * 2);
|
|
41782
41811
|
// 1. Grid
|
|
41783
41812
|
this.#gridRenderer.render(scene, styleResolver);
|
|
41784
41813
|
// 2. Underlays
|
|
@@ -43946,7 +43975,6 @@ class SvgChartRenderBackend {
|
|
|
43946
43975
|
#toTreemapRenderer;
|
|
43947
43976
|
#toWaterfallRenderer;
|
|
43948
43977
|
constructor(root, instanceId) {
|
|
43949
|
-
this.kind = "svg";
|
|
43950
43978
|
this.#fromCartesianRenderer = null;
|
|
43951
43979
|
this.#fromFunnelRenderer = null;
|
|
43952
43980
|
this.#fromHeatmapRenderer = null;
|
|
@@ -43962,6 +43990,7 @@ class SvgChartRenderBackend {
|
|
|
43962
43990
|
this.#toPolarRenderer = null;
|
|
43963
43991
|
this.#toTreemapRenderer = null;
|
|
43964
43992
|
this.#toWaterfallRenderer = null;
|
|
43993
|
+
this.kind = "svg";
|
|
43965
43994
|
this.#root = root;
|
|
43966
43995
|
this.#namespace = new SvgIdNamespace(instanceId);
|
|
43967
43996
|
this.#layers = new SvgRootLayers(root);
|
|
@@ -46836,8 +46865,8 @@ async function readResponseBytesBounded(response, maxBytes) {
|
|
|
46836
46865
|
* media validation, and aggregate byte budget tracking (R5-02 / R5-03 / R5-12 / R6-01 / R6-03 / R6-06).
|
|
46837
46866
|
*/
|
|
46838
46867
|
class ChartExportResourceTransaction {
|
|
46839
|
-
#totalBytes = 0;
|
|
46840
46868
|
#cache = new Map();
|
|
46869
|
+
#totalBytes = 0;
|
|
46841
46870
|
constructor(signal, decodeEnvironment) {
|
|
46842
46871
|
this.signal = signal;
|
|
46843
46872
|
this.decodeEnvironment = decodeEnvironment;
|
|
@@ -52684,6 +52713,8 @@ class ChartComponent {
|
|
|
52684
52713
|
#hasWarnedMultiBrush;
|
|
52685
52714
|
#hasWarnedMultiSelection;
|
|
52686
52715
|
#hasWarnedSelectionNonCartesian;
|
|
52716
|
+
#initialMeasurementFrameId;
|
|
52717
|
+
#initialMeasurementPending;
|
|
52687
52718
|
#interactionOwner;
|
|
52688
52719
|
#interactionRevision;
|
|
52689
52720
|
#interactionState;
|
|
@@ -52705,10 +52736,142 @@ class ChartComponent {
|
|
|
52705
52736
|
#renderBackend;
|
|
52706
52737
|
#renderScene;
|
|
52707
52738
|
#resizeObserver;
|
|
52739
|
+
#resizeObserverTarget;
|
|
52708
52740
|
#suppressNextCanvasClick;
|
|
52709
52741
|
#synchronizationController;
|
|
52710
52742
|
#themeObserver;
|
|
52711
52743
|
constructor() {
|
|
52744
|
+
this.#activeBrushBounds = signal(null, /* @ts-ignore */
|
|
52745
|
+
...(ngDevMode ? [{ debugName: "#activeBrushBounds" }] : /* istanbul ignore next */ []));
|
|
52746
|
+
this.#activeExportControllers = new Set();
|
|
52747
|
+
this.#angularAxis = signal(null, /* @ts-ignore */
|
|
52748
|
+
...(ngDevMode ? [{ debugName: "#angularAxis" }] : /* istanbul ignore next */ []));
|
|
52749
|
+
this.#animationMode = signal(null, /* @ts-ignore */
|
|
52750
|
+
...(ngDevMode ? [{ debugName: "#animationMode" }] : /* istanbul ignore next */ []));
|
|
52751
|
+
this.#annotationById = computed(() => {
|
|
52752
|
+
const map = new Map();
|
|
52753
|
+
for (const r of this.#annotations()) {
|
|
52754
|
+
map.set(r.id, r);
|
|
52755
|
+
}
|
|
52756
|
+
return map;
|
|
52757
|
+
}, /* @ts-ignore */
|
|
52758
|
+
...(ngDevMode ? [{ debugName: "#annotationById" }] : /* istanbul ignore next */ []));
|
|
52759
|
+
this.#annotations = signal([], /* @ts-ignore */
|
|
52760
|
+
...(ngDevMode ? [{ debugName: "#annotations" }] : /* istanbul ignore next */ []));
|
|
52761
|
+
this.#brush = signal(null, /* @ts-ignore */
|
|
52762
|
+
...(ngDevMode ? [{ debugName: "#brush" }] : /* istanbul ignore next */ []));
|
|
52763
|
+
this.#brushGestureController = new ChartBrushGestureController();
|
|
52764
|
+
this.#crosshair = signal(null, /* @ts-ignore */
|
|
52765
|
+
...(ngDevMode ? [{ debugName: "#crosshair" }] : /* istanbul ignore next */ []));
|
|
52766
|
+
this.#dataLabelMeasurementRevision = signal(0, /* @ts-ignore */
|
|
52767
|
+
...(ngDevMode ? [{ debugName: "#dataLabelMeasurementRevision" }] : /* istanbul ignore next */ []));
|
|
52768
|
+
this.#dataLabelMeasurements = new Map();
|
|
52769
|
+
this.#destroyRef = inject(DestroyRef);
|
|
52770
|
+
this.#elementRef = inject(ElementRef);
|
|
52771
|
+
this.#hasInitializedDefaultSelection = signal(false, /* @ts-ignore */
|
|
52772
|
+
...(ngDevMode ? [{ debugName: "#hasInitializedDefaultSelection" }] : /* istanbul ignore next */ []));
|
|
52773
|
+
this.#hasInitializedDefaultViewport = signal(false, /* @ts-ignore */
|
|
52774
|
+
...(ngDevMode ? [{ debugName: "#hasInitializedDefaultViewport" }] : /* istanbul ignore next */ []));
|
|
52775
|
+
this.#internalSelectedMarkIds = signal([], /* @ts-ignore */
|
|
52776
|
+
...(ngDevMode ? [{ debugName: "#internalSelectedMarkIds" }] : /* istanbul ignore next */ []));
|
|
52777
|
+
this.#isAnimating = signal(false, /* @ts-ignore */
|
|
52778
|
+
...(ngDevMode ? [{ debugName: "#isAnimating" }] : /* istanbul ignore next */ []));
|
|
52779
|
+
this.#isExitingData = signal(false, /* @ts-ignore */
|
|
52780
|
+
...(ngDevMode ? [{ debugName: "#isExitingData" }] : /* istanbul ignore next */ []));
|
|
52781
|
+
this.#isStructuralAnimation = signal(false, /* @ts-ignore */
|
|
52782
|
+
...(ngDevMode ? [{ debugName: "#isStructuralAnimation" }] : /* istanbul ignore next */ []));
|
|
52783
|
+
this.#labelMeasurements = new Map();
|
|
52784
|
+
this.#legend = signal(null, /* @ts-ignore */
|
|
52785
|
+
...(ngDevMode ? [{ debugName: "#legend" }] : /* istanbul ignore next */ []));
|
|
52786
|
+
this.#observedDataLabelElements = new Map();
|
|
52787
|
+
this.#observedLabelElements = new Map();
|
|
52788
|
+
this.#observedOverlayLabelElements = new Map();
|
|
52789
|
+
this.#overlayLabelMeasurementRevision = signal(0, /* @ts-ignore */
|
|
52790
|
+
...(ngDevMode ? [{ debugName: "#overlayLabelMeasurementRevision" }] : /* istanbul ignore next */ []));
|
|
52791
|
+
this.#overlayLabelMeasurements = new Map();
|
|
52792
|
+
this.#radialAxis = signal(null, /* @ts-ignore */
|
|
52793
|
+
...(ngDevMode ? [{ debugName: "#radialAxis" }] : /* istanbul ignore next */ []));
|
|
52794
|
+
this.#referenceBandById = computed(() => {
|
|
52795
|
+
const map = new Map();
|
|
52796
|
+
for (const r of this.#referenceBands()) {
|
|
52797
|
+
map.set(r.id, r);
|
|
52798
|
+
}
|
|
52799
|
+
return map;
|
|
52800
|
+
}, /* @ts-ignore */
|
|
52801
|
+
...(ngDevMode ? [{ debugName: "#referenceBandById" }] : /* istanbul ignore next */ []));
|
|
52802
|
+
this.#referenceBands = signal([], /* @ts-ignore */
|
|
52803
|
+
...(ngDevMode ? [{ debugName: "#referenceBands" }] : /* istanbul ignore next */ []));
|
|
52804
|
+
this.#referenceLineById = computed(() => {
|
|
52805
|
+
const map = new Map();
|
|
52806
|
+
for (const r of this.#referenceLines()) {
|
|
52807
|
+
map.set(r.id, r);
|
|
52808
|
+
}
|
|
52809
|
+
return map;
|
|
52810
|
+
}, /* @ts-ignore */
|
|
52811
|
+
...(ngDevMode ? [{ debugName: "#referenceLineById" }] : /* istanbul ignore next */ []));
|
|
52812
|
+
this.#referenceLines = signal([], /* @ts-ignore */
|
|
52813
|
+
...(ngDevMode ? [{ debugName: "#referenceLines" }] : /* istanbul ignore next */ []));
|
|
52814
|
+
this.#registeredSeries = signal([], /* @ts-ignore */
|
|
52815
|
+
...(ngDevMode ? [{ debugName: "#registeredSeries" }] : /* istanbul ignore next */ []));
|
|
52816
|
+
this.#selection = signal(null, /* @ts-ignore */
|
|
52817
|
+
...(ngDevMode ? [{ debugName: "#selection" }] : /* istanbul ignore next */ []));
|
|
52818
|
+
this.#synchronizationCoordinator = inject(ChartSynchronizationCoordinator);
|
|
52819
|
+
this.#tooltip = signal(null, /* @ts-ignore */
|
|
52820
|
+
...(ngDevMode ? [{ debugName: "#tooltip" }] : /* istanbul ignore next */ []));
|
|
52821
|
+
this.#uncontrolledViewportState = signal({ x: new Map(), y: new Map() }, /* @ts-ignore */
|
|
52822
|
+
...(ngDevMode ? [{ debugName: "#uncontrolledViewportState" }] : /* istanbul ignore next */ []));
|
|
52823
|
+
this.#warnedDiagnosticSignatures = new Set();
|
|
52824
|
+
this.#xAxes = signal([], /* @ts-ignore */
|
|
52825
|
+
...(ngDevMode ? [{ debugName: "#xAxes" }] : /* istanbul ignore next */ []));
|
|
52826
|
+
this.#yAxes = signal([], /* @ts-ignore */
|
|
52827
|
+
...(ngDevMode ? [{ debugName: "#yAxes" }] : /* istanbul ignore next */ []));
|
|
52828
|
+
this.#activeKeyboardBucketIndex = -1;
|
|
52829
|
+
this.#activeKeyboardHitKey = null;
|
|
52830
|
+
this.#activeKeyboardNamespace = null;
|
|
52831
|
+
this.#activeKeyboardSeriesId = null;
|
|
52832
|
+
this.#brushMarkIndex = null;
|
|
52833
|
+
this.#brushMarkIndexScene = null;
|
|
52834
|
+
this.#canvasContext = null;
|
|
52835
|
+
this.#canvasReady = false;
|
|
52836
|
+
this.#cartesianLayoutRuntime = null;
|
|
52837
|
+
this.#currentHeight = 300;
|
|
52838
|
+
this.#currentWidth = 500;
|
|
52839
|
+
this.#dataLabelResizeObserver = null;
|
|
52840
|
+
this.#gestureController = null;
|
|
52841
|
+
this.#hasCommittedVisualScene = false;
|
|
52842
|
+
this.#hasEmittedBrushStart = false;
|
|
52843
|
+
this.#hasPendingSizeReflow = false;
|
|
52844
|
+
this.#hasWarnedBrushWithoutSelection = false;
|
|
52845
|
+
this.#hasWarnedMultiBrush = false;
|
|
52846
|
+
this.#hasWarnedMultiSelection = false;
|
|
52847
|
+
this.#hasWarnedSelectionNonCartesian = false;
|
|
52848
|
+
this.#initialMeasurementFrameId = null;
|
|
52849
|
+
this.#initialMeasurementPending = true;
|
|
52850
|
+
this.#interactionOwner = null;
|
|
52851
|
+
this.#interactionRevision = 0;
|
|
52852
|
+
this.#interactionState = null;
|
|
52853
|
+
this.#isDestroyed = false;
|
|
52854
|
+
this.#labelResizeObserver = null;
|
|
52855
|
+
this.#lastControlledSelection = undefined;
|
|
52856
|
+
this.#lastInteractionSource = null;
|
|
52857
|
+
this.#lastNormalizedControlledViewport = null;
|
|
52858
|
+
this.#lastPointerResolution = null;
|
|
52859
|
+
this.#lastSelectionMode = undefined;
|
|
52860
|
+
this.#mediaQueryList = null;
|
|
52861
|
+
this.#mediaQueryListener = null;
|
|
52862
|
+
this.#overlayLabelResizeObserver = null;
|
|
52863
|
+
this.#pendingBrushFrame = null;
|
|
52864
|
+
this.#pendingBrushRafId = null;
|
|
52865
|
+
this.#pendingLabelMeasurementReason = 0;
|
|
52866
|
+
this.#pendingPointerEvent = null;
|
|
52867
|
+
this.#pointerFrameId = null;
|
|
52868
|
+
this.#renderBackend = null;
|
|
52869
|
+
this.#renderScene = null;
|
|
52870
|
+
this.#resizeObserver = null;
|
|
52871
|
+
this.#resizeObserverTarget = null;
|
|
52872
|
+
this.#suppressNextCanvasClick = false;
|
|
52873
|
+
this.#synchronizationController = null;
|
|
52874
|
+
this.#themeObserver = null;
|
|
52712
52875
|
this.activeAccessibilityText = signal("", /* @ts-ignore */
|
|
52713
52876
|
...(ngDevMode ? [{ debugName: "activeAccessibilityText" }] : /* istanbul ignore next */ []));
|
|
52714
52877
|
this.animationDurationCss = computed(() => `${this.normalizedAnimationOptions().duration}ms`, /* @ts-ignore */
|
|
@@ -53069,90 +53232,6 @@ class ChartComponent {
|
|
|
53069
53232
|
return list.find(s => s.type === "waterfall") ?? null;
|
|
53070
53233
|
}, /* @ts-ignore */
|
|
53071
53234
|
...(ngDevMode ? [{ debugName: "waterfallSeriesRegistration" }] : /* istanbul ignore next */ []));
|
|
53072
|
-
this.#activeBrushBounds = signal(null, /* @ts-ignore */
|
|
53073
|
-
...(ngDevMode ? [{ debugName: "#activeBrushBounds" }] : /* istanbul ignore next */ []));
|
|
53074
|
-
this.#activeExportControllers = new Set();
|
|
53075
|
-
this.#angularAxis = signal(null, /* @ts-ignore */
|
|
53076
|
-
...(ngDevMode ? [{ debugName: "#angularAxis" }] : /* istanbul ignore next */ []));
|
|
53077
|
-
this.#animationMode = signal(null, /* @ts-ignore */
|
|
53078
|
-
...(ngDevMode ? [{ debugName: "#animationMode" }] : /* istanbul ignore next */ []));
|
|
53079
|
-
this.#annotationById = computed(() => {
|
|
53080
|
-
const map = new Map();
|
|
53081
|
-
for (const r of this.#annotations()) {
|
|
53082
|
-
map.set(r.id, r);
|
|
53083
|
-
}
|
|
53084
|
-
return map;
|
|
53085
|
-
}, /* @ts-ignore */
|
|
53086
|
-
...(ngDevMode ? [{ debugName: "#annotationById" }] : /* istanbul ignore next */ []));
|
|
53087
|
-
this.#annotations = signal([], /* @ts-ignore */
|
|
53088
|
-
...(ngDevMode ? [{ debugName: "#annotations" }] : /* istanbul ignore next */ []));
|
|
53089
|
-
this.#brush = signal(null, /* @ts-ignore */
|
|
53090
|
-
...(ngDevMode ? [{ debugName: "#brush" }] : /* istanbul ignore next */ []));
|
|
53091
|
-
this.#brushGestureController = new ChartBrushGestureController();
|
|
53092
|
-
this.#crosshair = signal(null, /* @ts-ignore */
|
|
53093
|
-
...(ngDevMode ? [{ debugName: "#crosshair" }] : /* istanbul ignore next */ []));
|
|
53094
|
-
this.#dataLabelMeasurementRevision = signal(0, /* @ts-ignore */
|
|
53095
|
-
...(ngDevMode ? [{ debugName: "#dataLabelMeasurementRevision" }] : /* istanbul ignore next */ []));
|
|
53096
|
-
this.#dataLabelMeasurements = new Map();
|
|
53097
|
-
this.#destroyRef = inject(DestroyRef);
|
|
53098
|
-
this.#elementRef = inject(ElementRef);
|
|
53099
|
-
this.#hasInitializedDefaultSelection = signal(false, /* @ts-ignore */
|
|
53100
|
-
...(ngDevMode ? [{ debugName: "#hasInitializedDefaultSelection" }] : /* istanbul ignore next */ []));
|
|
53101
|
-
this.#hasInitializedDefaultViewport = signal(false, /* @ts-ignore */
|
|
53102
|
-
...(ngDevMode ? [{ debugName: "#hasInitializedDefaultViewport" }] : /* istanbul ignore next */ []));
|
|
53103
|
-
this.#internalSelectedMarkIds = signal([], /* @ts-ignore */
|
|
53104
|
-
...(ngDevMode ? [{ debugName: "#internalSelectedMarkIds" }] : /* istanbul ignore next */ []));
|
|
53105
|
-
this.#isAnimating = signal(false, /* @ts-ignore */
|
|
53106
|
-
...(ngDevMode ? [{ debugName: "#isAnimating" }] : /* istanbul ignore next */ []));
|
|
53107
|
-
this.#isExitingData = signal(false, /* @ts-ignore */
|
|
53108
|
-
...(ngDevMode ? [{ debugName: "#isExitingData" }] : /* istanbul ignore next */ []));
|
|
53109
|
-
this.#isStructuralAnimation = signal(false, /* @ts-ignore */
|
|
53110
|
-
...(ngDevMode ? [{ debugName: "#isStructuralAnimation" }] : /* istanbul ignore next */ []));
|
|
53111
|
-
this.#labelMeasurements = new Map();
|
|
53112
|
-
this.#legend = signal(null, /* @ts-ignore */
|
|
53113
|
-
...(ngDevMode ? [{ debugName: "#legend" }] : /* istanbul ignore next */ []));
|
|
53114
|
-
this.#observedDataLabelElements = new Map();
|
|
53115
|
-
this.#observedLabelElements = new Map();
|
|
53116
|
-
this.#observedOverlayLabelElements = new Map();
|
|
53117
|
-
this.#overlayLabelMeasurementRevision = signal(0, /* @ts-ignore */
|
|
53118
|
-
...(ngDevMode ? [{ debugName: "#overlayLabelMeasurementRevision" }] : /* istanbul ignore next */ []));
|
|
53119
|
-
this.#overlayLabelMeasurements = new Map();
|
|
53120
|
-
this.#radialAxis = signal(null, /* @ts-ignore */
|
|
53121
|
-
...(ngDevMode ? [{ debugName: "#radialAxis" }] : /* istanbul ignore next */ []));
|
|
53122
|
-
this.#referenceBandById = computed(() => {
|
|
53123
|
-
const map = new Map();
|
|
53124
|
-
for (const r of this.#referenceBands()) {
|
|
53125
|
-
map.set(r.id, r);
|
|
53126
|
-
}
|
|
53127
|
-
return map;
|
|
53128
|
-
}, /* @ts-ignore */
|
|
53129
|
-
...(ngDevMode ? [{ debugName: "#referenceBandById" }] : /* istanbul ignore next */ []));
|
|
53130
|
-
this.#referenceBands = signal([], /* @ts-ignore */
|
|
53131
|
-
...(ngDevMode ? [{ debugName: "#referenceBands" }] : /* istanbul ignore next */ []));
|
|
53132
|
-
this.#referenceLineById = computed(() => {
|
|
53133
|
-
const map = new Map();
|
|
53134
|
-
for (const r of this.#referenceLines()) {
|
|
53135
|
-
map.set(r.id, r);
|
|
53136
|
-
}
|
|
53137
|
-
return map;
|
|
53138
|
-
}, /* @ts-ignore */
|
|
53139
|
-
...(ngDevMode ? [{ debugName: "#referenceLineById" }] : /* istanbul ignore next */ []));
|
|
53140
|
-
this.#referenceLines = signal([], /* @ts-ignore */
|
|
53141
|
-
...(ngDevMode ? [{ debugName: "#referenceLines" }] : /* istanbul ignore next */ []));
|
|
53142
|
-
this.#registeredSeries = signal([], /* @ts-ignore */
|
|
53143
|
-
...(ngDevMode ? [{ debugName: "#registeredSeries" }] : /* istanbul ignore next */ []));
|
|
53144
|
-
this.#selection = signal(null, /* @ts-ignore */
|
|
53145
|
-
...(ngDevMode ? [{ debugName: "#selection" }] : /* istanbul ignore next */ []));
|
|
53146
|
-
this.#synchronizationCoordinator = inject(ChartSynchronizationCoordinator);
|
|
53147
|
-
this.#tooltip = signal(null, /* @ts-ignore */
|
|
53148
|
-
...(ngDevMode ? [{ debugName: "#tooltip" }] : /* istanbul ignore next */ []));
|
|
53149
|
-
this.#uncontrolledViewportState = signal({ x: new Map(), y: new Map() }, /* @ts-ignore */
|
|
53150
|
-
...(ngDevMode ? [{ debugName: "#uncontrolledViewportState" }] : /* istanbul ignore next */ []));
|
|
53151
|
-
this.#warnedDiagnosticSignatures = new Set();
|
|
53152
|
-
this.#xAxes = signal([], /* @ts-ignore */
|
|
53153
|
-
...(ngDevMode ? [{ debugName: "#xAxes" }] : /* istanbul ignore next */ []));
|
|
53154
|
-
this.#yAxes = signal([], /* @ts-ignore */
|
|
53155
|
-
...(ngDevMode ? [{ debugName: "#yAxes" }] : /* istanbul ignore next */ []));
|
|
53156
53235
|
this.angularAxisRegistration = this.#angularAxis.asReadonly();
|
|
53157
53236
|
/**
|
|
53158
53237
|
* @description Animation settings for initial render and subsequent data or visibility transitions.
|
|
@@ -53291,50 +53370,6 @@ class ChartComponent {
|
|
|
53291
53370
|
this.yAxesRegistration = this.#yAxes.asReadonly();
|
|
53292
53371
|
this.yAxisRegistration = computed(() => this.#yAxes()[0] ?? null, /* @ts-ignore */
|
|
53293
53372
|
...(ngDevMode ? [{ debugName: "yAxisRegistration" }] : /* istanbul ignore next */ []));
|
|
53294
|
-
this.#activeKeyboardBucketIndex = -1;
|
|
53295
|
-
this.#activeKeyboardHitKey = null;
|
|
53296
|
-
this.#activeKeyboardNamespace = null;
|
|
53297
|
-
this.#activeKeyboardSeriesId = null;
|
|
53298
|
-
this.#brushMarkIndex = null;
|
|
53299
|
-
this.#brushMarkIndexScene = null;
|
|
53300
|
-
this.#canvasContext = null;
|
|
53301
|
-
this.#canvasReady = false;
|
|
53302
|
-
this.#cartesianLayoutRuntime = null;
|
|
53303
|
-
this.#currentHeight = 300;
|
|
53304
|
-
this.#currentWidth = 500;
|
|
53305
|
-
this.#dataLabelResizeObserver = null;
|
|
53306
|
-
this.#gestureController = null;
|
|
53307
|
-
this.#hasCommittedVisualScene = false;
|
|
53308
|
-
this.#hasEmittedBrushStart = false;
|
|
53309
|
-
this.#hasPendingSizeReflow = false;
|
|
53310
|
-
this.#hasWarnedBrushWithoutSelection = false;
|
|
53311
|
-
this.#hasWarnedMultiBrush = false;
|
|
53312
|
-
this.#hasWarnedMultiSelection = false;
|
|
53313
|
-
this.#hasWarnedSelectionNonCartesian = false;
|
|
53314
|
-
this.#interactionOwner = null;
|
|
53315
|
-
this.#interactionRevision = 0;
|
|
53316
|
-
this.#interactionState = null;
|
|
53317
|
-
this.#isDestroyed = false;
|
|
53318
|
-
this.#labelResizeObserver = null;
|
|
53319
|
-
this.#lastControlledSelection = undefined;
|
|
53320
|
-
this.#lastInteractionSource = null;
|
|
53321
|
-
this.#lastNormalizedControlledViewport = null;
|
|
53322
|
-
this.#lastPointerResolution = null;
|
|
53323
|
-
this.#lastSelectionMode = undefined;
|
|
53324
|
-
this.#mediaQueryList = null;
|
|
53325
|
-
this.#mediaQueryListener = null;
|
|
53326
|
-
this.#overlayLabelResizeObserver = null;
|
|
53327
|
-
this.#pendingBrushFrame = null;
|
|
53328
|
-
this.#pendingBrushRafId = null;
|
|
53329
|
-
this.#pendingLabelMeasurementReason = 0;
|
|
53330
|
-
this.#pendingPointerEvent = null;
|
|
53331
|
-
this.#pointerFrameId = null;
|
|
53332
|
-
this.#renderBackend = null;
|
|
53333
|
-
this.#renderScene = null;
|
|
53334
|
-
this.#resizeObserver = null;
|
|
53335
|
-
this.#suppressNextCanvasClick = false;
|
|
53336
|
-
this.#synchronizationController = null;
|
|
53337
|
-
this.#themeObserver = null;
|
|
53338
53373
|
this.#styleResolver = new ChartStyleResolver(this.#elementRef.nativeElement);
|
|
53339
53374
|
this.#animationController = new ChartAnimationController(new BrowserAnimationClock());
|
|
53340
53375
|
this.#renderScheduler = new ChartRenderScheduler(reason => this.#recomputeAndPaint(reason));
|
|
@@ -53435,10 +53470,15 @@ class ChartComponent {
|
|
|
53435
53470
|
cancelAnimationFrame(this.#pointerFrameId);
|
|
53436
53471
|
this.#pointerFrameId = null;
|
|
53437
53472
|
}
|
|
53473
|
+
if (this.#initialMeasurementFrameId !== null) {
|
|
53474
|
+
cancelAnimationFrame(this.#initialMeasurementFrameId);
|
|
53475
|
+
this.#initialMeasurementFrameId = null;
|
|
53476
|
+
}
|
|
53438
53477
|
if (this.#resizeObserver) {
|
|
53439
53478
|
this.#resizeObserver.disconnect();
|
|
53440
53479
|
this.#resizeObserver = null;
|
|
53441
53480
|
}
|
|
53481
|
+
this.#resizeObserverTarget = null;
|
|
53442
53482
|
if (this.#labelResizeObserver) {
|
|
53443
53483
|
this.#labelResizeObserver.disconnect();
|
|
53444
53484
|
this.#labelResizeObserver = null;
|
|
@@ -54165,28 +54205,86 @@ class ChartComponent {
|
|
|
54165
54205
|
#getSurfaceElement() {
|
|
54166
54206
|
return this.plotSurfaceElement()?.nativeElement ?? this.canvasElement()?.nativeElement ?? null;
|
|
54167
54207
|
}
|
|
54208
|
+
#getPlotElement() {
|
|
54209
|
+
return (this.plotSurfaceElement()?.nativeElement ||
|
|
54210
|
+
this.canvasElement()?.nativeElement.parentElement ||
|
|
54211
|
+
this.#elementRef.nativeElement);
|
|
54212
|
+
}
|
|
54213
|
+
#measurePlotElement(plotEl) {
|
|
54214
|
+
const rect = plotEl.getBoundingClientRect();
|
|
54215
|
+
const width = rect.width > 0 ? rect.width : plotEl.offsetWidth;
|
|
54216
|
+
const height = rect.height > 0 ? rect.height : plotEl.offsetHeight;
|
|
54217
|
+
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
54218
|
+
return null;
|
|
54219
|
+
}
|
|
54220
|
+
return { height, width };
|
|
54221
|
+
}
|
|
54222
|
+
#applyMeasuredSize(width, height) {
|
|
54223
|
+
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
54224
|
+
return false;
|
|
54225
|
+
}
|
|
54226
|
+
const wasPending = this.#initialMeasurementPending;
|
|
54227
|
+
const changed = Math.abs(width - this.#currentWidth) >= 0.5 || Math.abs(height - this.#currentHeight) >= 0.5;
|
|
54228
|
+
this.#currentWidth = width;
|
|
54229
|
+
this.#currentHeight = height;
|
|
54230
|
+
this.#initialMeasurementPending = false;
|
|
54231
|
+
const requiresRepaint = changed || wasPending;
|
|
54232
|
+
if (requiresRepaint) {
|
|
54233
|
+
this.#updateCanvasBackingStore(width, height);
|
|
54234
|
+
}
|
|
54235
|
+
return requiresRepaint;
|
|
54236
|
+
}
|
|
54237
|
+
#syncResizeObserverTarget() {
|
|
54238
|
+
const plotEl = this.#getPlotElement();
|
|
54239
|
+
if (this.#resizeObserver && this.#resizeObserverTarget !== plotEl) {
|
|
54240
|
+
if (this.#resizeObserverTarget) {
|
|
54241
|
+
this.#resizeObserver.unobserve(this.#resizeObserverTarget);
|
|
54242
|
+
}
|
|
54243
|
+
this.#resizeObserverTarget = plotEl;
|
|
54244
|
+
this.#resizeObserver.observe(plotEl);
|
|
54245
|
+
}
|
|
54246
|
+
return plotEl;
|
|
54247
|
+
}
|
|
54248
|
+
#scheduleInitialMeasurement(attempt = 0) {
|
|
54249
|
+
if (!this.#initialMeasurementPending ||
|
|
54250
|
+
this.#initialMeasurementFrameId !== null ||
|
|
54251
|
+
typeof requestAnimationFrame === "undefined" ||
|
|
54252
|
+
attempt >= 3) {
|
|
54253
|
+
return;
|
|
54254
|
+
}
|
|
54255
|
+
this.#initialMeasurementFrameId = requestAnimationFrame(() => {
|
|
54256
|
+
this.#initialMeasurementFrameId = null;
|
|
54257
|
+
if (this.#isDestroyed) {
|
|
54258
|
+
return;
|
|
54259
|
+
}
|
|
54260
|
+
const plotEl = this.#syncResizeObserverTarget();
|
|
54261
|
+
const measurement = this.#measurePlotElement(plotEl);
|
|
54262
|
+
if (measurement) {
|
|
54263
|
+
if (this.#applyMeasuredSize(measurement.width, measurement.height)) {
|
|
54264
|
+
this.invalidate(16 /* ChartInvalidationReason.Size */);
|
|
54265
|
+
}
|
|
54266
|
+
return;
|
|
54267
|
+
}
|
|
54268
|
+
this.#scheduleInitialMeasurement(attempt + 1);
|
|
54269
|
+
});
|
|
54270
|
+
}
|
|
54168
54271
|
#initCanvasAndObserver() {
|
|
54169
|
-
const plotSurfaceRef = this.plotSurfaceElement();
|
|
54170
54272
|
const canvasRef = this.canvasElement();
|
|
54171
54273
|
if (canvasRef?.nativeElement) {
|
|
54172
54274
|
this.#canvasContext = canvasRef.nativeElement.getContext("2d");
|
|
54173
54275
|
}
|
|
54174
|
-
const plotEl =
|
|
54276
|
+
const plotEl = this.#getPlotElement();
|
|
54175
54277
|
if (typeof ResizeObserver !== "undefined") {
|
|
54176
54278
|
this.#resizeObserver = new ResizeObserver(entries => {
|
|
54279
|
+
this.#syncResizeObserverTarget();
|
|
54177
54280
|
for (const entry of entries) {
|
|
54178
54281
|
const { height, width } = entry.contentRect;
|
|
54179
|
-
if (width > 0 &&
|
|
54180
|
-
height > 0 &&
|
|
54181
|
-
(Math.abs(width - this.#currentWidth) >= 0.5 || Math.abs(height - this.#currentHeight) >= 0.5)) {
|
|
54182
|
-
this.#currentWidth = width;
|
|
54183
|
-
this.#currentHeight = height;
|
|
54184
|
-
this.#updateCanvasBackingStore(width, height);
|
|
54282
|
+
if (width > 0 && height > 0 && this.#applyMeasuredSize(width, height)) {
|
|
54185
54283
|
this.invalidate(16 /* ChartInvalidationReason.Size */);
|
|
54186
54284
|
}
|
|
54187
54285
|
}
|
|
54188
54286
|
});
|
|
54189
|
-
this.#
|
|
54287
|
+
this.#syncResizeObserverTarget();
|
|
54190
54288
|
}
|
|
54191
54289
|
if (typeof MutationObserver !== "undefined") {
|
|
54192
54290
|
this.#themeObserver = new MutationObserver(() => {
|
|
@@ -54207,12 +54305,14 @@ class ChartComponent {
|
|
|
54207
54305
|
}
|
|
54208
54306
|
}
|
|
54209
54307
|
// Initial layout pass
|
|
54210
|
-
const
|
|
54211
|
-
|
|
54212
|
-
|
|
54213
|
-
|
|
54214
|
-
|
|
54215
|
-
|
|
54308
|
+
const initialMeasurement = this.#measurePlotElement(plotEl);
|
|
54309
|
+
if (initialMeasurement) {
|
|
54310
|
+
this.#applyMeasuredSize(initialMeasurement.width, initialMeasurement.height);
|
|
54311
|
+
}
|
|
54312
|
+
else {
|
|
54313
|
+
this.#initialMeasurementPending = true;
|
|
54314
|
+
this.#scheduleInitialMeasurement();
|
|
54315
|
+
}
|
|
54216
54316
|
}
|
|
54217
54317
|
#normalizePointer(event) {
|
|
54218
54318
|
const element = this.#getSurfaceElement();
|
|
@@ -54309,15 +54409,10 @@ class ChartComponent {
|
|
|
54309
54409
|
this.#paint();
|
|
54310
54410
|
return;
|
|
54311
54411
|
}
|
|
54312
|
-
if (this.#currentWidth <= 0 || this.#currentHeight <= 0) {
|
|
54313
|
-
const
|
|
54314
|
-
|
|
54315
|
-
this.#
|
|
54316
|
-
const rect = plotEl.getBoundingClientRect();
|
|
54317
|
-
if (rect.width > 0 && rect.height > 0) {
|
|
54318
|
-
this.#currentWidth = rect.width;
|
|
54319
|
-
this.#currentHeight = rect.height;
|
|
54320
|
-
this.#updateCanvasBackingStore(rect.width, rect.height);
|
|
54412
|
+
if (this.#initialMeasurementPending || this.#currentWidth <= 0 || this.#currentHeight <= 0) {
|
|
54413
|
+
const measurement = this.#measurePlotElement(this.#getPlotElement());
|
|
54414
|
+
if (measurement) {
|
|
54415
|
+
this.#applyMeasuredSize(measurement.width, measurement.height);
|
|
54321
54416
|
}
|
|
54322
54417
|
}
|
|
54323
54418
|
const sizeChanged = !this.scene() ||
|
|
@@ -54336,8 +54431,12 @@ class ChartComponent {
|
|
|
54336
54431
|
!isChromeOnly &&
|
|
54337
54432
|
!hasInvalidationReason(reason, 4 /* ChartInvalidationReason.Style */) &&
|
|
54338
54433
|
this.#cartesianLayoutRuntime !== null;
|
|
54434
|
+
const isNonCartesianSizeChange = hasInvalidationReason(reason, 16 /* ChartInvalidationReason.Size */) &&
|
|
54435
|
+
sizeChanged &&
|
|
54436
|
+
this.#cartesianLayoutRuntime === null;
|
|
54339
54437
|
const requiresSceneRefresh = isStructural ||
|
|
54340
54438
|
isChromeOnly ||
|
|
54439
|
+
isNonCartesianSizeChange ||
|
|
54341
54440
|
hasInvalidationReason(reason, 4 /* ChartInvalidationReason.Style */) ||
|
|
54342
54441
|
hasInvalidationReason(reason, 64 /* ChartInvalidationReason.Viewport */) ||
|
|
54343
54442
|
!this.scene();
|
|
@@ -54418,6 +54517,19 @@ class ChartComponent {
|
|
|
54418
54517
|
// Commit semantic target scene immediately
|
|
54419
54518
|
this.scene.set(newScene);
|
|
54420
54519
|
this.#updateGestureController();
|
|
54520
|
+
const isWaitingForInitialPolarSvgMeasurement = this.#initialMeasurementPending &&
|
|
54521
|
+
this.renderer() === "svg" &&
|
|
54522
|
+
newScene.coordinateSystem === "polar" &&
|
|
54523
|
+
newScene.polarKind === "arc";
|
|
54524
|
+
if (isWaitingForInitialPolarSvgMeasurement) {
|
|
54525
|
+
this.#renderScene = null;
|
|
54526
|
+
this.#hasCommittedVisualScene = false;
|
|
54527
|
+
this.#isAnimating.set(false);
|
|
54528
|
+
this.#isStructuralAnimation.set(false);
|
|
54529
|
+
this.#animationMode.set(null);
|
|
54530
|
+
this.#isExitingData.set(false);
|
|
54531
|
+
return;
|
|
54532
|
+
}
|
|
54421
54533
|
const isInitial = !this.#hasCommittedVisualScene;
|
|
54422
54534
|
const isVisibility = hasInvalidationReason(reason, 32 /* ChartInvalidationReason.Visibility */);
|
|
54423
54535
|
const isData = hasInvalidationReason(reason, 1 /* ChartInvalidationReason.Data */);
|
|
@@ -55070,7 +55182,7 @@ class ChartComponent {
|
|
|
55070
55182
|
}
|
|
55071
55183
|
try {
|
|
55072
55184
|
this.#renderBackend = createChartRenderBackend(mode, canvas, svg);
|
|
55073
|
-
if (this.#currentWidth > 0 && this.#currentHeight > 0) {
|
|
55185
|
+
if (!this.#initialMeasurementPending && this.#currentWidth > 0 && this.#currentHeight > 0) {
|
|
55074
55186
|
const dpr = typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1;
|
|
55075
55187
|
this.#renderBackend.resize({
|
|
55076
55188
|
devicePixelRatio: dpr,
|
|
@@ -55358,15 +55470,17 @@ class ChartComponent {
|
|
|
55358
55470
|
this.#renderScheduler.schedule(reason);
|
|
55359
55471
|
}
|
|
55360
55472
|
ngAfterContentChecked() {
|
|
55361
|
-
|
|
55362
|
-
|
|
55363
|
-
|
|
55364
|
-
|
|
55365
|
-
|
|
55366
|
-
|
|
55367
|
-
|
|
55368
|
-
|
|
55369
|
-
this.#
|
|
55473
|
+
this.#syncResizeObserverTarget();
|
|
55474
|
+
if (!this.#canvasReady ||
|
|
55475
|
+
this.#initialMeasurementPending ||
|
|
55476
|
+
this.#currentWidth <= 0 ||
|
|
55477
|
+
this.#currentHeight <= 0) {
|
|
55478
|
+
const measurement = this.#measurePlotElement(this.#getPlotElement());
|
|
55479
|
+
if (measurement) {
|
|
55480
|
+
const changed = this.#applyMeasuredSize(measurement.width, measurement.height);
|
|
55481
|
+
if (this.#canvasReady && changed) {
|
|
55482
|
+
this.invalidate(16 /* ChartInvalidationReason.Size */);
|
|
55483
|
+
}
|
|
55370
55484
|
}
|
|
55371
55485
|
}
|
|
55372
55486
|
this.#renderScheduler.flushStructural();
|
|
@@ -56807,14 +56921,15 @@ class ChartXAxisComponent {
|
|
|
56807
56921
|
#chartContext;
|
|
56808
56922
|
#destroyRef;
|
|
56809
56923
|
#registrationId;
|
|
56924
|
+
#registered;
|
|
56810
56925
|
get registrationId() {
|
|
56811
56926
|
return this.#registrationId;
|
|
56812
56927
|
}
|
|
56813
|
-
#registered;
|
|
56814
56928
|
constructor() {
|
|
56815
56929
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
56816
56930
|
this.#destroyRef = inject(DestroyRef);
|
|
56817
56931
|
this.#registrationId = `mona-x-axis-${++nextXAxisId}`;
|
|
56932
|
+
this.#registered = false;
|
|
56818
56933
|
this.labelTemplate = contentChild(ChartAxisLabelTemplateDirective, /* @ts-ignore */
|
|
56819
56934
|
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
56820
56935
|
/**
|
|
@@ -56955,7 +57070,6 @@ class ChartXAxisComponent {
|
|
|
56955
57070
|
*/
|
|
56956
57071
|
this.visible = input(true, /* @ts-ignore */
|
|
56957
57072
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
56958
|
-
this.#registered = false;
|
|
56959
57073
|
effect(() => {
|
|
56960
57074
|
this.axisId();
|
|
56961
57075
|
this.axisLine();
|
|
@@ -57040,14 +57154,15 @@ class ChartYAxisComponent {
|
|
|
57040
57154
|
#chartContext;
|
|
57041
57155
|
#destroyRef;
|
|
57042
57156
|
#registrationId;
|
|
57157
|
+
#registered;
|
|
57043
57158
|
get registrationId() {
|
|
57044
57159
|
return this.#registrationId;
|
|
57045
57160
|
}
|
|
57046
|
-
#registered;
|
|
57047
57161
|
constructor() {
|
|
57048
57162
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
57049
57163
|
this.#destroyRef = inject(DestroyRef);
|
|
57050
57164
|
this.#registrationId = `mona-y-axis-${++nextYAxisId}`;
|
|
57165
|
+
this.#registered = false;
|
|
57051
57166
|
this.labelTemplate = contentChild(ChartAxisLabelTemplateDirective, /* @ts-ignore */
|
|
57052
57167
|
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
57053
57168
|
/**
|
|
@@ -57182,7 +57297,6 @@ class ChartYAxisComponent {
|
|
|
57182
57297
|
*/
|
|
57183
57298
|
this.visible = input(true, /* @ts-ignore */
|
|
57184
57299
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
57185
|
-
this.#registered = false;
|
|
57186
57300
|
effect(() => {
|
|
57187
57301
|
this.axisId();
|
|
57188
57302
|
this.axisLine();
|
|
@@ -57267,6 +57381,7 @@ class ChartAngularAxisComponent {
|
|
|
57267
57381
|
constructor() {
|
|
57268
57382
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
57269
57383
|
this.#destroyRef = inject(DestroyRef);
|
|
57384
|
+
this.#registered = false;
|
|
57270
57385
|
this.labelTemplate = contentChild(ChartAxisLabelTemplateDirective, /* @ts-ignore */
|
|
57271
57386
|
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
57272
57387
|
/**
|
|
@@ -57322,7 +57437,6 @@ class ChartAngularAxisComponent {
|
|
|
57322
57437
|
*/
|
|
57323
57438
|
this.visible = input(true, /* @ts-ignore */
|
|
57324
57439
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
57325
|
-
this.#registered = false;
|
|
57326
57440
|
effect(() => {
|
|
57327
57441
|
this.axisLine();
|
|
57328
57442
|
this.formatter();
|
|
@@ -57380,6 +57494,7 @@ class ChartRadialAxisComponent {
|
|
|
57380
57494
|
constructor() {
|
|
57381
57495
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
57382
57496
|
this.#destroyRef = inject(DestroyRef);
|
|
57497
|
+
this.#registered = false;
|
|
57383
57498
|
this.labelTemplate = contentChild(ChartAxisLabelTemplateDirective, /* @ts-ignore */
|
|
57384
57499
|
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
57385
57500
|
/**
|
|
@@ -57459,7 +57574,6 @@ class ChartRadialAxisComponent {
|
|
|
57459
57574
|
*/
|
|
57460
57575
|
this.visible = input(true, /* @ts-ignore */
|
|
57461
57576
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
57462
|
-
this.#registered = false;
|
|
57463
57577
|
effect(() => {
|
|
57464
57578
|
this.axisLine();
|
|
57465
57579
|
this.formatter();
|
|
@@ -57544,6 +57658,7 @@ class LineSeriesComponent {
|
|
|
57544
57658
|
this.#destroyRef = inject(DestroyRef);
|
|
57545
57659
|
this.#elementRef = inject(ElementRef);
|
|
57546
57660
|
this.#id = `mona-line-series-${++nextSeriesId$9}`;
|
|
57661
|
+
this.#registered = false;
|
|
57547
57662
|
/**
|
|
57548
57663
|
* @description Explicit stroke color override for the series line.
|
|
57549
57664
|
* @default ""
|
|
@@ -57653,7 +57768,6 @@ class LineSeriesComponent {
|
|
|
57653
57768
|
*/
|
|
57654
57769
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
57655
57770
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
57656
|
-
this.#registered = false;
|
|
57657
57771
|
effect(() => {
|
|
57658
57772
|
this.visible();
|
|
57659
57773
|
if (this.#registered) {
|
|
@@ -57763,6 +57877,7 @@ class AreaSeriesComponent {
|
|
|
57763
57877
|
this.#destroyRef = inject(DestroyRef);
|
|
57764
57878
|
this.#elementRef = inject(ElementRef);
|
|
57765
57879
|
this.#id = `mona-area-series-${++nextSeriesId$8}`;
|
|
57880
|
+
this.#registered = false;
|
|
57766
57881
|
/**
|
|
57767
57882
|
* @description Explicit stroke and fill color override for the area series.
|
|
57768
57883
|
* @default ""
|
|
@@ -57902,7 +58017,6 @@ class AreaSeriesComponent {
|
|
|
57902
58017
|
*/
|
|
57903
58018
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
57904
58019
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
57905
|
-
this.#registered = false;
|
|
57906
58020
|
effect(() => {
|
|
57907
58021
|
this.visible();
|
|
57908
58022
|
if (this.#registered) {
|
|
@@ -58022,6 +58136,7 @@ class BarSeriesComponent {
|
|
|
58022
58136
|
this.#destroyRef = inject(DestroyRef);
|
|
58023
58137
|
this.#elementRef = inject(ElementRef);
|
|
58024
58138
|
this.#id = `mona-bar-series-${++nextSeriesId$7}`;
|
|
58139
|
+
this.#registered = false;
|
|
58025
58140
|
/**
|
|
58026
58141
|
* @description Corner radius in pixels for the bar caps.
|
|
58027
58142
|
* @default undefined
|
|
@@ -58137,7 +58252,6 @@ class BarSeriesComponent {
|
|
|
58137
58252
|
*/
|
|
58138
58253
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
58139
58254
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
58140
|
-
this.#registered = false;
|
|
58141
58255
|
let initialVisible = true;
|
|
58142
58256
|
effect(() => {
|
|
58143
58257
|
this.visible();
|
|
@@ -58284,6 +58398,7 @@ class PieSeriesComponent {
|
|
|
58284
58398
|
this.#seriesId = `mona-pie-series-${++nextPieSeriesId}`;
|
|
58285
58399
|
this.#visibilityRevision = signal(0, /* @ts-ignore */
|
|
58286
58400
|
...(ngDevMode ? [{ debugName: "#visibilityRevision" }] : /* istanbul ignore next */ []));
|
|
58401
|
+
this.#registered = false;
|
|
58287
58402
|
this.sliceLabelTemplate = contentChild(ChartSliceLabelTemplateDirective, /* @ts-ignore */
|
|
58288
58403
|
...(ngDevMode ? [{ debugName: "sliceLabelTemplate" }] : /* istanbul ignore next */ []));
|
|
58289
58404
|
/**
|
|
@@ -58433,7 +58548,6 @@ class PieSeriesComponent {
|
|
|
58433
58548
|
*/
|
|
58434
58549
|
this.visible = model(true, /* @ts-ignore */
|
|
58435
58550
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
58436
|
-
this.#registered = false;
|
|
58437
58551
|
effect(() => {
|
|
58438
58552
|
this.visible();
|
|
58439
58553
|
if (this.#registered) {
|
|
@@ -58600,6 +58714,7 @@ class DonutSeriesComponent {
|
|
|
58600
58714
|
this.#seriesId = `mona-donut-series-${++nextDonutSeriesId}`;
|
|
58601
58715
|
this.#visibilityRevision = signal(0, /* @ts-ignore */
|
|
58602
58716
|
...(ngDevMode ? [{ debugName: "#visibilityRevision" }] : /* istanbul ignore next */ []));
|
|
58717
|
+
this.#registered = false;
|
|
58603
58718
|
this.centerTemplate = contentChild(ChartCenterTemplateDirective, /* @ts-ignore */
|
|
58604
58719
|
...(ngDevMode ? [{ debugName: "centerTemplate" }] : /* istanbul ignore next */ []));
|
|
58605
58720
|
this.sliceLabelTemplate = contentChild(ChartSliceLabelTemplateDirective, /* @ts-ignore */
|
|
@@ -58757,7 +58872,6 @@ class DonutSeriesComponent {
|
|
|
58757
58872
|
*/
|
|
58758
58873
|
this.visible = model(true, /* @ts-ignore */
|
|
58759
58874
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
58760
|
-
this.#registered = false;
|
|
58761
58875
|
effect(() => {
|
|
58762
58876
|
this.visible();
|
|
58763
58877
|
if (this.#registered) {
|
|
@@ -58907,6 +59021,7 @@ class RadarSeriesComponent {
|
|
|
58907
59021
|
this.#destroyRef = inject(DestroyRef);
|
|
58908
59022
|
this.#elementRef = inject(ElementRef);
|
|
58909
59023
|
this.#id = `mona-radar-series-${++nextRadarSeriesId}`;
|
|
59024
|
+
this.#registered = false;
|
|
58910
59025
|
/**
|
|
58911
59026
|
* @description Property key or accessor function extracting the angular spoke category for each data item.
|
|
58912
59027
|
* @default "category"
|
|
@@ -59002,7 +59117,6 @@ class RadarSeriesComponent {
|
|
|
59002
59117
|
*/
|
|
59003
59118
|
this.visible = model(true, /* @ts-ignore */
|
|
59004
59119
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
59005
|
-
this.#registered = false;
|
|
59006
59120
|
effect(() => {
|
|
59007
59121
|
this.visible();
|
|
59008
59122
|
if (this.#registered) {
|
|
@@ -59101,6 +59215,7 @@ class PolarSeriesComponent {
|
|
|
59101
59215
|
this.#destroyRef = inject(DestroyRef);
|
|
59102
59216
|
this.#elementRef = inject(ElementRef);
|
|
59103
59217
|
this.#id = `mona-polar-series-${++nextPolarSeriesId}`;
|
|
59218
|
+
this.#registered = false;
|
|
59104
59219
|
/**
|
|
59105
59220
|
* @description Property key or accessor function extracting the degree angle (0° to 360°) for each data item.
|
|
59106
59221
|
* @default "angle"
|
|
@@ -59196,7 +59311,6 @@ class PolarSeriesComponent {
|
|
|
59196
59311
|
*/
|
|
59197
59312
|
this.visible = model(true, /* @ts-ignore */
|
|
59198
59313
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
59199
|
-
this.#registered = false;
|
|
59200
59314
|
effect(() => {
|
|
59201
59315
|
this.visible();
|
|
59202
59316
|
if (this.#registered) {
|
|
@@ -59301,6 +59415,8 @@ class ChartLegendComponent {
|
|
|
59301
59415
|
#chartContext;
|
|
59302
59416
|
#destroyRef;
|
|
59303
59417
|
constructor() {
|
|
59418
|
+
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
59419
|
+
this.#destroyRef = inject(DestroyRef);
|
|
59304
59420
|
this.containerClasses = computed(() => twMerge(chartLegendBaseThemeVariants({ position: this.position() }), this.userClass()), /* @ts-ignore */
|
|
59305
59421
|
...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
|
|
59306
59422
|
this.gradientCss = computed(() => {
|
|
@@ -59353,8 +59469,6 @@ class ChartLegendComponent {
|
|
|
59353
59469
|
...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
|
|
59354
59470
|
this.legendScale = computed(() => this.#chartContext?.legendScale?.() ?? null, /* @ts-ignore */
|
|
59355
59471
|
...(ngDevMode ? [{ debugName: "legendScale" }] : /* istanbul ignore next */ []));
|
|
59356
|
-
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
59357
|
-
this.#destroyRef = inject(DestroyRef);
|
|
59358
59472
|
/**
|
|
59359
59473
|
* @description Whether clicking or pressing Enter/Space on legend items toggles series visibility.
|
|
59360
59474
|
* @default true
|
|
@@ -59592,6 +59706,7 @@ class ScatterSeriesComponent {
|
|
|
59592
59706
|
this.#destroyRef = inject(DestroyRef);
|
|
59593
59707
|
this.#elementRef = inject(ElementRef);
|
|
59594
59708
|
this.#id = `mona-scatter-series-${++nextSeriesId$6}`;
|
|
59709
|
+
this.#registered = false;
|
|
59595
59710
|
/**
|
|
59596
59711
|
* @description Explicit fill color for the scatter points.
|
|
59597
59712
|
* @default ""
|
|
@@ -59695,7 +59810,6 @@ class ScatterSeriesComponent {
|
|
|
59695
59810
|
*/
|
|
59696
59811
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
59697
59812
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
59698
|
-
this.#registered = false;
|
|
59699
59813
|
effect(() => {
|
|
59700
59814
|
this.visible();
|
|
59701
59815
|
if (this.#registered) {
|
|
@@ -59803,6 +59917,7 @@ class BubbleSeriesComponent {
|
|
|
59803
59917
|
this.#destroyRef = inject(DestroyRef);
|
|
59804
59918
|
this.#elementRef = inject(ElementRef);
|
|
59805
59919
|
this.#id = `mona-bubble-series-${++nextSeriesId$5}`;
|
|
59920
|
+
this.#registered = false;
|
|
59806
59921
|
/**
|
|
59807
59922
|
* @description Explicit fill color for the bubbles.
|
|
59808
59923
|
* @default ""
|
|
@@ -59924,7 +60039,6 @@ class BubbleSeriesComponent {
|
|
|
59924
60039
|
*/
|
|
59925
60040
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
59926
60041
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
59927
|
-
this.#registered = false;
|
|
59928
60042
|
effect(() => {
|
|
59929
60043
|
this.visible();
|
|
59930
60044
|
if (this.#registered) {
|
|
@@ -60038,6 +60152,7 @@ class RangeBarSeriesComponent {
|
|
|
60038
60152
|
this.#destroyRef = inject(DestroyRef);
|
|
60039
60153
|
this.#elementRef = inject(ElementRef);
|
|
60040
60154
|
this.#id = `mona-range-bar-series-${++nextSeriesId$4}`;
|
|
60155
|
+
this.#registered = false;
|
|
60041
60156
|
/**
|
|
60042
60157
|
* @description Corner radius in pixels for the floating bar caps.
|
|
60043
60158
|
* @default undefined
|
|
@@ -60145,7 +60260,6 @@ class RangeBarSeriesComponent {
|
|
|
60145
60260
|
*/
|
|
60146
60261
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
60147
60262
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
60148
|
-
this.#registered = false;
|
|
60149
60263
|
effect(() => {
|
|
60150
60264
|
this.visible();
|
|
60151
60265
|
if (this.#registered) {
|
|
@@ -60255,6 +60369,7 @@ class RangeAreaSeriesComponent {
|
|
|
60255
60369
|
this.#destroyRef = inject(DestroyRef);
|
|
60256
60370
|
this.#elementRef = inject(ElementRef);
|
|
60257
60371
|
this.#id = `mona-range-area-series-${++nextSeriesId$3}`;
|
|
60372
|
+
this.#registered = false;
|
|
60258
60373
|
/**
|
|
60259
60374
|
* @description Explicit stroke and fill color override for the range area series.
|
|
60260
60375
|
* @default ""
|
|
@@ -60380,7 +60495,6 @@ class RangeAreaSeriesComponent {
|
|
|
60380
60495
|
*/
|
|
60381
60496
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
60382
60497
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
60383
|
-
this.#registered = false;
|
|
60384
60498
|
effect(() => {
|
|
60385
60499
|
this.visible();
|
|
60386
60500
|
if (this.#registered) {
|
|
@@ -60496,6 +60610,7 @@ class HeatmapSeriesComponent {
|
|
|
60496
60610
|
this.#destroyRef = inject(DestroyRef);
|
|
60497
60611
|
this.#elementRef = inject(ElementRef);
|
|
60498
60612
|
this.#id = `mona-heatmap-series-${++nextSeriesId$2}`;
|
|
60613
|
+
this.#registered = false;
|
|
60499
60614
|
/**
|
|
60500
60615
|
* @description Corner radius in pixels for each individual heat cell.
|
|
60501
60616
|
* @default undefined
|
|
@@ -60631,7 +60746,6 @@ class HeatmapSeriesComponent {
|
|
|
60631
60746
|
*/
|
|
60632
60747
|
this.yField = input.required(/* @ts-ignore */
|
|
60633
60748
|
...(ngDevMode ? [{ debugName: "yField" }] : /* istanbul ignore next */ []));
|
|
60634
|
-
this.#registered = false;
|
|
60635
60749
|
effect(() => {
|
|
60636
60750
|
this.visible();
|
|
60637
60751
|
if (this.#registered) {
|
|
@@ -60739,6 +60853,7 @@ class CandlestickSeriesComponent {
|
|
|
60739
60853
|
this.#destroyRef = inject(DestroyRef);
|
|
60740
60854
|
this.#elementRef = inject(ElementRef);
|
|
60741
60855
|
this.#id = `mona-candlestick-series-${++nextSeriesId$1}`;
|
|
60856
|
+
this.#registered = false;
|
|
60742
60857
|
/**
|
|
60743
60858
|
* @description Explicit body width in pixels for candlestick candles.
|
|
60744
60859
|
* @default undefined
|
|
@@ -60892,7 +61007,6 @@ class CandlestickSeriesComponent {
|
|
|
60892
61007
|
*/
|
|
60893
61008
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
60894
61009
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
60895
|
-
this.#registered = false;
|
|
60896
61010
|
effect(() => {
|
|
60897
61011
|
this.closeField();
|
|
60898
61012
|
this.data();
|
|
@@ -61009,12 +61123,13 @@ class OhlcSeriesComponent {
|
|
|
61009
61123
|
#id;
|
|
61010
61124
|
#registered;
|
|
61011
61125
|
constructor() {
|
|
61012
|
-
this.effectiveTickLength = computed(() => this.tickLength() ?? this.tickWidth(), /* @ts-ignore */
|
|
61013
|
-
...(ngDevMode ? [{ debugName: "effectiveTickLength" }] : /* istanbul ignore next */ []));
|
|
61014
61126
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
61015
61127
|
this.#destroyRef = inject(DestroyRef);
|
|
61016
61128
|
this.#elementRef = inject(ElementRef);
|
|
61017
61129
|
this.#id = `mona-ohlc-series-${++nextSeriesId}`;
|
|
61130
|
+
this.#registered = false;
|
|
61131
|
+
this.effectiveTickLength = computed(() => this.tickLength() ?? this.tickWidth(), /* @ts-ignore */
|
|
61132
|
+
...(ngDevMode ? [{ debugName: "effectiveTickLength" }] : /* istanbul ignore next */ []));
|
|
61018
61133
|
/**
|
|
61019
61134
|
* @description Explicit total width in pixels for open/close tick arms.
|
|
61020
61135
|
* @default undefined
|
|
@@ -61174,7 +61289,6 @@ class OhlcSeriesComponent {
|
|
|
61174
61289
|
*/
|
|
61175
61290
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
61176
61291
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
61177
|
-
this.#registered = false;
|
|
61178
61292
|
effect(() => {
|
|
61179
61293
|
this.closeField();
|
|
61180
61294
|
this.data();
|
|
@@ -61304,6 +61418,7 @@ class RadialBarSeriesComponent {
|
|
|
61304
61418
|
this.#seriesId = `mona-radial-bar-series-${++nextRadialBarSeriesId}`;
|
|
61305
61419
|
this.#visibilityRevision = signal(0, /* @ts-ignore */
|
|
61306
61420
|
...(ngDevMode ? [{ debugName: "#visibilityRevision" }] : /* istanbul ignore next */ []));
|
|
61421
|
+
this.#registered = false;
|
|
61307
61422
|
/**
|
|
61308
61423
|
* @description Spacing in pixels between concentric radial rings.
|
|
61309
61424
|
* @default 4
|
|
@@ -61469,7 +61584,6 @@ class RadialBarSeriesComponent {
|
|
|
61469
61584
|
*/
|
|
61470
61585
|
this.visible = model(true, /* @ts-ignore */
|
|
61471
61586
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
61472
|
-
this.#registered = false;
|
|
61473
61587
|
effect(() => {
|
|
61474
61588
|
this.visible();
|
|
61475
61589
|
if (this.#registered) {
|
|
@@ -61638,6 +61752,7 @@ class RoseSeriesComponent {
|
|
|
61638
61752
|
this.#seriesId = `mona-rose-series-${++nextRoseSeriesId}`;
|
|
61639
61753
|
this.#visibilityRevision = signal(0, /* @ts-ignore */
|
|
61640
61754
|
...(ngDevMode ? [{ debugName: "#visibilityRevision" }] : /* istanbul ignore next */ []));
|
|
61755
|
+
this.#registered = false;
|
|
61641
61756
|
/**
|
|
61642
61757
|
* @description Property key or accessor extracting the category label for each rose petal.
|
|
61643
61758
|
* @default "category"
|
|
@@ -61773,7 +61888,6 @@ class RoseSeriesComponent {
|
|
|
61773
61888
|
*/
|
|
61774
61889
|
this.visible = model(true, /* @ts-ignore */
|
|
61775
61890
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
61776
|
-
this.#registered = false;
|
|
61777
61891
|
effect(() => {
|
|
61778
61892
|
this.visible();
|
|
61779
61893
|
if (this.#registered) {
|
|
@@ -61937,12 +62051,13 @@ class GaugeSeriesComponent {
|
|
|
61937
62051
|
#seriesId;
|
|
61938
62052
|
#registered;
|
|
61939
62053
|
constructor() {
|
|
61940
|
-
this.centerTemplate = contentChild(ChartGaugeCenterTemplateDirective, /* @ts-ignore */
|
|
61941
|
-
...(ngDevMode ? [{ debugName: "centerTemplate" }] : /* istanbul ignore next */ []));
|
|
61942
62054
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
61943
62055
|
this.#destroyRef = inject(DestroyRef);
|
|
61944
62056
|
this.#elementRef = inject(ElementRef);
|
|
61945
62057
|
this.#seriesId = `mona-gauge-series-${++nextGaugeSeriesId}`;
|
|
62058
|
+
this.#registered = false;
|
|
62059
|
+
this.centerTemplate = contentChild(ChartGaugeCenterTemplateDirective, /* @ts-ignore */
|
|
62060
|
+
...(ngDevMode ? [{ debugName: "centerTemplate" }] : /* istanbul ignore next */ []));
|
|
61946
62061
|
/**
|
|
61947
62062
|
* @description Primary color of the gauge value arc.
|
|
61948
62063
|
* @default ""
|
|
@@ -62098,7 +62213,6 @@ class GaugeSeriesComponent {
|
|
|
62098
62213
|
*/
|
|
62099
62214
|
this.visible = model(true, /* @ts-ignore */
|
|
62100
62215
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
62101
|
-
this.#registered = false;
|
|
62102
62216
|
effect(() => {
|
|
62103
62217
|
this.visible();
|
|
62104
62218
|
if (this.#registered) {
|
|
@@ -62236,6 +62350,7 @@ class TreemapSeriesComponent {
|
|
|
62236
62350
|
this.#seriesId = `mona-treemap-series-${++nextTreemapSeriesId}`;
|
|
62237
62351
|
this.#visibilityRevision = signal(0, /* @ts-ignore */
|
|
62238
62352
|
...(ngDevMode ? [{ debugName: "#visibilityRevision" }] : /* istanbul ignore next */ []));
|
|
62353
|
+
this.#registered = false;
|
|
62239
62354
|
/**
|
|
62240
62355
|
* @description Corner radius in pixels applied to leaf node rectangles.
|
|
62241
62356
|
* @default undefined
|
|
@@ -62424,7 +62539,6 @@ class TreemapSeriesComponent {
|
|
|
62424
62539
|
*/
|
|
62425
62540
|
this.visible = model(true, /* @ts-ignore */
|
|
62426
62541
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
62427
|
-
this.#registered = false;
|
|
62428
62542
|
effect(() => {
|
|
62429
62543
|
this.visible();
|
|
62430
62544
|
if (this.#registered) {
|
|
@@ -62626,6 +62740,7 @@ class FunnelSeriesComponent {
|
|
|
62626
62740
|
this.#stageIdentityMap = new Map();
|
|
62627
62741
|
this.#visibilityRevision = signal(0, /* @ts-ignore */
|
|
62628
62742
|
...(ngDevMode ? [{ debugName: "#visibilityRevision" }] : /* istanbul ignore next */ []));
|
|
62743
|
+
this.#registered = false;
|
|
62629
62744
|
/**
|
|
62630
62745
|
* @description Property key or accessor extracting stage names.
|
|
62631
62746
|
* @default "category"
|
|
@@ -62773,7 +62888,6 @@ class FunnelSeriesComponent {
|
|
|
62773
62888
|
*/
|
|
62774
62889
|
this.widthRatio = input(0.9, /* @ts-ignore */
|
|
62775
62890
|
...(ngDevMode ? [{ debugName: "widthRatio" }] : /* istanbul ignore next */ []));
|
|
62776
|
-
this.#registered = false;
|
|
62777
62891
|
effect(() => {
|
|
62778
62892
|
const rawData = this.data() ?? this.#chartContext?.rootData() ?? [];
|
|
62779
62893
|
const keyF = this.keyField();
|
|
@@ -62985,6 +63099,7 @@ class WaterfallSeriesComponent {
|
|
|
62985
63099
|
this.#destroyRef = inject(DestroyRef);
|
|
62986
63100
|
this.#elementRef = inject(ElementRef);
|
|
62987
63101
|
this.#seriesId = `mona-waterfall-series-${++nextWaterfallSeriesId}`;
|
|
63102
|
+
this.#registered = false;
|
|
62988
63103
|
/**
|
|
62989
63104
|
* @description Corner radius in pixels applied to the four corners of waterfall bars.
|
|
62990
63105
|
* @default undefined
|
|
@@ -63146,7 +63261,6 @@ class WaterfallSeriesComponent {
|
|
|
63146
63261
|
*/
|
|
63147
63262
|
this.xField = input(undefined, /* @ts-ignore */
|
|
63148
63263
|
...(ngDevMode ? [{ debugName: "xField" }] : /* istanbul ignore next */ []));
|
|
63149
|
-
this.#registered = false;
|
|
63150
63264
|
effect(() => {
|
|
63151
63265
|
this.visible();
|
|
63152
63266
|
if (this.#registered) {
|
|
@@ -63921,6 +64035,7 @@ class ChartSelectionComponent {
|
|
|
63921
64035
|
constructor() {
|
|
63922
64036
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
63923
64037
|
this.#destroyRef = inject(DestroyRef);
|
|
64038
|
+
this.#registered = false;
|
|
63924
64039
|
/**
|
|
63925
64040
|
* @description Whether clicking plot background clears active selection.
|
|
63926
64041
|
* @default true
|
|
@@ -63991,7 +64106,6 @@ class ChartSelectionComponent {
|
|
|
63991
64106
|
*/
|
|
63992
64107
|
this.strokeWidth = input(undefined, /* @ts-ignore */
|
|
63993
64108
|
...(ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []));
|
|
63994
|
-
this.#registered = false;
|
|
63995
64109
|
effect(() => {
|
|
63996
64110
|
this.enabled();
|
|
63997
64111
|
this.mode();
|
|
@@ -64065,6 +64179,7 @@ class ChartBrushComponent {
|
|
|
64065
64179
|
constructor() {
|
|
64066
64180
|
this.#chartContext = inject(CHART_CONTEXT, { optional: true });
|
|
64067
64181
|
this.#destroyRef = inject(DestroyRef);
|
|
64182
|
+
this.#registered = false;
|
|
64068
64183
|
/**
|
|
64069
64184
|
* @description Activation trigger gesture ('drag' or 'shift-drag').
|
|
64070
64185
|
* @default "shift-drag"
|
|
@@ -64147,7 +64262,6 @@ class ChartBrushComponent {
|
|
|
64147
64262
|
*/
|
|
64148
64263
|
this.yAxisId = input(undefined, /* @ts-ignore */
|
|
64149
64264
|
...(ngDevMode ? [{ debugName: "yAxisId" }] : /* istanbul ignore next */ []));
|
|
64150
|
-
this.#registered = false;
|
|
64151
64265
|
effect(() => {
|
|
64152
64266
|
this.enabled();
|
|
64153
64267
|
this.mode();
|