velo-plot 1.15.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChartCore-BimVvUEg.js → ChartCore-BhQ4j7f5.js} +2213 -1489
- package/dist/ChartCore-BhQ4j7f5.js.map +1 -0
- package/dist/SciPlot-GJvw7GJo.js +463 -0
- package/dist/SciPlot-GJvw7GJo.js.map +1 -0
- package/dist/assets/downsample.worker-C70QJ04y.js +2 -0
- package/dist/assets/downsample.worker-C70QJ04y.js.map +1 -0
- package/dist/assets/indicator.worker-bv0zC4EX.js +2 -0
- package/dist/assets/indicator.worker-bv0zC4EX.js.map +1 -0
- package/dist/axisFormat-SPX-CD5s.js +200 -0
- package/dist/axisFormat-SPX-CD5s.js.map +1 -0
- package/dist/core/InteractionManager.d.ts +1 -0
- package/dist/core/OverlayRenderer.d.ts +13 -0
- package/dist/core/chart/ChartAlerts.d.ts +42 -0
- package/dist/core/chart/ChartCore.d.ts +24 -1
- package/dist/core/chart/ChartRenderLoop.d.ts +9 -2
- package/dist/core/chart/ChartRenderer.d.ts +8 -2
- package/dist/core/chart/candlestickMarkers.d.ts +23 -0
- package/dist/core/chart/heikinAshi.d.ts +10 -0
- package/dist/core/chart/positionLines.d.ts +12 -0
- package/dist/core/chart/series/types.d.ts +2 -2
- package/dist/core/chart/types.d.ts +9 -0
- package/dist/core/format/axisFormat.d.ts +2 -1
- package/dist/core/indicator/addIndicator.d.ts +36 -0
- package/dist/core/indicator/index.d.ts +2 -0
- package/dist/core/indicator/indicatorPresets.d.ts +45 -0
- package/dist/core/series/Series.d.ts +3 -0
- package/dist/core/stacked/types.d.ts +8 -0
- package/dist/core/time/TimeScale.d.ts +31 -0
- package/dist/core/time/applyTimeScale.d.ts +10 -0
- package/dist/createStackedChart-DJSmqerD.js +706 -0
- package/dist/createStackedChart-DJSmqerD.js.map +1 -0
- package/dist/gpu/adapter/gpuRenderer.d.ts +21 -0
- package/dist/gpu/backends/webgpu/WebGPUBackend.d.ts +2 -1
- package/dist/gpuRenderer-BpaMYz-k.js +1848 -0
- package/dist/gpuRenderer-BpaMYz-k.js.map +1 -0
- package/dist/{index-DjeWClO9.js → index-CWipqOLP.js} +2 -2
- package/dist/{index-DjeWClO9.js.map → index-CWipqOLP.js.map} +1 -1
- package/dist/index-D7dTq6VB.js +503 -0
- package/dist/index-D7dTq6VB.js.map +1 -0
- package/dist/{index-Ce2JgkH_.js → index-DoYxf1cV.js} +86 -43
- package/dist/{index-Ce2JgkH_.js.map → index-DoYxf1cV.js.map} +1 -1
- package/dist/{index.core-C_-CFftD.js → index.core-fpZ1dYN0.js} +3 -3
- package/dist/{index.core-C_-CFftD.js.map → index.core-fpZ1dYN0.js.map} +1 -1
- package/dist/index.d.ts +17 -4
- package/dist/indicators--eJGmVox.js +302 -0
- package/dist/indicators--eJGmVox.js.map +1 -0
- package/dist/mockDatafeed-Cdg5hKEo.js +511 -0
- package/dist/mockDatafeed-Cdg5hKEo.js.map +1 -0
- package/dist/plugins/analysis.js +530 -807
- package/dist/plugins/analysis.js.map +1 -1
- package/dist/plugins/caching.js +26 -21
- package/dist/plugins/caching.js.map +1 -1
- package/dist/plugins/drawing-tools/index.d.ts +29 -0
- package/dist/plugins/drawing-tools/measure.d.ts +21 -0
- package/dist/plugins/drawing-tools/snapToCandle.d.ts +21 -0
- package/dist/plugins/gpu.js +202 -1895
- package/dist/plugins/gpu.js.map +1 -1
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/keyboard/index.d.ts +1 -7
- package/dist/plugins/keyboard.js +1 -1
- package/dist/plugins/lazy-load/types.d.ts +7 -0
- package/dist/plugins/lazy-load.js +131 -108
- package/dist/plugins/lazy-load.js.map +1 -1
- package/dist/plugins/replay/index.d.ts +19 -0
- package/dist/plugins/tools.js +1 -1
- package/dist/plugins/virtualization/types.d.ts +12 -0
- package/dist/plugins/virtualization.js +1 -1
- package/dist/pool-15HMCNv8.js +88 -0
- package/dist/pool-15HMCNv8.js.map +1 -0
- package/dist/react.js +5 -5
- package/dist/renderer/CandlestickRenderer.d.ts +1 -1
- package/dist/renderer/ChartSeriesRenderer.d.ts +6 -0
- package/dist/renderer/GpuChartRenderer.d.ts +23 -0
- package/dist/renderer/index.d.ts +3 -0
- package/dist/renderer/spike/WebGLGridSpike.d.ts +40 -0
- package/dist/testing/baselines/v1.15.0.json.d.ts +51 -0
- package/dist/testing/gridSpikeBenchmark.d.ts +49 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/rendererBenchmark.d.ts +13 -0
- package/dist/testing/stage1BrowserBench.d.ts +42 -0
- package/dist/trading/datafeed.d.ts +48 -0
- package/dist/trading/index.d.ts +29 -0
- package/dist/trading/mockDatafeed.d.ts +9 -0
- package/dist/trading/ohlcvGenerator.d.ts +25 -0
- package/dist/trading.d.ts +1 -0
- package/dist/trading.js +95 -0
- package/dist/trading.js.map +1 -0
- package/dist/types.d.ts +22 -2
- package/dist/velo-plot.full.js +1088 -776
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +15 -15
- package/dist/workers/downsample.d.ts +38 -0
- package/dist/workers/downsampleAsync.d.ts +6 -0
- package/dist/workers/indicator.worker.d.ts +32 -0
- package/dist/workers/indicatorsAsync.d.ts +26 -0
- package/dist/workers/pool.d.ts +36 -0
- package/package.json +23 -1
- package/dist/ChartCore-BimVvUEg.js.map +0 -1
- package/dist/axisFormat-B7o_uIEA.js +0 -127
- package/dist/axisFormat-B7o_uIEA.js.map +0 -1
- package/dist/createStackedChart-CjsKcOvX.js +0 -1088
- package/dist/createStackedChart-CjsKcOvX.js.map +0 -1
- package/dist/index-ChgIdk3N.js +0 -229
- package/dist/index-ChgIdk3N.js.map +0 -1
package/dist/velo-plot.full.js
CHANGED
|
@@ -1,56 +1,61 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import { A as
|
|
6
|
-
import { E as
|
|
7
|
-
import { AnnotationManager as
|
|
8
|
-
import { d as
|
|
9
|
-
import { e as
|
|
10
|
-
import {
|
|
11
|
-
import { P as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var ve = (n, e, t) => e in n ? xe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Y = (n, e, t) => ve(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { D as ee, j as O, s as te, O as Pe } from "./ChartCore-BhQ4j7f5.js";
|
|
5
|
+
import { A as St, C as Tt, l as bt, G as At, f as Mt, E as Ct, L as Ft, u as Dt, z as Et, N as It, a5 as Lt, H as kt, S as Rt, U as Xt, a as Yt, Z as Bt, a0 as _t, b as Gt, g as Wt, a3 as zt, K as Ut, e as $t, d as Ot, a1 as Ht, c as qt, $ as Nt, N as Vt, a4 as Kt, v as jt, B as Jt, J as Qt, P as Zt, _ as en, a2 as tn, k as nn, X as an, I as on, p as rn, o as sn, F as ln, x as cn, Y as dn, n as un, m as fn, y as gn, q as pn, t as hn, V as mn, W as yn, Q as xn, R as vn, T as Pn, w as wn } from "./ChartCore-BhQ4j7f5.js";
|
|
6
|
+
import { E as Tn, c as bn, b as An, f as Mn, i as Cn, a as Fn, m as Dn } from "./axisFormat-SPX-CD5s.js";
|
|
7
|
+
import { AnnotationManager as In, PluginAnnotations as Ln } from "./plugins/annotations.js";
|
|
8
|
+
import { d as G } from "./index.core-fpZ1dYN0.js";
|
|
9
|
+
import { e as Rn, h as Xn, f as Yn, c as Bn, a as _n, g as Gn, b as Wn, l as zn, r as Un, v as $n } from "./index.core-fpZ1dYN0.js";
|
|
10
|
+
import { G as Hn, S as qn, a as Nn, W as Vn, c as Kn, p as jn } from "./gpuRenderer-BpaMYz-k.js";
|
|
11
|
+
import { P as Qn, a as Zn, T as ea, g as ta } from "./index-CWipqOLP.js";
|
|
12
|
+
import { P as aa, c as oa, e as ra, d as ia, g as sa, a as la, l as ca, m as da, b as ua, o as fa, s as ga, u as pa } from "./index-D7dTq6VB.js";
|
|
13
|
+
import { W as ma, n as ya } from "./pool-15HMCNv8.js";
|
|
14
|
+
import { PluginAnalysis as va, analyzeComplexSpectrum as Pa, analyzeSpectrum as wa, arraysToComplex as Sa, autoCorrelation as Ta, bandPassFilter as ba, bandStopFilter as Aa, blackmanWindow as Ma, butterworth as Ca, complexToArrays as Fa, crossCorrelation as Da, detectAnomalies as Ea, dominantFrequency as Ia, exponentialMovingAverage as La, fft as ka, fftFromComplexInput as Ra, gaussianSmooth as Xa, getPositiveFrequencies as Ya, hammingWindow as Ba, hanningWindow as _a, highPassFilter as Ga, ifft as Wa, ifftComplex as za, ifftFromArrays as Ua, lowPassFilter as $a, medianFilter as Oa, nextPowerOf2 as Ha, powerSpectrum as qa, savitzkyGolay as Na, simpsonsIntegration as Va, singleFrequencyFilter as Ka, tTest as ja, trapezoidalIntegration as Ja } from "./plugins/analysis.js";
|
|
15
|
+
import { B as Za, C as eo, P as to, a as no, e as ao, g as oo, b as ro, d as io, f as so, c as lo } from "./index-BMiZoKmm.js";
|
|
16
|
+
import { S as uo, u as fo } from "./SciPlot-GJvw7GJo.js";
|
|
15
17
|
import "react";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
|
|
18
|
+
import { a as po, S as ho, c as mo } from "./createStackedChart-DJSmqerD.js";
|
|
19
|
+
import { BaseBufferStore as xo, BaseTextureStore as vo, GpuBenchmark as Po, GpuCompute as wo, PipelineCache as So, PluginGpu as To } from "./plugins/gpu.js";
|
|
20
|
+
import { b as Ao, L as Mo, a as Co, c as Fo, f as Do, d as Eo, e as Io, i as Lo, g as ko, h as Ro, r as Xo, s as Yo } from "./index-x4stH3jD.js";
|
|
21
|
+
import { D as _o, K as Go, P as Wo, c as zo, p as Uo } from "./index-DoYxf1cV.js";
|
|
22
|
+
import { ClipboardManager as Oo, PluginClipboard as Ho, copyToClipboard as qo, formatData as No, getClipboardManager as Vo } from "./plugins/clipboard.js";
|
|
23
|
+
import { DebugOverlay as jo, PluginDebug as Jo, createDebugOverlay as Qo, enableDebugMode as Zo } from "./plugins/debug.js";
|
|
24
|
+
import { L as tr, P as nr, c as ar, s as or, a as rr } from "./index-qhscKTDy.js";
|
|
25
|
+
import { C as sr, c as lr, a as cr, l as dr } from "./index-CUGS98p4.js";
|
|
26
|
+
import { P as fr, a as gr, b as pr, c as hr } from "./mockDatafeed-Cdg5hKEo.js";
|
|
27
|
+
import { P as yr, b as xr, T as vr, c as Pr, a as wr, g as Sr } from "./index-Dag88bW4.js";
|
|
28
|
+
import { c as br, a as Ar, b as Mr, d as Cr, h as Fr, e as Dr, f as Er, g as Ir, i as Lr, m as kr, s as Rr, v as Xr } from "./utils-BK5UUXxj.js";
|
|
29
|
+
import { a as Br, c as _r, d as Gr, i as Wr, s as zr } from "./math-Ddm2EZjj.js";
|
|
30
|
+
import { i as $r, j as Or, g as Hr, f as qr, k as Nr, d as Vr, e as Kr, m as jr, c as Jr, n as Qr, o as Zr, p as ei, b as ti, r as ni, s as ai, h as oi, a as ri, t as ii, v as si, w as li } from "./indicators--eJGmVox.js";
|
|
31
|
+
import { Plugin3D as di } from "./plugins/3d.js";
|
|
32
|
+
import { PluginI18n as fi } from "./plugins/i18n.js";
|
|
33
|
+
import { PluginSync as pi } from "./plugins/sync.js";
|
|
34
|
+
import { PluginDataExport as mi } from "./plugins/data-export.js";
|
|
35
|
+
import { PluginContextMenu as xi } from "./plugins/context-menu.js";
|
|
36
|
+
import { PluginAnomalyDetection as Pi } from "./plugins/anomaly-detection.js";
|
|
37
|
+
import { PluginMLIntegration as Si } from "./plugins/ml-integration.js";
|
|
38
|
+
import { PluginPatternRecognition as bi } from "./plugins/pattern-recognition.js";
|
|
39
|
+
import { PluginRegression as Mi } from "./plugins/regression.js";
|
|
40
|
+
import { PluginRadar as Fi } from "./plugins/radar.js";
|
|
41
|
+
import { PluginSnapshot as Ei } from "./plugins/snapshot.js";
|
|
42
|
+
import { PluginDataTransform as Li } from "./plugins/data-transform.js";
|
|
43
|
+
import { PluginLaTeX as Ri } from "./plugins/latex.js";
|
|
44
|
+
import { PluginCaching as Yi } from "./plugins/caching.js";
|
|
45
|
+
import { PluginLazyLoad as _i } from "./plugins/lazy-load.js";
|
|
46
|
+
import { PluginBrokenAxis as Wi } from "./plugins/broken-axis.js";
|
|
47
|
+
import { PluginVideoRecorder as Ui } from "./plugins/video-recorder.js";
|
|
48
|
+
import { PluginOffscreen as Oi } from "./plugins/offscreen.js";
|
|
49
|
+
import { PluginROI as qi } from "./plugins/roi.js";
|
|
50
|
+
import { PluginForecasting as Vi } from "./plugins/forecasting.js";
|
|
51
|
+
class ae {
|
|
47
52
|
constructor(e, t = {}) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.canvas = e, this.available =
|
|
53
|
+
Y(this, "available");
|
|
54
|
+
Y(this, "canvas");
|
|
55
|
+
Y(this, "adapter");
|
|
56
|
+
Y(this, "device");
|
|
57
|
+
Y(this, "context");
|
|
58
|
+
this.canvas = e, this.available = ae.isSupported();
|
|
54
59
|
}
|
|
55
60
|
static isSupported() {
|
|
56
61
|
return typeof globalThis.navigator < "u" && typeof globalThis.navigator.gpu < "u";
|
|
@@ -64,14 +69,14 @@ class Q {
|
|
|
64
69
|
}), !this.adapter)
|
|
65
70
|
throw new Error("[SciPlot] Failed to request WebGPU adapter");
|
|
66
71
|
this.device = await this.adapter.requestDevice();
|
|
67
|
-
const
|
|
68
|
-
if (!
|
|
72
|
+
const o = this.canvas.getContext("webgpu");
|
|
73
|
+
if (!o)
|
|
69
74
|
throw new Error("[SciPlot] Failed to get WebGPU context");
|
|
70
|
-
this.context =
|
|
71
|
-
const
|
|
75
|
+
this.context = o;
|
|
76
|
+
const r = e.preferredFormat ?? (t.getPreferredCanvasFormat ? t.getPreferredCanvasFormat() : "bgra8unorm");
|
|
72
77
|
this.context.configure({
|
|
73
78
|
device: this.device,
|
|
74
|
-
format:
|
|
79
|
+
format: r,
|
|
75
80
|
alphaMode: "premultiplied"
|
|
76
81
|
});
|
|
77
82
|
}
|
|
@@ -79,128 +84,128 @@ class Q {
|
|
|
79
84
|
this.device = void 0, this.adapter = void 0, this.context = void 0;
|
|
80
85
|
}
|
|
81
86
|
}
|
|
82
|
-
const
|
|
87
|
+
const we = {
|
|
83
88
|
name: "crosshair",
|
|
84
89
|
version: "1.0.0",
|
|
85
90
|
description: "Interactive crosshair that follows mouse cursor",
|
|
86
91
|
provides: ["interaction", "visualization"],
|
|
87
92
|
tags: ["cursor", "crosshair", "tooltip"]
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
(
|
|
93
|
+
}, Se = G(
|
|
94
|
+
we,
|
|
95
|
+
(n = {}) => {
|
|
91
96
|
const {
|
|
92
97
|
showVertical: e = !0,
|
|
93
98
|
showHorizontal: t = !0,
|
|
94
|
-
color:
|
|
95
|
-
lineStyle:
|
|
96
|
-
lineWidth:
|
|
97
|
-
snapToData:
|
|
99
|
+
color: o,
|
|
100
|
+
lineStyle: r = "dashed",
|
|
101
|
+
lineWidth: a = 1,
|
|
102
|
+
snapToData: d = !1,
|
|
98
103
|
valueFormat: c = { xPrecision: 4, yPrecision: 4 }
|
|
99
|
-
} =
|
|
100
|
-
let i =
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
let
|
|
104
|
+
} = n;
|
|
105
|
+
let i = n.valueDisplayMode ?? "disabled";
|
|
106
|
+
n.showAxisLabels !== void 0 && n.valueDisplayMode === void 0 && (i = n.showAxisLabels ? "floating" : "disabled");
|
|
107
|
+
const s = n.cornerPosition ?? "top-left";
|
|
108
|
+
let u = -1, h = -1, S, v = null, p = null;
|
|
104
109
|
return {
|
|
105
|
-
onInit(
|
|
106
|
-
|
|
107
|
-
const
|
|
110
|
+
onInit(f) {
|
|
111
|
+
S = "crosshair-overlay";
|
|
112
|
+
const l = f.ui.createOverlay(S, {
|
|
108
113
|
zIndex: 500,
|
|
109
114
|
position: { top: "0", left: "0", right: "0", bottom: "0" }
|
|
110
115
|
});
|
|
111
|
-
v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;",
|
|
116
|
+
v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;", l.appendChild(v), p = v.getContext("2d"), w(f);
|
|
112
117
|
},
|
|
113
|
-
onDestroy(
|
|
114
|
-
|
|
118
|
+
onDestroy(f) {
|
|
119
|
+
f.ui.removeOverlay(S), v = null, p = null;
|
|
115
120
|
},
|
|
116
|
-
onResize(
|
|
117
|
-
|
|
121
|
+
onResize(f) {
|
|
122
|
+
w(f);
|
|
118
123
|
},
|
|
119
|
-
onInteraction(
|
|
120
|
-
if (
|
|
121
|
-
if (
|
|
122
|
-
const P =
|
|
123
|
-
P && (
|
|
124
|
+
onInteraction(f, l) {
|
|
125
|
+
if (l.type === "mousemove") {
|
|
126
|
+
if (u = l.pixelX, h = l.pixelY, d && l.inPlotArea) {
|
|
127
|
+
const P = f.coords.pickPoint(u, h);
|
|
128
|
+
P && (u = P.pixelX, h = P.pixelY);
|
|
124
129
|
}
|
|
125
|
-
|
|
130
|
+
b(f);
|
|
126
131
|
}
|
|
127
132
|
},
|
|
128
133
|
onViewChange() {
|
|
129
134
|
}
|
|
130
135
|
};
|
|
131
|
-
function
|
|
136
|
+
function w(f) {
|
|
132
137
|
if (!v || !p) return;
|
|
133
|
-
const
|
|
134
|
-
v.width =
|
|
138
|
+
const l = f.render.canvasSize, P = f.render.pixelRatio;
|
|
139
|
+
v.width = l.width * P, v.height = l.height * P, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(P, P);
|
|
135
140
|
}
|
|
136
|
-
function
|
|
137
|
-
var
|
|
141
|
+
function b(f) {
|
|
142
|
+
var C;
|
|
138
143
|
if (!p || !v) return;
|
|
139
|
-
const { width:
|
|
140
|
-
if (p.clearRect(0, 0,
|
|
141
|
-
const x =
|
|
142
|
-
if (
|
|
144
|
+
const { width: l, height: P } = f.render.canvasSize;
|
|
145
|
+
if (p.clearRect(0, 0, l, P), u < 0 || h < 0) return;
|
|
146
|
+
const x = f.render.plotArea;
|
|
147
|
+
if (u < x.x || u > x.x + x.width || h < x.y || h > x.y + x.height)
|
|
143
148
|
return;
|
|
144
|
-
const D =
|
|
145
|
-
p.save(), p.strokeStyle = D, p.lineWidth =
|
|
149
|
+
const D = o || ((C = f.ui.theme.cursor) == null ? void 0 : C.color) || "#888888";
|
|
150
|
+
p.save(), p.strokeStyle = D, p.lineWidth = a, r === "dashed" ? p.setLineDash([6, 4]) : r === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(u, x.y), p.lineTo(u, x.y + x.height), p.stroke()), t && (p.beginPath(), p.moveTo(x.x, h), p.lineTo(x.x + x.width, h), p.stroke()), p.restore(), i === "floating" ? g(f, p, u, h, D) : i === "corner" && y(f, p, u, h, D);
|
|
146
151
|
}
|
|
147
|
-
function g(
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
152
|
+
function g(f, l, P, x, D) {
|
|
153
|
+
const C = f.coords.pixelToDataX(P), B = f.coords.pixelToDataY(x), M = f.render.plotArea;
|
|
154
|
+
l.save(), l.font = "11px system-ui, sans-serif", l.textAlign = "center", l.textBaseline = "top";
|
|
155
|
+
const _ = C.toPrecision(c.xPrecision), A = l.measureText(_).width + 8, T = 18, I = P - A / 2, F = M.y + M.height + 2;
|
|
156
|
+
l.fillStyle = D, l.fillRect(I, F, A, T), l.fillStyle = "#ffffff", l.fillText(_, P, F + 3), l.textAlign = "right", l.textBaseline = "middle";
|
|
157
|
+
const k = B.toPrecision(c.yPrecision), X = l.measureText(k).width + 8, L = 18, R = M.x - X - 2, U = x - L / 2;
|
|
158
|
+
l.fillStyle = D, l.fillRect(R, U, X, L), l.fillStyle = "#ffffff", l.fillText(k, M.x - 6, x), l.restore();
|
|
154
159
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
let L,
|
|
160
|
-
switch (
|
|
160
|
+
function y(f, l, P, x, D) {
|
|
161
|
+
const C = f.coords.pixelToDataX(P), B = f.coords.pixelToDataY(x), M = f.render.plotArea;
|
|
162
|
+
l.save(), l.font = "11px system-ui, sans-serif";
|
|
163
|
+
const _ = `X: ${C.toPrecision(c.xPrecision)}`, m = `Y: ${B.toPrecision(c.yPrecision)}`, A = l.measureText(_), T = l.measureText(m), I = Math.max(A.width, T.width), F = 6, k = 16, E = I + F * 2, X = k * 2 + F * 2;
|
|
164
|
+
let L, R;
|
|
165
|
+
switch (s) {
|
|
161
166
|
case "top-left":
|
|
162
|
-
L = M.x + 8,
|
|
167
|
+
L = M.x + 8, R = M.y + 8;
|
|
163
168
|
break;
|
|
164
169
|
case "top-right":
|
|
165
|
-
L = M.x + M.width - E - 8,
|
|
170
|
+
L = M.x + M.width - E - 8, R = M.y + 8;
|
|
166
171
|
break;
|
|
167
172
|
case "bottom-left":
|
|
168
|
-
L = M.x + 8,
|
|
173
|
+
L = M.x + 8, R = M.y + M.height - X - 8;
|
|
169
174
|
break;
|
|
170
175
|
case "bottom-right":
|
|
171
|
-
L = M.x + M.width - E - 8,
|
|
176
|
+
L = M.x + M.width - E - 8, R = M.y + M.height - X - 8;
|
|
172
177
|
break;
|
|
173
178
|
default:
|
|
174
|
-
L = M.x + 8,
|
|
179
|
+
L = M.x + 8, R = M.y + 8;
|
|
175
180
|
}
|
|
176
|
-
|
|
181
|
+
l.fillStyle = D, l.globalAlpha = 0.85, l.fillRect(L, R, E, X), l.globalAlpha = 1, l.strokeStyle = "rgba(255,255,255,0.3)", l.lineWidth = 1, l.strokeRect(L, R, E, X), l.fillStyle = "#ffffff", l.textAlign = "left", l.textBaseline = "top", l.fillText(_, L + F, R + F), l.fillText(m, L + F, R + F + k), l.restore();
|
|
177
182
|
}
|
|
178
183
|
}
|
|
179
|
-
),
|
|
184
|
+
), Te = {
|
|
180
185
|
name: "statistics-overlay",
|
|
181
186
|
version: "1.0.0",
|
|
182
187
|
description: "Displays real-time statistics for chart data",
|
|
183
188
|
provides: ["visualization", "analysis"],
|
|
184
189
|
tags: ["statistics", "overlay", "analytics"]
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
(
|
|
190
|
+
}, be = G(
|
|
191
|
+
Te,
|
|
192
|
+
(n = {}) => {
|
|
188
193
|
const {
|
|
189
194
|
position: e = "top-right",
|
|
190
195
|
show: t = ["count", "mean", "min", "max"],
|
|
191
|
-
seriesId:
|
|
192
|
-
autoUpdate:
|
|
193
|
-
} =
|
|
194
|
-
let
|
|
196
|
+
seriesId: o,
|
|
197
|
+
autoUpdate: r = !0
|
|
198
|
+
} = n;
|
|
199
|
+
let a, d = null;
|
|
195
200
|
return {
|
|
196
|
-
onInit(
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
e.includes("top") && (
|
|
201
|
+
onInit(s) {
|
|
202
|
+
a = "stats-overlay";
|
|
203
|
+
const u = {};
|
|
204
|
+
e.includes("top") && (u.top = "10px"), e.includes("bottom") && (u.bottom = "10px"), e.includes("left") && (u.left = "10px"), e.includes("right") && (u.right = "10px"), d = s.ui.createOverlay(a, {
|
|
200
205
|
zIndex: 800,
|
|
201
|
-
position:
|
|
206
|
+
position: u,
|
|
202
207
|
pointerEvents: !1
|
|
203
|
-
}),
|
|
208
|
+
}), d.innerHTML = `
|
|
204
209
|
<div style="
|
|
205
210
|
background: rgba(0, 0, 0, 0.85);
|
|
206
211
|
color: #fff;
|
|
@@ -214,176 +219,176 @@ const ge = {
|
|
|
214
219
|
<div style="font-weight: bold; margin-bottom: 4px; color: #4ade80;">📊 Statistics</div>
|
|
215
220
|
<div class="stats-content"></div>
|
|
216
221
|
</div>
|
|
217
|
-
`, c(
|
|
222
|
+
`, c(s);
|
|
218
223
|
},
|
|
219
|
-
onDestroy(
|
|
220
|
-
|
|
224
|
+
onDestroy(s) {
|
|
225
|
+
s.ui.removeOverlay(a), d = null;
|
|
221
226
|
},
|
|
222
|
-
onDataUpdate(
|
|
223
|
-
|
|
227
|
+
onDataUpdate(s) {
|
|
228
|
+
r && c(s);
|
|
224
229
|
},
|
|
225
|
-
onSeriesAdd(
|
|
226
|
-
c(
|
|
230
|
+
onSeriesAdd(s) {
|
|
231
|
+
c(s);
|
|
227
232
|
},
|
|
228
|
-
onSeriesRemove(
|
|
229
|
-
c(
|
|
233
|
+
onSeriesRemove(s) {
|
|
234
|
+
c(s);
|
|
230
235
|
},
|
|
231
236
|
api: {
|
|
232
|
-
refresh(
|
|
233
|
-
c(
|
|
237
|
+
refresh(s) {
|
|
238
|
+
c(s);
|
|
234
239
|
}
|
|
235
240
|
}
|
|
236
241
|
};
|
|
237
|
-
function c(
|
|
242
|
+
function c(s) {
|
|
243
|
+
if (!d) return;
|
|
244
|
+
const u = d.querySelector(".stats-content");
|
|
238
245
|
if (!u) return;
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
|
|
242
|
-
if (b.length === 0) {
|
|
243
|
-
f.innerHTML = "<div style='color: #888'>No data</div>";
|
|
246
|
+
const h = s.data.getAllSeries(), S = o ? h.filter((b) => b.getId() === o) : h;
|
|
247
|
+
if (S.length === 0) {
|
|
248
|
+
u.innerHTML = "<div style='color: #888'>No data</div>";
|
|
244
249
|
return;
|
|
245
250
|
}
|
|
246
251
|
let v = [];
|
|
247
|
-
if (
|
|
248
|
-
const g =
|
|
252
|
+
if (S.forEach((b) => {
|
|
253
|
+
const g = b.getData();
|
|
249
254
|
g != null && g.y && (v = v.concat(Array.from(g.y)));
|
|
250
255
|
}), v.length === 0) {
|
|
251
|
-
|
|
256
|
+
u.innerHTML = "<div style='color: #888'>No data</div>";
|
|
252
257
|
return;
|
|
253
258
|
}
|
|
254
|
-
const p = i(v),
|
|
255
|
-
t.includes("count") &&
|
|
259
|
+
const p = i(v), w = [];
|
|
260
|
+
t.includes("count") && w.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), t.includes("mean") && w.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), t.includes("min") && w.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), t.includes("max") && w.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), t.includes("std") && w.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), t.includes("range") && w.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), u.innerHTML = w.join("");
|
|
256
261
|
}
|
|
257
|
-
function i(
|
|
258
|
-
const
|
|
259
|
-
let
|
|
260
|
-
for (const g of
|
|
261
|
-
|
|
262
|
-
const p =
|
|
263
|
-
let
|
|
264
|
-
for (const g of
|
|
265
|
-
|
|
266
|
-
const
|
|
262
|
+
function i(s) {
|
|
263
|
+
const u = s.length;
|
|
264
|
+
let h = 0, S = 1 / 0, v = -1 / 0;
|
|
265
|
+
for (const g of s)
|
|
266
|
+
h += g, g < S && (S = g), g > v && (v = g);
|
|
267
|
+
const p = h / u;
|
|
268
|
+
let w = 0;
|
|
269
|
+
for (const g of s)
|
|
270
|
+
w += (g - p) ** 2;
|
|
271
|
+
const b = Math.sqrt(w / u);
|
|
267
272
|
return {
|
|
268
|
-
count:
|
|
273
|
+
count: u,
|
|
269
274
|
mean: p,
|
|
270
|
-
min:
|
|
275
|
+
min: S,
|
|
271
276
|
max: v,
|
|
272
|
-
std:
|
|
273
|
-
range: v -
|
|
277
|
+
std: b,
|
|
278
|
+
range: v - S
|
|
274
279
|
};
|
|
275
280
|
}
|
|
276
281
|
}
|
|
277
|
-
),
|
|
282
|
+
), Ae = {
|
|
278
283
|
name: "watermark",
|
|
279
284
|
version: "1.0.0",
|
|
280
285
|
description: "Adds a customizable watermark to the chart",
|
|
281
286
|
provides: ["visualization"],
|
|
282
287
|
tags: ["watermark", "branding", "overlay"]
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
(
|
|
286
|
-
if (!(
|
|
288
|
+
}, Me = G(
|
|
289
|
+
Ae,
|
|
290
|
+
(n) => {
|
|
291
|
+
if (!(n != null && n.text))
|
|
287
292
|
throw new Error("WatermarkPlugin requires 'text' configuration");
|
|
288
293
|
const {
|
|
289
294
|
text: e,
|
|
290
295
|
fontSize: t = 48,
|
|
291
|
-
fontFamily:
|
|
292
|
-
color:
|
|
293
|
-
position:
|
|
294
|
-
rotation:
|
|
295
|
-
} =
|
|
296
|
+
fontFamily: o = "system-ui, sans-serif",
|
|
297
|
+
color: r = "rgba(128, 128, 128, 0.15)",
|
|
298
|
+
position: a = "center",
|
|
299
|
+
rotation: d = a === "center" ? -30 : 0
|
|
300
|
+
} = n;
|
|
296
301
|
return {
|
|
297
302
|
onRenderOverlay(c) {
|
|
298
303
|
const i = c.render.ctx2d;
|
|
299
304
|
if (!i) return;
|
|
300
305
|
c.render.canvasSize;
|
|
301
|
-
const
|
|
302
|
-
i.save(), i.font = `${t}px ${
|
|
303
|
-
let
|
|
304
|
-
|
|
306
|
+
const s = c.render.plotArea;
|
|
307
|
+
i.save(), i.font = `${t}px ${o}`, i.fillStyle = r, i.textAlign = "center", i.textBaseline = "middle";
|
|
308
|
+
let u, h;
|
|
309
|
+
a === "center" ? (u = s.x + s.width / 2, h = s.y + s.height / 2) : a === "bottom-right" ? (u = s.x + s.width - t, h = s.y + s.height - t / 2) : (u = s.x + t, h = s.y + s.height - t / 2), i.translate(u, h), i.rotate(d * Math.PI / 180), i.fillText(e, 0, 0), i.restore();
|
|
305
310
|
}
|
|
306
311
|
};
|
|
307
312
|
}
|
|
308
|
-
),
|
|
313
|
+
), Ce = {
|
|
309
314
|
name: "grid-highlight",
|
|
310
315
|
version: "1.0.0",
|
|
311
316
|
description: "Highlights specific regions of the chart grid",
|
|
312
317
|
provides: ["visualization"],
|
|
313
318
|
tags: ["grid", "highlight", "regions"]
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
(
|
|
317
|
-
const { xIntervals: e = [], yIntervals: t = [], opacity:
|
|
319
|
+
}, Fe = G(
|
|
320
|
+
Ce,
|
|
321
|
+
(n = {}) => {
|
|
322
|
+
const { xIntervals: e = [], yIntervals: t = [], opacity: o = 0.1 } = n;
|
|
318
323
|
return {
|
|
319
|
-
onRenderOverlay(
|
|
320
|
-
const
|
|
321
|
-
if (!
|
|
322
|
-
const c =
|
|
323
|
-
|
|
324
|
+
onRenderOverlay(r, a) {
|
|
325
|
+
const d = r.render.ctx2d;
|
|
326
|
+
if (!d) return;
|
|
327
|
+
const c = r.render.plotArea;
|
|
328
|
+
r.data.getViewBounds(), d.save(), d.beginPath(), d.rect(c.x, c.y, c.width, c.height), d.clip(), d.globalAlpha = o;
|
|
324
329
|
for (const i of e) {
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
Math.min(
|
|
330
|
+
const s = r.coords.dataToPixelX(i.start), u = r.coords.dataToPixelX(i.end);
|
|
331
|
+
d.fillStyle = i.color, d.fillRect(
|
|
332
|
+
Math.min(s, u),
|
|
328
333
|
c.y,
|
|
329
|
-
Math.abs(
|
|
334
|
+
Math.abs(u - s),
|
|
330
335
|
c.height
|
|
331
336
|
);
|
|
332
337
|
}
|
|
333
338
|
for (const i of t) {
|
|
334
|
-
const
|
|
335
|
-
|
|
339
|
+
const s = r.coords.dataToPixelY(i.start), u = r.coords.dataToPixelY(i.end);
|
|
340
|
+
d.fillStyle = i.color, d.fillRect(
|
|
336
341
|
c.x,
|
|
337
|
-
Math.min(
|
|
342
|
+
Math.min(s, u),
|
|
338
343
|
c.width,
|
|
339
|
-
Math.abs(
|
|
344
|
+
Math.abs(u - s)
|
|
340
345
|
);
|
|
341
346
|
}
|
|
342
|
-
|
|
347
|
+
d.restore();
|
|
343
348
|
}
|
|
344
349
|
};
|
|
345
350
|
}
|
|
346
|
-
),
|
|
351
|
+
), De = {
|
|
347
352
|
name: "data-logger",
|
|
348
353
|
version: "1.0.0",
|
|
349
354
|
description: "Logs chart events for debugging and analysis",
|
|
350
355
|
provides: ["analysis"],
|
|
351
356
|
tags: ["debug", "logging", "events"]
|
|
352
|
-
},
|
|
353
|
-
|
|
354
|
-
(
|
|
357
|
+
}, Ee = G(
|
|
358
|
+
De,
|
|
359
|
+
(n = {}) => {
|
|
355
360
|
const {
|
|
356
361
|
logDataUpdates: e = !0,
|
|
357
362
|
logViewChanges: t = !0,
|
|
358
|
-
logInteractions:
|
|
359
|
-
maxEntries:
|
|
360
|
-
} =
|
|
361
|
-
function
|
|
362
|
-
|
|
363
|
+
logInteractions: o = !1,
|
|
364
|
+
maxEntries: r = 100
|
|
365
|
+
} = n, a = [];
|
|
366
|
+
function d(c, i) {
|
|
367
|
+
a.push({
|
|
363
368
|
timestamp: Date.now(),
|
|
364
369
|
type: c,
|
|
365
370
|
data: i
|
|
366
|
-
}),
|
|
371
|
+
}), a.length > r && a.shift();
|
|
367
372
|
}
|
|
368
373
|
return {
|
|
369
374
|
onInit(c) {
|
|
370
375
|
c.log.info("Data logger initialized");
|
|
371
376
|
},
|
|
372
377
|
onDataUpdate(c, i) {
|
|
373
|
-
e && (
|
|
378
|
+
e && (d("dataUpdate", {
|
|
374
379
|
seriesId: i.seriesId,
|
|
375
380
|
mode: i.mode,
|
|
376
381
|
pointCount: i.pointCount
|
|
377
382
|
}), c.log.debug(`Data update: ${i.seriesId} (${i.mode}, ${i.pointCount} points)`));
|
|
378
383
|
},
|
|
379
384
|
onViewChange(c, i) {
|
|
380
|
-
t && (
|
|
385
|
+
t && (d("viewChange", {
|
|
381
386
|
trigger: i.trigger,
|
|
382
387
|
bounds: i.current
|
|
383
388
|
}), c.log.debug(`View change: ${i.trigger}`));
|
|
384
389
|
},
|
|
385
390
|
onInteraction(c, i) {
|
|
386
|
-
|
|
391
|
+
o && d("interaction", {
|
|
387
392
|
type: i.type,
|
|
388
393
|
pixelX: i.pixelX,
|
|
389
394
|
pixelY: i.pixelY,
|
|
@@ -391,147 +396,147 @@ const ge = {
|
|
|
391
396
|
});
|
|
392
397
|
},
|
|
393
398
|
onSerialize(c) {
|
|
394
|
-
return { entries:
|
|
399
|
+
return { entries: a };
|
|
395
400
|
},
|
|
396
401
|
onDeserialize(c, i) {
|
|
397
|
-
const
|
|
398
|
-
|
|
402
|
+
const s = i;
|
|
403
|
+
s != null && s.entries && (a.length = 0, a.push(...s.entries));
|
|
399
404
|
},
|
|
400
405
|
api: {
|
|
401
406
|
getEntries() {
|
|
402
|
-
return [...
|
|
407
|
+
return [...a];
|
|
403
408
|
},
|
|
404
409
|
clear() {
|
|
405
|
-
|
|
410
|
+
a.length = 0;
|
|
406
411
|
},
|
|
407
412
|
export() {
|
|
408
|
-
return JSON.stringify(
|
|
413
|
+
return JSON.stringify(a, null, 2);
|
|
409
414
|
}
|
|
410
415
|
}
|
|
411
416
|
};
|
|
412
417
|
}
|
|
413
|
-
),
|
|
418
|
+
), Ie = {
|
|
414
419
|
name: "direction-indicator",
|
|
415
420
|
version: "1.0.0",
|
|
416
421
|
description: "Shows an arrow indicating the direction and trend of streaming data",
|
|
417
422
|
provides: ["visualization", "analysis"],
|
|
418
423
|
tags: ["streaming", "direction", "trend", "arrow"]
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
(
|
|
424
|
+
}, Le = G(
|
|
425
|
+
Ie,
|
|
426
|
+
(n = {}) => {
|
|
422
427
|
const {
|
|
423
428
|
seriesId: e,
|
|
424
429
|
sampleSize: t = 20,
|
|
425
|
-
color:
|
|
426
|
-
size:
|
|
427
|
-
minVelocity:
|
|
428
|
-
historySize:
|
|
430
|
+
color: o,
|
|
431
|
+
size: r = 40,
|
|
432
|
+
minVelocity: a = 0.01,
|
|
433
|
+
historySize: d = 20,
|
|
429
434
|
idleTimeout: c
|
|
430
|
-
} =
|
|
431
|
-
let i,
|
|
432
|
-
const v = [], p = [],
|
|
433
|
-
let
|
|
435
|
+
} = n;
|
|
436
|
+
let i, s = null, u = null, h = null, S = null;
|
|
437
|
+
const v = [], p = [], w = [];
|
|
438
|
+
let b = d, g = null, y = Date.now(), f = -1 / 0, l = -1 / 0, P = c;
|
|
434
439
|
return {
|
|
435
|
-
onInit(
|
|
440
|
+
onInit(m) {
|
|
436
441
|
i = "direction-indicator-overlay";
|
|
437
|
-
const
|
|
442
|
+
const A = m.ui.createOverlay(i, {
|
|
438
443
|
zIndex: 600,
|
|
439
444
|
position: { top: "0", left: "0", right: "0", bottom: "0" },
|
|
440
445
|
pointerEvents: !1
|
|
441
446
|
});
|
|
442
|
-
if (
|
|
443
|
-
|
|
447
|
+
if (s = document.createElement("canvas"), s.style.cssText = "width: 100%; height: 100%; pointer-events: none;", A.appendChild(s), u = s.getContext("2d"), x(m), e)
|
|
448
|
+
S = e;
|
|
444
449
|
else {
|
|
445
|
-
const T =
|
|
446
|
-
T.length > 0 && (
|
|
450
|
+
const T = m.data.getAllSeries();
|
|
451
|
+
T.length > 0 && (S = T[0].getId());
|
|
447
452
|
}
|
|
448
453
|
},
|
|
449
|
-
onDestroy(
|
|
450
|
-
|
|
454
|
+
onDestroy(m) {
|
|
455
|
+
m.ui.removeOverlay(i), g && clearTimeout(g), s = null, u = null, h = null;
|
|
451
456
|
},
|
|
452
|
-
onResize(
|
|
453
|
-
x(
|
|
457
|
+
onResize(m) {
|
|
458
|
+
x(m);
|
|
454
459
|
},
|
|
455
|
-
onAfterRender(
|
|
456
|
-
if (D(
|
|
460
|
+
onAfterRender(m) {
|
|
461
|
+
if (D(m), M(m), P) {
|
|
457
462
|
g && clearTimeout(g);
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}, P -
|
|
463
|
+
const A = Date.now() - y;
|
|
464
|
+
A < P && (g = setTimeout(() => {
|
|
465
|
+
m.requestRender();
|
|
466
|
+
}, P - A + 10));
|
|
462
467
|
}
|
|
463
468
|
},
|
|
464
|
-
onConfigChange(
|
|
465
|
-
if (
|
|
466
|
-
for (
|
|
467
|
-
for (; p.length >
|
|
468
|
-
for (;
|
|
469
|
+
onConfigChange(m, A) {
|
|
470
|
+
if (A.historySize !== void 0) {
|
|
471
|
+
for (b = A.historySize; v.length > b; ) v.shift();
|
|
472
|
+
for (; p.length > b; ) p.shift();
|
|
473
|
+
for (; w.length > b; ) w.shift();
|
|
469
474
|
}
|
|
470
|
-
|
|
475
|
+
A.idleTimeout !== void 0 && (P = A.idleTimeout);
|
|
471
476
|
}
|
|
472
477
|
};
|
|
473
|
-
function x(
|
|
474
|
-
if (!
|
|
475
|
-
const
|
|
476
|
-
|
|
478
|
+
function x(m) {
|
|
479
|
+
if (!s || !u) return;
|
|
480
|
+
const A = m.render.canvasSize, T = m.render.pixelRatio;
|
|
481
|
+
s.width = A.width * T, s.height = A.height * T, u.setTransform(1, 0, 0, 1, 0, 0), u.scale(T, T);
|
|
477
482
|
}
|
|
478
|
-
function D(
|
|
479
|
-
if (!
|
|
480
|
-
const T =
|
|
483
|
+
function D(m) {
|
|
484
|
+
if (!S || !m.data.getSeries(S)) return;
|
|
485
|
+
const T = m.data.getSeriesData(S);
|
|
481
486
|
if (!T || !T.x || !T.y) return;
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
484
|
-
const
|
|
485
|
-
(
|
|
486
|
-
const E = Math.min(t,
|
|
487
|
-
let L = 0,
|
|
488
|
-
for (let
|
|
489
|
-
const
|
|
490
|
-
L +=
|
|
487
|
+
const I = T.x.length;
|
|
488
|
+
if (I < 2) return;
|
|
489
|
+
const F = T.x[I - 1], k = T.y[I - 1];
|
|
490
|
+
(F !== f || k !== l) && (f = F, l = k, y = Date.now());
|
|
491
|
+
const E = Math.min(t, I), X = I - E;
|
|
492
|
+
let L = 0, R = 0, U = 0, K = 0, j = 0, J = 0;
|
|
493
|
+
for (let W = X; W < I; W++) {
|
|
494
|
+
const z = W - X, me = T.x[W], ye = T.y[W], Q = m.coords.dataToPixelX(me), Z = m.coords.dataToPixelY(ye);
|
|
495
|
+
L += z, R += Q, U += Z, K += z * Q, j += z * Z, J += z * z;
|
|
491
496
|
}
|
|
492
|
-
const
|
|
493
|
-
if (Math.abs(
|
|
494
|
-
const
|
|
495
|
-
v.push(
|
|
496
|
-
const
|
|
497
|
-
|
|
497
|
+
const $ = L / E, se = R / E, le = U / E, H = J - E * $ * $;
|
|
498
|
+
if (Math.abs(H) < 1e-10) return;
|
|
499
|
+
const q = (K - E * $ * se) / H, N = (j - E * $ * le) / H, ce = Math.atan2(N, q), de = m.coords.dataToPixelX(F), ue = m.coords.dataToPixelY(k);
|
|
500
|
+
v.push(de), p.push(ue), v.length > b && (v.shift(), p.shift()), w.push(ce), w.length > b && w.shift();
|
|
501
|
+
const fe = C(v), ge = C(p), pe = B(w), he = Math.sqrt(q * q + N * N);
|
|
502
|
+
h = { angle: pe, magnitude: he, lastX: F, lastY: k, smoothX: fe, smoothY: ge };
|
|
498
503
|
}
|
|
499
|
-
function
|
|
500
|
-
return
|
|
504
|
+
function C(m) {
|
|
505
|
+
return m.length === 0 ? 0 : m.reduce((A, T) => A + T, 0) / m.length;
|
|
501
506
|
}
|
|
502
|
-
function
|
|
503
|
-
if (
|
|
504
|
-
let
|
|
505
|
-
for (const
|
|
506
|
-
|
|
507
|
-
return Math.atan2(T /
|
|
507
|
+
function B(m) {
|
|
508
|
+
if (m.length === 0) return 0;
|
|
509
|
+
let A = 0, T = 0;
|
|
510
|
+
for (const I of m)
|
|
511
|
+
A += Math.cos(I), T += Math.sin(I);
|
|
512
|
+
return Math.atan2(T / m.length, A / m.length);
|
|
508
513
|
}
|
|
509
|
-
function M(
|
|
510
|
-
if (!
|
|
511
|
-
const { width:
|
|
512
|
-
if (
|
|
513
|
-
const
|
|
514
|
-
|
|
514
|
+
function M(m) {
|
|
515
|
+
if (!u || !s || !h) return;
|
|
516
|
+
const { width: A, height: T } = m.render.canvasSize;
|
|
517
|
+
if (u.clearRect(0, 0, A, T), P !== void 0 && Date.now() - y > P || h.magnitude < a) return;
|
|
518
|
+
const I = h.smoothX, F = h.smoothY, k = o || "#FF9800";
|
|
519
|
+
u.save(), _(u, I, F, h.angle, r, k), u.restore();
|
|
515
520
|
}
|
|
516
|
-
function
|
|
517
|
-
const E =
|
|
518
|
-
|
|
521
|
+
function _(m, A, T, I, F, k) {
|
|
522
|
+
const E = F * 0.6, X = F * 0.4;
|
|
523
|
+
m.save(), m.translate(A, T), m.rotate(I), m.fillStyle = k, m.beginPath(), m.moveTo(E / 2, 0), m.lineTo(-E / 2, -X / 2), m.lineTo(-E / 2, X / 2), m.closePath(), m.fill(), m.restore();
|
|
519
524
|
}
|
|
520
525
|
}
|
|
521
|
-
),
|
|
522
|
-
Crosshair:
|
|
523
|
-
Statistics:
|
|
524
|
-
Watermark:
|
|
525
|
-
GridHighlight:
|
|
526
|
-
DataLogger:
|
|
527
|
-
DirectionIndicator:
|
|
528
|
-
},
|
|
526
|
+
), tt = {
|
|
527
|
+
Crosshair: Se,
|
|
528
|
+
Statistics: be,
|
|
529
|
+
Watermark: Me,
|
|
530
|
+
GridHighlight: Fe,
|
|
531
|
+
DataLogger: Ee,
|
|
532
|
+
DirectionIndicator: Le
|
|
533
|
+
}, ke = {
|
|
529
534
|
name: "velo-plot-drag-edit",
|
|
530
535
|
version: "1.0.0",
|
|
531
536
|
description: "Interactive drag & drop editing of data points",
|
|
532
537
|
provides: ["drag-edit", "point-editing"],
|
|
533
538
|
tags: ["interaction", "editing", "ux"]
|
|
534
|
-
},
|
|
539
|
+
}, Re = {
|
|
535
540
|
enabled: !0,
|
|
536
541
|
constraint: "both",
|
|
537
542
|
snapToGrid: !1,
|
|
@@ -556,89 +561,89 @@ const ge = {
|
|
|
556
561
|
opacity: 0.5
|
|
557
562
|
}
|
|
558
563
|
};
|
|
559
|
-
function
|
|
560
|
-
const e = { ...
|
|
561
|
-
let t = null,
|
|
562
|
-
function i(g,
|
|
564
|
+
function nt(n = {}) {
|
|
565
|
+
const e = { ...Re, ...n };
|
|
566
|
+
let t = null, o = !1, r = null, a = 0, d = 0, c = !1;
|
|
567
|
+
function i(g, y) {
|
|
563
568
|
if (!t) return null;
|
|
564
|
-
const
|
|
565
|
-
return !
|
|
566
|
-
seriesId:
|
|
567
|
-
index:
|
|
568
|
-
originalX:
|
|
569
|
-
originalY:
|
|
570
|
-
currentX:
|
|
571
|
-
currentY:
|
|
569
|
+
const f = t.coords.pickPoint(g, y, e.hitRadius);
|
|
570
|
+
return !f || e.editableSeries.length > 0 && !e.editableSeries.includes(f.seriesId) ? null : {
|
|
571
|
+
seriesId: f.seriesId,
|
|
572
|
+
index: f.index,
|
|
573
|
+
originalX: f.x,
|
|
574
|
+
originalY: f.y,
|
|
575
|
+
currentX: f.x,
|
|
576
|
+
currentY: f.y
|
|
572
577
|
};
|
|
573
578
|
}
|
|
574
|
-
function
|
|
579
|
+
function s(g, y) {
|
|
575
580
|
return t ? {
|
|
576
581
|
x: t.coords.pixelToDataX(g),
|
|
577
|
-
y: t.coords.pixelToDataY(
|
|
582
|
+
y: t.coords.pixelToDataY(y)
|
|
578
583
|
} : { x: 0, y: 0 };
|
|
579
584
|
}
|
|
580
|
-
function
|
|
581
|
-
return Math.round(g /
|
|
585
|
+
function u(g, y) {
|
|
586
|
+
return Math.round(g / y) * y;
|
|
582
587
|
}
|
|
583
|
-
function
|
|
584
|
-
if (!
|
|
585
|
-
switch (
|
|
588
|
+
function h(g, y, f) {
|
|
589
|
+
if (!r) return { x: g, y };
|
|
590
|
+
switch (f) {
|
|
586
591
|
case "x":
|
|
587
|
-
return { x: g, y:
|
|
592
|
+
return { x: g, y: r.originalY };
|
|
588
593
|
case "y":
|
|
589
|
-
return { x:
|
|
594
|
+
return { x: r.originalX, y };
|
|
590
595
|
case "none":
|
|
591
|
-
return { x:
|
|
596
|
+
return { x: r.originalX, y: r.originalY };
|
|
592
597
|
default:
|
|
593
|
-
return { x: g, y
|
|
598
|
+
return { x: g, y };
|
|
594
599
|
}
|
|
595
600
|
}
|
|
596
|
-
function
|
|
597
|
-
let
|
|
598
|
-
if (e.snapToGrid && (
|
|
599
|
-
const P = { ...
|
|
601
|
+
function S(g, y) {
|
|
602
|
+
let f = g, l = y;
|
|
603
|
+
if (e.snapToGrid && (f = u(g, e.snapIntervalX), l = u(y, e.snapIntervalY)), r && e.validator) {
|
|
604
|
+
const P = { ...r, currentX: f, currentY: l }, x = e.validator(P);
|
|
600
605
|
if (typeof x == "boolean")
|
|
601
|
-
return { x:
|
|
606
|
+
return { x: f, y: l, valid: x };
|
|
602
607
|
if (!x.valid)
|
|
603
|
-
return { x:
|
|
604
|
-
x.snapX !== void 0 && (
|
|
608
|
+
return { x: f, y: l, valid: !1 };
|
|
609
|
+
x.snapX !== void 0 && (f = x.snapX), x.snapY !== void 0 && (l = x.snapY);
|
|
605
610
|
}
|
|
606
|
-
return { x:
|
|
611
|
+
return { x: f, y: l, valid: !0 };
|
|
607
612
|
}
|
|
608
|
-
function v(g,
|
|
609
|
-
var D,
|
|
613
|
+
function v(g, y, f, l) {
|
|
614
|
+
var D, C, B;
|
|
610
615
|
if (!t) return;
|
|
611
|
-
const P = (
|
|
616
|
+
const P = (C = (D = t.chart).getSeries) == null ? void 0 : C.call(D, g);
|
|
612
617
|
if (!P) return;
|
|
613
618
|
const x = P.getData();
|
|
614
|
-
!x || !x.x || !x.y || (x.x[
|
|
619
|
+
!x || !x.x || !x.y || (x.x[y] = f, x.y[y] = l, (B = P.invalidateBuffers) == null || B.call(P), t.requestRender());
|
|
615
620
|
}
|
|
616
621
|
function p() {
|
|
617
|
-
return
|
|
618
|
-
seriesId:
|
|
619
|
-
index:
|
|
620
|
-
oldX:
|
|
621
|
-
oldY:
|
|
622
|
-
newX:
|
|
623
|
-
newY:
|
|
624
|
-
deltaX:
|
|
625
|
-
deltaY:
|
|
622
|
+
return r ? {
|
|
623
|
+
seriesId: r.seriesId,
|
|
624
|
+
index: r.index,
|
|
625
|
+
oldX: r.originalX,
|
|
626
|
+
oldY: r.originalY,
|
|
627
|
+
newX: r.currentX,
|
|
628
|
+
newY: r.currentY,
|
|
629
|
+
deltaX: r.currentX - r.originalX,
|
|
630
|
+
deltaY: r.currentY - r.originalY
|
|
626
631
|
} : null;
|
|
627
632
|
}
|
|
628
|
-
function
|
|
629
|
-
if (!
|
|
630
|
-
const { render:
|
|
631
|
-
if (!
|
|
632
|
-
|
|
633
|
-
const P =
|
|
634
|
-
|
|
633
|
+
function w(g) {
|
|
634
|
+
if (!o || !r || !e.showPreview) return;
|
|
635
|
+
const { render: y, coords: f } = g, { ctx2d: l } = y;
|
|
636
|
+
if (!l) return;
|
|
637
|
+
l.save();
|
|
638
|
+
const P = f.dataToPixelX(r.originalX), x = f.dataToPixelY(r.originalY), D = f.dataToPixelX(r.currentX), C = f.dataToPixelY(r.currentY);
|
|
639
|
+
l.strokeStyle = e.previewStyle.color || "#ffffff", l.lineWidth = e.previewStyle.width || 2, l.globalAlpha = e.previewStyle.opacity || 0.5, l.setLineDash(e.previewStyle.dash || [5, 5]), l.beginPath(), l.moveTo(P, x), l.lineTo(D, C), l.stroke(), l.globalAlpha = 1, l.fillStyle = e.highlightColor, l.setLineDash([]), l.beginPath(), l.arc(D, C, 6, 0, Math.PI * 2), l.fill(), l.strokeStyle = "#000000", l.lineWidth = 1, l.stroke(), l.restore();
|
|
635
640
|
}
|
|
636
|
-
const
|
|
641
|
+
const b = {
|
|
637
642
|
enable() {
|
|
638
643
|
e.enabled = !0;
|
|
639
644
|
},
|
|
640
645
|
disable() {
|
|
641
|
-
e.enabled = !1,
|
|
646
|
+
e.enabled = !1, o && (r = null, o = !1, c = !1, t == null || t.requestRender());
|
|
642
647
|
},
|
|
643
648
|
isEnabled() {
|
|
644
649
|
return e.enabled;
|
|
@@ -647,73 +652,363 @@ function Re(r = {}) {
|
|
|
647
652
|
e.editableSeries = g;
|
|
648
653
|
},
|
|
649
654
|
getDraggedPoint() {
|
|
650
|
-
return
|
|
655
|
+
return r;
|
|
651
656
|
},
|
|
652
657
|
cancelDrag() {
|
|
653
|
-
|
|
658
|
+
o && r && (r = null, o = !1, c = !1, t == null || t.requestRender());
|
|
654
659
|
},
|
|
655
660
|
updateConfig(g) {
|
|
656
661
|
Object.assign(e, g);
|
|
657
662
|
}
|
|
658
663
|
};
|
|
659
664
|
return {
|
|
660
|
-
manifest:
|
|
665
|
+
manifest: ke,
|
|
661
666
|
onInit(g) {
|
|
662
|
-
t = g, t.chart.dragEdit =
|
|
667
|
+
t = g, t.chart.dragEdit = b;
|
|
663
668
|
},
|
|
664
669
|
onDestroy(g) {
|
|
665
670
|
delete g.chart.dragEdit, t = null;
|
|
666
671
|
},
|
|
667
|
-
onInteraction(g,
|
|
672
|
+
onInteraction(g, y) {
|
|
668
673
|
if (e.enabled) {
|
|
669
|
-
if (
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
} else if (
|
|
673
|
-
if (!
|
|
674
|
-
if (!
|
|
675
|
-
const
|
|
676
|
-
if (Math.sqrt(
|
|
677
|
-
|
|
678
|
-
const
|
|
679
|
-
|
|
674
|
+
if (y.type === "mousedown") {
|
|
675
|
+
const f = i(y.pixelX, y.pixelY);
|
|
676
|
+
f && (r = f, a = y.pixelX, d = y.pixelY, c = !1, o = !1, y.preventDefault());
|
|
677
|
+
} else if (y.type === "mousemove") {
|
|
678
|
+
if (!r) return;
|
|
679
|
+
if (!o) {
|
|
680
|
+
const C = y.pixelX - a, B = y.pixelY - d;
|
|
681
|
+
if (Math.sqrt(C * C + B * B) > e.dragThreshold) {
|
|
682
|
+
o = !0, c = !0;
|
|
683
|
+
const _ = p();
|
|
684
|
+
_ && e.onDragStart(_);
|
|
680
685
|
} else
|
|
681
686
|
return;
|
|
682
687
|
}
|
|
683
|
-
|
|
684
|
-
let { x:
|
|
685
|
-
({ x:
|
|
686
|
-
const { x: P, y: x, valid: D } =
|
|
688
|
+
o && y.preventDefault();
|
|
689
|
+
let { x: f, y: l } = s(y.pixelX, y.pixelY);
|
|
690
|
+
({ x: f, y: l } = h(f, l, e.constraint));
|
|
691
|
+
const { x: P, y: x, valid: D } = S(f, l);
|
|
687
692
|
if (D) {
|
|
688
|
-
|
|
689
|
-
const
|
|
690
|
-
|
|
693
|
+
r.currentX = P, r.currentY = x;
|
|
694
|
+
const C = p();
|
|
695
|
+
C && e.onDrag(C), t == null || t.requestRender();
|
|
691
696
|
}
|
|
692
|
-
} else if (
|
|
693
|
-
if (!
|
|
694
|
-
if (
|
|
697
|
+
} else if (y.type === "mouseup") {
|
|
698
|
+
if (!r) return;
|
|
699
|
+
if (o && c) {
|
|
695
700
|
v(
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
701
|
+
r.seriesId,
|
|
702
|
+
r.index,
|
|
703
|
+
r.currentX,
|
|
704
|
+
r.currentY
|
|
700
705
|
);
|
|
701
|
-
const
|
|
702
|
-
|
|
706
|
+
const f = p();
|
|
707
|
+
f && e.onDragEnd(f), y.preventDefault();
|
|
703
708
|
}
|
|
704
|
-
|
|
709
|
+
r = null, o = !1, c = !1, t == null || t.requestRender();
|
|
705
710
|
}
|
|
706
711
|
}
|
|
707
712
|
},
|
|
708
713
|
onRenderOverlay(g) {
|
|
709
|
-
|
|
714
|
+
w(g);
|
|
710
715
|
},
|
|
711
|
-
api:
|
|
716
|
+
api: b
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
const Xe = `
|
|
720
|
+
attribute vec2 aPosition;
|
|
721
|
+
uniform vec2 uResolution;
|
|
722
|
+
void main() {
|
|
723
|
+
vec2 clip = (aPosition / uResolution) * 2.0 - 1.0;
|
|
724
|
+
gl_Position = vec4(clip.x, -clip.y, 0.0, 1.0);
|
|
725
|
+
}
|
|
726
|
+
`, Ye = `
|
|
727
|
+
precision mediump float;
|
|
728
|
+
uniform vec4 uColor;
|
|
729
|
+
void main() {
|
|
730
|
+
gl_FragColor = uColor;
|
|
731
|
+
}
|
|
732
|
+
`;
|
|
733
|
+
function ne(n, e, t) {
|
|
734
|
+
const o = n.createShader(e);
|
|
735
|
+
if (!o) throw new Error("createShader failed");
|
|
736
|
+
if (n.shaderSource(o, t), n.compileShader(o), !n.getShaderParameter(o, n.COMPILE_STATUS))
|
|
737
|
+
throw new Error(n.getShaderInfoLog(o) ?? "shader compile failed");
|
|
738
|
+
return o;
|
|
739
|
+
}
|
|
740
|
+
function Be(n) {
|
|
741
|
+
const e = ne(n, n.VERTEX_SHADER, Xe), t = ne(n, n.FRAGMENT_SHADER, Ye), o = n.createProgram();
|
|
742
|
+
if (!o) throw new Error("createProgram failed");
|
|
743
|
+
if (n.attachShader(o, e), n.attachShader(o, t), n.linkProgram(o), !n.getProgramParameter(o, n.LINK_STATUS))
|
|
744
|
+
throw new Error(n.getProgramInfoLog(o) ?? "program link failed");
|
|
745
|
+
return n.deleteShader(e), n.deleteShader(t), o;
|
|
746
|
+
}
|
|
747
|
+
function _e(n) {
|
|
748
|
+
const { plotArea: e, xLines: t, yLines: o } = n, r = e.y, a = e.y + e.height, d = e.x, c = e.x + e.width, i = (t.length + o.length) * 2, s = new Float32Array(i * 2);
|
|
749
|
+
let u = 0;
|
|
750
|
+
for (const h of t)
|
|
751
|
+
s[u++] = h, s[u++] = r, s[u++] = h, s[u++] = a;
|
|
752
|
+
for (const h of o)
|
|
753
|
+
s[u++] = d, s[u++] = h, s[u++] = c, s[u++] = h;
|
|
754
|
+
return s;
|
|
755
|
+
}
|
|
756
|
+
class Ge {
|
|
757
|
+
constructor(e) {
|
|
758
|
+
Y(this, "gl");
|
|
759
|
+
Y(this, "program");
|
|
760
|
+
Y(this, "buffer");
|
|
761
|
+
Y(this, "aPosition");
|
|
762
|
+
Y(this, "uResolution");
|
|
763
|
+
Y(this, "uColor");
|
|
764
|
+
const t = e.getContext("webgl", {
|
|
765
|
+
alpha: !0,
|
|
766
|
+
antialias: !1,
|
|
767
|
+
preserveDrawingBuffer: !0
|
|
768
|
+
});
|
|
769
|
+
if (!t) throw new Error("WebGL not available for grid spike");
|
|
770
|
+
this.gl = t, this.program = Be(t), this.aPosition = t.getAttribLocation(this.program, "aPosition"), this.uResolution = t.getUniformLocation(this.program, "uResolution"), this.uColor = t.getUniformLocation(this.program, "uColor");
|
|
771
|
+
const o = t.createBuffer();
|
|
772
|
+
if (!o) throw new Error("createBuffer failed");
|
|
773
|
+
this.buffer = o;
|
|
774
|
+
}
|
|
775
|
+
/** Upload vertices and draw grid lines */
|
|
776
|
+
draw(e) {
|
|
777
|
+
const t = this.gl, o = _e(e), r = o.length / 4;
|
|
778
|
+
t.viewport(0, 0, e.width, e.height), t.clearColor(0.04, 0.05, 0.08, 1), t.clear(t.COLOR_BUFFER_BIT), t.useProgram(this.program), t.bindBuffer(t.ARRAY_BUFFER, this.buffer), t.bufferData(t.ARRAY_BUFFER, o, t.DYNAMIC_DRAW), t.enableVertexAttribArray(this.aPosition), t.vertexAttribPointer(this.aPosition, 2, t.FLOAT, !1, 0, 0), t.uniform2f(this.uResolution, e.width, e.height);
|
|
779
|
+
const a = e.color ?? [0.2, 0.22, 0.3, 0.6];
|
|
780
|
+
return t.uniform4f(this.uColor, a[0], a[1], a[2], a[3]), t.lineWidth(e.lineWidth ?? 1), t.drawArrays(t.LINES, 0, o.length / 2), r;
|
|
781
|
+
}
|
|
782
|
+
destroy() {
|
|
783
|
+
const e = this.gl;
|
|
784
|
+
e.deleteBuffer(this.buffer), e.deleteProgram(this.program);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
function We(n) {
|
|
788
|
+
const e = () => {
|
|
789
|
+
};
|
|
790
|
+
return {
|
|
791
|
+
canvas: n,
|
|
792
|
+
strokeStyle: "",
|
|
793
|
+
fillStyle: "",
|
|
794
|
+
lineWidth: 1,
|
|
795
|
+
font: "",
|
|
796
|
+
textAlign: "left",
|
|
797
|
+
textBaseline: "alphabetic",
|
|
798
|
+
beginPath: e,
|
|
799
|
+
moveTo: e,
|
|
800
|
+
lineTo: e,
|
|
801
|
+
stroke: e,
|
|
802
|
+
fill: e,
|
|
803
|
+
clearRect: e,
|
|
804
|
+
setTransform: e,
|
|
805
|
+
setLineDash: e,
|
|
806
|
+
save: e,
|
|
807
|
+
restore: e,
|
|
808
|
+
translate: e,
|
|
809
|
+
rotate: e,
|
|
810
|
+
fillText: e,
|
|
811
|
+
measureText: (t) => ({ width: t.length * 7 })
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
function ze(n, e) {
|
|
815
|
+
const t = document.createElement("canvas");
|
|
816
|
+
return t.width = n, t.height = e, t.getContext("2d") ?? We(t);
|
|
817
|
+
}
|
|
818
|
+
function oe(n, e) {
|
|
819
|
+
const t = { top: 40, right: 40, bottom: 50, left: 60 };
|
|
820
|
+
return {
|
|
821
|
+
x: t.left,
|
|
822
|
+
y: t.top,
|
|
823
|
+
width: n - t.left - t.right,
|
|
824
|
+
height: e - t.top - t.bottom
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
function re(n, e, t, o, r) {
|
|
828
|
+
const a = e.ticks(o).map((c) => te(e.transform(c))), d = t.ticks(r).map((c) => te(t.transform(c)));
|
|
829
|
+
return { xLines: a, yLines: d };
|
|
830
|
+
}
|
|
831
|
+
function ie(n, e) {
|
|
832
|
+
const t = [];
|
|
833
|
+
for (let a = 0; a < e; a++) {
|
|
834
|
+
const d = performance.now();
|
|
835
|
+
n(), t.push((performance.now() - d) * 1e3);
|
|
836
|
+
}
|
|
837
|
+
t.sort((a, d) => a - d);
|
|
838
|
+
const o = t.reduce((a, d) => a + d, 0) / t.length, r = t[Math.floor(t.length * 0.95)] ?? o;
|
|
839
|
+
return { avg: o, p95: r };
|
|
840
|
+
}
|
|
841
|
+
function Ue(n = {}) {
|
|
842
|
+
const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), o = n.xTickCount ?? 24, r = n.yTickCount ?? 16, a = n.frames ?? 120, d = ze(e, t), c = {
|
|
843
|
+
...ee,
|
|
844
|
+
grid: {
|
|
845
|
+
...ee.grid,
|
|
846
|
+
visible: !0,
|
|
847
|
+
showMinor: n.showMinor ?? !0
|
|
848
|
+
}
|
|
849
|
+
}, i = oe(e, t), s = new O(), u = new O();
|
|
850
|
+
s.setDomain(0, 1e6), u.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), u.setRange(i.y + i.height, i.y);
|
|
851
|
+
const h = new Pe(d, c), { avg: S, p95: v } = ie(() => {
|
|
852
|
+
d.clearRect(0, 0, e, t), h.drawGrid(i, s, u, { tickCount: o }, { tickCount: r });
|
|
853
|
+
}, a), { xLines: p, yLines: w } = re(i, s, u, o, r);
|
|
854
|
+
return {
|
|
855
|
+
backend: "canvas2d",
|
|
856
|
+
dpr: n.dpr ?? 1,
|
|
857
|
+
width: e,
|
|
858
|
+
height: t,
|
|
859
|
+
xTicks: o,
|
|
860
|
+
yTicks: r,
|
|
861
|
+
lineSegments: p.length + w.length,
|
|
862
|
+
avgFrameUs: Math.round(S),
|
|
863
|
+
p95FrameUs: Math.round(v),
|
|
864
|
+
frames: a
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
function $e(n = {}) {
|
|
868
|
+
const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), o = n.xTickCount ?? 24, r = n.yTickCount ?? 16, a = n.frames ?? 120, d = document.createElement("canvas");
|
|
869
|
+
d.width = e, d.height = t;
|
|
870
|
+
let c;
|
|
871
|
+
try {
|
|
872
|
+
c = new Ge(d);
|
|
873
|
+
} catch {
|
|
874
|
+
return null;
|
|
875
|
+
}
|
|
876
|
+
const i = oe(e, t), s = new O(), u = new O();
|
|
877
|
+
s.setDomain(0, 1e6), u.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), u.setRange(i.y + i.height, i.y);
|
|
878
|
+
const { xLines: h, yLines: S } = re(i, s, u, o, r), v = { plotArea: i, xLines: h, yLines: S, width: e, height: t };
|
|
879
|
+
let p = 0;
|
|
880
|
+
const { avg: w, p95: b } = ie(() => {
|
|
881
|
+
p = c.draw(v);
|
|
882
|
+
}, a);
|
|
883
|
+
return c.destroy(), {
|
|
884
|
+
backend: "webgl",
|
|
885
|
+
dpr: n.dpr ?? 1,
|
|
886
|
+
width: e,
|
|
887
|
+
height: t,
|
|
888
|
+
xTicks: o,
|
|
889
|
+
yTicks: r,
|
|
890
|
+
lineSegments: p,
|
|
891
|
+
avgFrameUs: Math.round(w),
|
|
892
|
+
p95FrameUs: Math.round(b),
|
|
893
|
+
frames: a
|
|
712
894
|
};
|
|
713
895
|
}
|
|
714
|
-
|
|
896
|
+
function at(n) {
|
|
897
|
+
const e = (n == null ? void 0 : n.dpr) ?? 2, t = (n == null ? void 0 : n.frames) ?? 120, o = Ue({ dpr: e, frames: t, showMinor: !0 }), r = $e({ dpr: e, frames: t });
|
|
898
|
+
if (!r)
|
|
899
|
+
return {
|
|
900
|
+
canvas2d: o,
|
|
901
|
+
webgl: null,
|
|
902
|
+
gainPercent: 0,
|
|
903
|
+
recommendation: "defer"
|
|
904
|
+
};
|
|
905
|
+
const a = (o.avgFrameUs - r.avgFrameUs) / o.avgFrameUs * 100;
|
|
906
|
+
return {
|
|
907
|
+
canvas2d: o,
|
|
908
|
+
webgl: r,
|
|
909
|
+
gainPercent: Math.round(a * 10) / 10,
|
|
910
|
+
recommendation: a >= 20 ? "implement" : "defer"
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
const Oe = "1.17.0", He = "2026-07-05", qe = "Stage 1 baselines. Headless CI uses effective FPS (render throughput when rAF throttled) via scripts/benchmark-scenario-eval.mjs smoke floors.", Ne = 0.1, Ve = 0.95, Ke = {
|
|
914
|
+
"line-1m-pan": {
|
|
915
|
+
minAvgFps: 50,
|
|
916
|
+
maxAvgFrameTimeMs: 20,
|
|
917
|
+
points: 1e6,
|
|
918
|
+
description: "1M line points, continuous pan/zoom simulation"
|
|
919
|
+
},
|
|
920
|
+
"candlestick-500k": {
|
|
921
|
+
minAvgFps: 45,
|
|
922
|
+
maxAvgFrameTimeMs: 22,
|
|
923
|
+
points: 5e5,
|
|
924
|
+
description: "500k OHLC bars with PluginVirtualization"
|
|
925
|
+
},
|
|
926
|
+
"stack-5pane-resize": {
|
|
927
|
+
minAvgFps: 48,
|
|
928
|
+
maxAvgFrameTimeMs: 21,
|
|
929
|
+
description: "5-pane stack divider drag (batched overlay redraw)"
|
|
930
|
+
},
|
|
931
|
+
"line-200k-webgl": {
|
|
932
|
+
minAvgFps: 45,
|
|
933
|
+
description: "200k line WebGL baseline for renderer compare"
|
|
934
|
+
},
|
|
935
|
+
"line-200k-webgpu": {
|
|
936
|
+
minAvgFps: 42,
|
|
937
|
+
description: "200k line WebGPU — target ≥95% of WebGL FPS"
|
|
938
|
+
},
|
|
939
|
+
"boxplot-5k-webgpu": {
|
|
940
|
+
minAvgFps: 50,
|
|
941
|
+
description: "5k boxplot series on WebGPU chart path"
|
|
942
|
+
},
|
|
943
|
+
"grid-canvas2d-dpr2": {
|
|
944
|
+
maxAvgFrameUs: 1200,
|
|
945
|
+
dpr: 2,
|
|
946
|
+
description: "Canvas 2D grid+minor at 1920×1080 @2x"
|
|
947
|
+
},
|
|
948
|
+
"grid-webgl-dpr2": {
|
|
949
|
+
maxAvgFrameUs: 400,
|
|
950
|
+
dpr: 2,
|
|
951
|
+
description: "WebGL grid spike lines only @2x"
|
|
952
|
+
}
|
|
953
|
+
}, V = {
|
|
954
|
+
version: Oe,
|
|
955
|
+
recordedAt: He,
|
|
956
|
+
notes: qe,
|
|
957
|
+
regressionThreshold: Ne,
|
|
958
|
+
webgpuMinFpsRatio: Ve,
|
|
959
|
+
scenarios: Ke
|
|
960
|
+
};
|
|
961
|
+
function ot() {
|
|
962
|
+
return V;
|
|
963
|
+
}
|
|
964
|
+
function rt(n, e) {
|
|
965
|
+
const t = V.scenarios[n];
|
|
966
|
+
if (!t)
|
|
967
|
+
return { passed: !0, failures: [] };
|
|
968
|
+
const o = [], r = V.regressionThreshold ?? 0.1;
|
|
969
|
+
if ("avgFps" in e && t.minAvgFps !== void 0) {
|
|
970
|
+
const a = t.minAvgFps * (1 - r);
|
|
971
|
+
e.avgFps < a && o.push(
|
|
972
|
+
`FPS ${e.avgFps} < baseline min ${t.minAvgFps} (allowed ${a.toFixed(1)} with ${r * 100}% slack)`
|
|
973
|
+
);
|
|
974
|
+
}
|
|
975
|
+
if ("avgFrameTime" in e && t.maxAvgFrameTimeMs !== void 0) {
|
|
976
|
+
const a = t.maxAvgFrameTimeMs * (1 + r);
|
|
977
|
+
e.avgFrameTime > a && o.push(
|
|
978
|
+
`Frame time ${e.avgFrameTime}ms > baseline max ${t.maxAvgFrameTimeMs}ms`
|
|
979
|
+
);
|
|
980
|
+
}
|
|
981
|
+
if ("avgFrameUs" in e && t.maxAvgFrameUs !== void 0) {
|
|
982
|
+
const a = t.maxAvgFrameUs * (1 + r);
|
|
983
|
+
e.avgFrameUs > a && o.push(
|
|
984
|
+
`Grid frame ${e.avgFrameUs}µs > baseline max ${t.maxAvgFrameUs}µs`
|
|
985
|
+
);
|
|
986
|
+
}
|
|
987
|
+
return { passed: o.length === 0, failures: o };
|
|
988
|
+
}
|
|
989
|
+
function it(n, e, t, o = 0.95) {
|
|
990
|
+
if (!t || !e)
|
|
991
|
+
return {
|
|
992
|
+
webgl: n,
|
|
993
|
+
webgpu: e,
|
|
994
|
+
webgpuActive: !1,
|
|
995
|
+
fpsRatio: 0,
|
|
996
|
+
meetsTarget: !1,
|
|
997
|
+
recommendation: "webgpu-unavailable"
|
|
998
|
+
};
|
|
999
|
+
const r = n.avgFps > 0 ? e.avgFps / n.avgFps : 0, a = r >= o;
|
|
1000
|
+
return {
|
|
1001
|
+
webgl: n,
|
|
1002
|
+
webgpu: e,
|
|
1003
|
+
webgpuActive: !0,
|
|
1004
|
+
fpsRatio: r,
|
|
1005
|
+
meetsTarget: a,
|
|
1006
|
+
recommendation: a ? "webgpu-ready" : "webgl-faster"
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
class je {
|
|
715
1010
|
constructor(e) {
|
|
716
|
-
|
|
1011
|
+
Y(this, "seed");
|
|
717
1012
|
this.seed = e;
|
|
718
1013
|
}
|
|
719
1014
|
next() {
|
|
@@ -724,7 +1019,7 @@ class Ae {
|
|
|
724
1019
|
return e + this.next() * (t - e);
|
|
725
1020
|
}
|
|
726
1021
|
}
|
|
727
|
-
function
|
|
1022
|
+
function st(n) {
|
|
728
1023
|
const e = {
|
|
729
1024
|
pointCount: 1e3,
|
|
730
1025
|
amplitude: 1,
|
|
@@ -734,16 +1029,16 @@ function Xe(r) {
|
|
|
734
1029
|
xStart: 0,
|
|
735
1030
|
xEnd: 10,
|
|
736
1031
|
offset: 0,
|
|
737
|
-
...
|
|
738
|
-
}, t = new Float32Array(e.pointCount),
|
|
739
|
-
for (let
|
|
740
|
-
t[
|
|
741
|
-
const
|
|
742
|
-
|
|
1032
|
+
...n
|
|
1033
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1034
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1035
|
+
t[a] = e.xStart + a * r;
|
|
1036
|
+
const d = e.amplitude * Math.sin(2 * Math.PI * e.frequency * t[a] + e.phase), c = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1037
|
+
o[a] = d + c + e.offset;
|
|
743
1038
|
}
|
|
744
|
-
return { x: t, y:
|
|
1039
|
+
return { x: t, y: o };
|
|
745
1040
|
}
|
|
746
|
-
function
|
|
1041
|
+
function lt(n) {
|
|
747
1042
|
const e = {
|
|
748
1043
|
pointCount: 1e3,
|
|
749
1044
|
amplitude: 1,
|
|
@@ -753,16 +1048,16 @@ function Ye(r) {
|
|
|
753
1048
|
xStart: 0,
|
|
754
1049
|
xEnd: 10,
|
|
755
1050
|
offset: 0,
|
|
756
|
-
...
|
|
757
|
-
}, t = new Float32Array(e.pointCount),
|
|
758
|
-
for (let
|
|
759
|
-
t[
|
|
760
|
-
const
|
|
761
|
-
|
|
1051
|
+
...n
|
|
1052
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1053
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1054
|
+
t[a] = e.xStart + a * r;
|
|
1055
|
+
const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = Math.sign(Math.sin(2 * Math.PI * d)) * e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1056
|
+
o[a] = c + i + e.offset;
|
|
762
1057
|
}
|
|
763
|
-
return { x: t, y:
|
|
1058
|
+
return { x: t, y: o };
|
|
764
1059
|
}
|
|
765
|
-
function
|
|
1060
|
+
function ct(n) {
|
|
766
1061
|
const e = {
|
|
767
1062
|
pointCount: 1e3,
|
|
768
1063
|
amplitude: 1,
|
|
@@ -772,16 +1067,16 @@ function ke(r) {
|
|
|
772
1067
|
xStart: 0,
|
|
773
1068
|
xEnd: 10,
|
|
774
1069
|
offset: 0,
|
|
775
|
-
...
|
|
776
|
-
}, t = new Float32Array(e.pointCount),
|
|
777
|
-
for (let
|
|
778
|
-
t[
|
|
779
|
-
const
|
|
780
|
-
|
|
1070
|
+
...n
|
|
1071
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1072
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1073
|
+
t[a] = e.xStart + a * r;
|
|
1074
|
+
const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * (d - Math.floor(d + 0.5)), i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1075
|
+
o[a] = c + i + e.offset;
|
|
781
1076
|
}
|
|
782
|
-
return { x: t, y:
|
|
1077
|
+
return { x: t, y: o };
|
|
783
1078
|
}
|
|
784
|
-
function
|
|
1079
|
+
function dt(n) {
|
|
785
1080
|
const e = {
|
|
786
1081
|
pointCount: 1e3,
|
|
787
1082
|
amplitude: 1,
|
|
@@ -791,37 +1086,37 @@ function ze(r) {
|
|
|
791
1086
|
xStart: 0,
|
|
792
1087
|
xEnd: 10,
|
|
793
1088
|
offset: 0,
|
|
794
|
-
...
|
|
795
|
-
}, t = new Float32Array(e.pointCount),
|
|
796
|
-
for (let
|
|
797
|
-
t[
|
|
798
|
-
const
|
|
799
|
-
|
|
1089
|
+
...n
|
|
1090
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1091
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1092
|
+
t[a] = e.xStart + a * r;
|
|
1093
|
+
const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * Math.abs(2 * (d - Math.floor(d + 0.5))) - e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1094
|
+
o[a] = c + i + e.offset;
|
|
800
1095
|
}
|
|
801
|
-
return { x: t, y:
|
|
1096
|
+
return { x: t, y: o };
|
|
802
1097
|
}
|
|
803
|
-
function
|
|
1098
|
+
function ut(n) {
|
|
804
1099
|
const e = {
|
|
805
1100
|
pointCount: 1e3,
|
|
806
1101
|
xRange: [0, 100],
|
|
807
1102
|
yRange: [-1, 1],
|
|
808
1103
|
sorted: !0,
|
|
809
1104
|
seed: Date.now(),
|
|
810
|
-
...
|
|
811
|
-
}, t = new
|
|
812
|
-
for (let
|
|
813
|
-
|
|
1105
|
+
...n
|
|
1106
|
+
}, t = new je(e.seed), o = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount);
|
|
1107
|
+
for (let a = 0; a < e.pointCount; a++)
|
|
1108
|
+
o[a] = t.nextRange(e.xRange[0], e.xRange[1]), r[a] = t.nextRange(e.yRange[0], e.yRange[1]);
|
|
814
1109
|
if (e.sorted) {
|
|
815
|
-
const
|
|
816
|
-
|
|
817
|
-
const
|
|
1110
|
+
const a = Array.from({ length: e.pointCount }, (i, s) => s);
|
|
1111
|
+
a.sort((i, s) => o[i] - o[s]);
|
|
1112
|
+
const d = new Float32Array(e.pointCount), c = new Float32Array(e.pointCount);
|
|
818
1113
|
for (let i = 0; i < e.pointCount; i++)
|
|
819
|
-
|
|
820
|
-
return { x:
|
|
1114
|
+
d[i] = o[a[i]], c[i] = r[a[i]];
|
|
1115
|
+
return { x: d, y: c };
|
|
821
1116
|
}
|
|
822
|
-
return { x:
|
|
1117
|
+
return { x: o, y: r };
|
|
823
1118
|
}
|
|
824
|
-
function
|
|
1119
|
+
function ft(n) {
|
|
825
1120
|
const e = {
|
|
826
1121
|
pointCount: 2e3,
|
|
827
1122
|
vMin: -0.5,
|
|
@@ -830,18 +1125,18 @@ function Oe(r) {
|
|
|
830
1125
|
peakCurrent: 1e-5,
|
|
831
1126
|
// 10 µA
|
|
832
1127
|
noise: 0.02,
|
|
833
|
-
...
|
|
834
|
-
}, t = e.pointCount * e.cycles,
|
|
1128
|
+
...n
|
|
1129
|
+
}, t = e.pointCount * e.cycles, o = new Float32Array(t), r = new Float32Array(t), a = e.pointCount, d = a / 2;
|
|
835
1130
|
for (let c = 0; c < e.cycles; c++)
|
|
836
|
-
for (let i = 0; i <
|
|
837
|
-
const
|
|
838
|
-
i <
|
|
839
|
-
const
|
|
840
|
-
|
|
1131
|
+
for (let i = 0; i < a; i++) {
|
|
1132
|
+
const s = c * a + i;
|
|
1133
|
+
i < d ? o[s] = e.vMin + (e.vMax - e.vMin) * (i / d) : o[s] = e.vMax - (e.vMax - e.vMin) * ((i - d) / d);
|
|
1134
|
+
const u = o[s], h = 0, S = i < d ? 1 : -1, v = 0.1, p = -Math.pow(u - h, 2) / (2 * v * v), w = e.peakCurrent * Math.exp(p), b = S * e.peakCurrent * 0.1, g = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
|
|
1135
|
+
r[s] = S * w + b + g;
|
|
841
1136
|
}
|
|
842
|
-
return { x:
|
|
1137
|
+
return { x: o, y: r };
|
|
843
1138
|
}
|
|
844
|
-
function
|
|
1139
|
+
function gt(n) {
|
|
845
1140
|
const e = {
|
|
846
1141
|
pointCount: 50,
|
|
847
1142
|
rSolution: 100,
|
|
@@ -849,380 +1144,397 @@ function $e(r) {
|
|
|
849
1144
|
rCharge: 1e3,
|
|
850
1145
|
// Ohms
|
|
851
1146
|
frequency: [1e5, 0.01],
|
|
852
|
-
...
|
|
853
|
-
}, t = new Float32Array(e.pointCount),
|
|
854
|
-
for (let
|
|
855
|
-
const c =
|
|
856
|
-
t[
|
|
1147
|
+
...n
|
|
1148
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = Math.log10(e.frequency[1]), a = Math.log10(e.frequency[0]);
|
|
1149
|
+
for (let d = 0; d < e.pointCount; d++) {
|
|
1150
|
+
const c = a - (a - r) * (d / (e.pointCount - 1)), i = 2 * Math.PI * Math.pow(10, c), s = e.rCharge * 1e-5, u = e.rSolution + e.rCharge / (1 + Math.pow(i * s, 2)), h = i * s * e.rCharge / (1 + Math.pow(i * s, 2));
|
|
1151
|
+
t[d] = u, o[d] = -h;
|
|
857
1152
|
}
|
|
858
|
-
return { x: t, y:
|
|
1153
|
+
return { x: t, y: o };
|
|
859
1154
|
}
|
|
860
|
-
async function
|
|
1155
|
+
async function pt(n, e) {
|
|
861
1156
|
const t = {
|
|
862
1157
|
duration: 5e3,
|
|
863
1158
|
warmup: 1e3,
|
|
864
1159
|
...e
|
|
865
|
-
},
|
|
866
|
-
let
|
|
867
|
-
const
|
|
868
|
-
return new Promise((
|
|
869
|
-
const
|
|
870
|
-
let
|
|
871
|
-
function
|
|
1160
|
+
}, o = [], r = [];
|
|
1161
|
+
let a = 0;
|
|
1162
|
+
const d = n.getAllSeries().reduce((c, i) => c + i.getPointCount(), 0);
|
|
1163
|
+
return new Promise((c) => {
|
|
1164
|
+
const i = performance.now() + t.warmup + t.duration, s = performance.now() + t.warmup;
|
|
1165
|
+
let u = !1, h = 0;
|
|
1166
|
+
function S() {
|
|
872
1167
|
const v = performance.now();
|
|
873
|
-
if (v >=
|
|
874
|
-
const
|
|
875
|
-
avgFps: Math.round(
|
|
876
|
-
minFps:
|
|
877
|
-
maxFps:
|
|
878
|
-
avgFrameTime: Math.round(
|
|
879
|
-
frameCount:
|
|
1168
|
+
if (v >= i) {
|
|
1169
|
+
const b = r.length > 0 ? r.reduce((P, x) => P + x, 0) / r.length : 0, g = h > 0 ? v - h : t.duration, y = a > 0 && g > 0 ? a / g * 1e3 : 0, f = o.length > 0 ? o.reduce((P, x) => P + x, 0) / o.length : b > 0 ? 1e3 / b : 0, l = {
|
|
1170
|
+
avgFps: Math.round(y * 100) / 100,
|
|
1171
|
+
minFps: Math.round((o.length > 0 ? Math.min(...o) : y) * 100) / 100,
|
|
1172
|
+
maxFps: Math.round((o.length > 0 ? Math.max(...o) : y) * 100) / 100,
|
|
1173
|
+
avgFrameTime: Math.round(b * 1e3) / 1e3,
|
|
1174
|
+
frameCount: a,
|
|
880
1175
|
duration: t.duration,
|
|
881
|
-
pointsRendered:
|
|
882
|
-
throughput: Math.round(
|
|
1176
|
+
pointsRendered: d,
|
|
1177
|
+
throughput: Math.round(d * y / 1e3) * 1e3,
|
|
1178
|
+
/** @internal render-only FPS (not wall clock) */
|
|
1179
|
+
...f > 0 ? { renderFps: Math.round(f * 100) / 100 } : {}
|
|
883
1180
|
};
|
|
884
|
-
|
|
1181
|
+
c(l);
|
|
885
1182
|
return;
|
|
886
1183
|
}
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
1184
|
+
v >= s && !u && (u = !0, h = v, a = 0, r.length = 0, o.length = 0);
|
|
1185
|
+
const p = performance.now();
|
|
1186
|
+
n.render();
|
|
1187
|
+
const w = performance.now();
|
|
1188
|
+
if (u) {
|
|
1189
|
+
const b = w - p;
|
|
1190
|
+
r.push(b), a++;
|
|
1191
|
+
const g = r.slice(-30);
|
|
1192
|
+
if (g.length > 0) {
|
|
1193
|
+
const y = g.reduce((f, l) => f + l, 0) / g.length;
|
|
1194
|
+
y > 0 && o.push(1e3 / y);
|
|
894
1195
|
}
|
|
895
1196
|
}
|
|
896
|
-
|
|
1197
|
+
requestAnimationFrame(S);
|
|
897
1198
|
}
|
|
898
|
-
requestAnimationFrame(
|
|
1199
|
+
requestAnimationFrame(S);
|
|
899
1200
|
});
|
|
900
1201
|
}
|
|
901
|
-
function
|
|
1202
|
+
function ht(n, e) {
|
|
902
1203
|
const t = {
|
|
903
1204
|
format: "json",
|
|
904
1205
|
includeStyles: !0,
|
|
905
1206
|
...e
|
|
906
|
-
},
|
|
907
|
-
id:
|
|
908
|
-
type:
|
|
909
|
-
pointCount:
|
|
910
|
-
...t.includeStyles ? { style:
|
|
911
|
-
})),
|
|
1207
|
+
}, o = n.getAllSeries().map((a) => ({
|
|
1208
|
+
id: a.getId(),
|
|
1209
|
+
type: a.getType(),
|
|
1210
|
+
pointCount: a.getPointCount(),
|
|
1211
|
+
...t.includeStyles ? { style: a.getStyle() } : {}
|
|
1212
|
+
})), r = {
|
|
912
1213
|
timestamp: Date.now(),
|
|
913
1214
|
config: {},
|
|
914
|
-
series:
|
|
915
|
-
bounds:
|
|
1215
|
+
series: o,
|
|
1216
|
+
bounds: n.getViewBounds()
|
|
916
1217
|
};
|
|
917
|
-
return t.format === "png" &&
|
|
1218
|
+
return t.format === "png" && n.exportImage && (r.image = n.exportImage()), r;
|
|
918
1219
|
}
|
|
919
|
-
function
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
for (let
|
|
923
|
-
const
|
|
924
|
-
|
|
1220
|
+
function mt(n, e, t = 1e-6) {
|
|
1221
|
+
const o = [];
|
|
1222
|
+
n.series.length !== e.series.length && o.push(`Series count: ${n.series.length} vs ${e.series.length}`);
|
|
1223
|
+
for (let a = 0; a < Math.min(n.series.length, e.series.length); a++) {
|
|
1224
|
+
const d = n.series[a], c = e.series[a];
|
|
1225
|
+
d.id !== c.id && o.push(`Series[${a}] id: "${d.id}" vs "${c.id}"`), d.type !== c.type && o.push(`Series[${a}] type: "${d.type}" vs "${c.type}"`), d.pointCount !== c.pointCount && o.push(`Series[${a}] pointCount: ${d.pointCount} vs ${c.pointCount}`);
|
|
925
1226
|
}
|
|
926
|
-
const
|
|
927
|
-
for (const
|
|
928
|
-
Math.abs(
|
|
1227
|
+
const r = ["xMin", "xMax", "yMin", "yMax"];
|
|
1228
|
+
for (const a of r)
|
|
1229
|
+
Math.abs(n.bounds[a] - e.bounds[a]) > t && o.push(`Bounds.${a}: ${n.bounds[a]} vs ${e.bounds[a]}`);
|
|
929
1230
|
return {
|
|
930
|
-
equal:
|
|
931
|
-
differences:
|
|
1231
|
+
equal: o.length === 0,
|
|
1232
|
+
differences: o
|
|
932
1233
|
};
|
|
933
1234
|
}
|
|
934
|
-
function
|
|
1235
|
+
function yt(n, e) {
|
|
935
1236
|
const t = [];
|
|
936
|
-
return e.minFps &&
|
|
1237
|
+
return e.minFps && n.avgFps < e.minFps && t.push(`FPS ${n.avgFps} < required ${e.minFps}`), e.maxFrameTime && n.avgFrameTime > e.maxFrameTime && t.push(`Frame time ${n.avgFrameTime}ms > required ${e.maxFrameTime}ms`), e.minThroughput && n.throughput < e.minThroughput && t.push(`Throughput ${n.throughput} < required ${e.minThroughput}`), {
|
|
937
1238
|
passed: t.length === 0,
|
|
938
1239
|
failures: t
|
|
939
1240
|
};
|
|
940
1241
|
}
|
|
941
|
-
function
|
|
1242
|
+
function xt(n = 1) {
|
|
942
1243
|
return new Promise((e) => {
|
|
943
|
-
let t =
|
|
944
|
-
function
|
|
945
|
-
t--, t <= 0 ? e() : requestAnimationFrame(
|
|
1244
|
+
let t = n;
|
|
1245
|
+
function o() {
|
|
1246
|
+
t--, t <= 0 ? e() : requestAnimationFrame(o);
|
|
946
1247
|
}
|
|
947
|
-
requestAnimationFrame(
|
|
1248
|
+
requestAnimationFrame(o);
|
|
948
1249
|
});
|
|
949
1250
|
}
|
|
950
|
-
function
|
|
951
|
-
return new Promise((e) => setTimeout(e,
|
|
952
|
-
}
|
|
953
|
-
function Ve(r) {
|
|
954
|
-
const t = {
|
|
955
|
-
id: r.seriesId ?? `${r.id}-indicator`,
|
|
956
|
-
data: r.data,
|
|
957
|
-
style: r.style,
|
|
958
|
-
name: r.label
|
|
959
|
-
}, s = fe(t);
|
|
960
|
-
return {
|
|
961
|
-
id: r.id,
|
|
962
|
-
height: r.height ?? 0.25,
|
|
963
|
-
showXAxis: r.showXAxis,
|
|
964
|
-
yRange: r.yRange,
|
|
965
|
-
chart: {
|
|
966
|
-
yAxis: {
|
|
967
|
-
label: r.label ?? "Indicator",
|
|
968
|
-
auto: r.yRange === void 0 || r.yRange === "auto",
|
|
969
|
-
tickCount: r.tickCount ?? 5,
|
|
970
|
-
scientific: !1
|
|
971
|
-
},
|
|
972
|
-
xAxis: { showLabels: !1, showTicks: !1, showLine: !1 },
|
|
973
|
-
animations: !1,
|
|
974
|
-
loading: !1,
|
|
975
|
-
showLegend: !1
|
|
976
|
-
},
|
|
977
|
-
series: s
|
|
978
|
-
};
|
|
1251
|
+
function vt(n) {
|
|
1252
|
+
return new Promise((e) => setTimeout(e, n));
|
|
979
1253
|
}
|
|
980
1254
|
export {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1255
|
+
St as AnimationEngine,
|
|
1256
|
+
In as AnnotationManager,
|
|
1257
|
+
Za as BackpressureManager,
|
|
1258
|
+
xo as BaseBufferStore,
|
|
1259
|
+
vo as BaseTextureStore,
|
|
1260
|
+
tt as BuiltinPlugins,
|
|
1261
|
+
sr as ChartGroup,
|
|
1262
|
+
Tt as ChartInitQueue,
|
|
1263
|
+
eo as CircularBuffer,
|
|
1264
|
+
Oo as ClipboardManager,
|
|
1265
|
+
Se as CrosshairPlugin,
|
|
1266
|
+
ee as DARK_THEME,
|
|
1267
|
+
bt as DEFAULT_ANIMATION_CONFIG,
|
|
1268
|
+
_o as DEFAULT_KEY_BINDINGS,
|
|
1269
|
+
At as DEFAULT_LAYOUT,
|
|
1270
|
+
Mt as DEFAULT_THEME,
|
|
1271
|
+
Ee as DataLoggerPlugin,
|
|
1272
|
+
jo as DebugOverlay,
|
|
1273
|
+
Le as DirectionIndicatorPlugin,
|
|
1274
|
+
Ct as ELECTROCHEM_THEME,
|
|
1275
|
+
Tn as EventEmitter,
|
|
1276
|
+
Po as GpuBenchmark,
|
|
1277
|
+
wo as GpuCompute,
|
|
1278
|
+
Hn as GpuRenderer,
|
|
1279
|
+
Fe as GridHighlightPlugin,
|
|
1280
|
+
Go as KeyBindingManager,
|
|
1281
|
+
Ft as LIGHT_THEME,
|
|
1282
|
+
Ao as LOCALE_DE_DE,
|
|
1283
|
+
Mo as LOCALE_EN_US,
|
|
1284
|
+
Co as LOCALE_ES_ES,
|
|
1285
|
+
Fo as LOCALE_FR_FR,
|
|
1286
|
+
Do as LOCALE_JA_JP,
|
|
1287
|
+
Eo as LOCALE_PT_BR,
|
|
1288
|
+
Io as LOCALE_ZH_CN,
|
|
1289
|
+
O as LinearScale,
|
|
1290
|
+
tr as LoadingIndicator,
|
|
1291
|
+
Dt as LogScale,
|
|
1292
|
+
Et as MIDNIGHT_THEME,
|
|
1293
|
+
It as NativeWebGLRenderer,
|
|
1294
|
+
Pe as OverlayRenderer,
|
|
1295
|
+
So as PipelineCache,
|
|
1296
|
+
di as Plugin3D,
|
|
1297
|
+
va as PluginAnalysis,
|
|
1298
|
+
Ln as PluginAnnotations,
|
|
1299
|
+
Pi as PluginAnomalyDetection,
|
|
1300
|
+
Wi as PluginBrokenAxis,
|
|
1301
|
+
Yi as PluginCaching,
|
|
1302
|
+
Ho as PluginClipboard,
|
|
1303
|
+
xi as PluginContextMenu,
|
|
1304
|
+
mi as PluginDataExport,
|
|
1305
|
+
Li as PluginDataTransform,
|
|
1306
|
+
Jo as PluginDebug,
|
|
1307
|
+
nt as PluginDragEdit,
|
|
1308
|
+
fr as PluginDrawingTools,
|
|
1309
|
+
Vi as PluginForecasting,
|
|
1310
|
+
To as PluginGpu,
|
|
1311
|
+
fi as PluginI18n,
|
|
1312
|
+
Wo as PluginKeyboard,
|
|
1313
|
+
Ri as PluginLaTeX,
|
|
1314
|
+
_i as PluginLazyLoad,
|
|
1315
|
+
nr as PluginLoading,
|
|
1316
|
+
Si as PluginMLIntegration,
|
|
1317
|
+
Lt as PluginManagerImpl,
|
|
1318
|
+
Oi as PluginOffscreen,
|
|
1319
|
+
bi as PluginPatternRecognition,
|
|
1320
|
+
qi as PluginROI,
|
|
1321
|
+
Fi as PluginRadar,
|
|
1322
|
+
Mi as PluginRegression,
|
|
1323
|
+
gr as PluginReplay,
|
|
1324
|
+
Ei as PluginSnapshot,
|
|
1325
|
+
to as PluginStreaming,
|
|
1326
|
+
pi as PluginSync,
|
|
1327
|
+
yr as PluginThemeEditor,
|
|
1328
|
+
Qn as PluginTools,
|
|
1329
|
+
Ui as PluginVideoRecorder,
|
|
1330
|
+
aa as PluginVirtualization,
|
|
1331
|
+
kt as SERIALIZATION_VERSION,
|
|
1332
|
+
po as STACKED_DEFAULT_MIN_PANE_RATIO,
|
|
1333
|
+
ho as STACKED_MAX_PANES,
|
|
1334
|
+
uo as SciPlot,
|
|
1335
|
+
Rt as Series,
|
|
1336
|
+
qn as SeriesAdapter,
|
|
1337
|
+
Xt as StateHistory,
|
|
1338
|
+
be as StatsPlugin,
|
|
1339
|
+
xr as THEME_PRESETS,
|
|
1340
|
+
Zn as TOOLTIP_THEMES,
|
|
1341
|
+
vr as ThemeEditor,
|
|
1342
|
+
ea as TooltipManager,
|
|
1343
|
+
Me as WatermarkPlugin,
|
|
1344
|
+
Nn as WebGLBackend,
|
|
1345
|
+
Vn as WebGPUBackend,
|
|
1346
|
+
ae as WebGPURenderer,
|
|
1347
|
+
ma as WorkerPool,
|
|
1348
|
+
Yt as addIndicatorToChart,
|
|
1349
|
+
$r as adx,
|
|
1350
|
+
Pa as analyzeComplexSpectrum,
|
|
1351
|
+
wa as analyzeSpectrum,
|
|
1352
|
+
bn as applyBusinessDayX,
|
|
1353
|
+
Or as aroon,
|
|
1354
|
+
Sa as arraysToComplex,
|
|
1355
|
+
yt as assertPerformance,
|
|
1356
|
+
Hr as atr,
|
|
1357
|
+
Ta as autoCorrelation,
|
|
1358
|
+
ba as bandPassFilter,
|
|
1359
|
+
Aa as bandStopFilter,
|
|
1360
|
+
pr as barsToOhlc,
|
|
1361
|
+
Ue as benchmarkCanvasGrid,
|
|
1362
|
+
pt as benchmarkRender,
|
|
1363
|
+
$e as benchmarkWebGLGrid,
|
|
1364
|
+
Ma as blackmanWindow,
|
|
1365
|
+
qr as bollingerBands,
|
|
1366
|
+
Bt as bollingerBandsAsync,
|
|
1367
|
+
_t as buildIndicatorPane,
|
|
1368
|
+
Gt as buildIndicatorPaneFromPreset,
|
|
1369
|
+
Wt as buildIndicatorSeries,
|
|
1370
|
+
zt as buildPositionLineAnnotation,
|
|
1371
|
+
An as businessDaySpanMs,
|
|
1372
|
+
Ca as butterworth,
|
|
1373
|
+
Br as calculateR2,
|
|
1374
|
+
br as calculateStats,
|
|
1375
|
+
oa as calculateTargetPoints,
|
|
1376
|
+
Rn as checkPluginCompatibility,
|
|
1377
|
+
at as compareGridBackends,
|
|
1378
|
+
rt as compareScenarioToBaseline,
|
|
1379
|
+
mt as compareSnapshots,
|
|
1380
|
+
Fa as complexToArrays,
|
|
1381
|
+
Ut as compressString,
|
|
1382
|
+
$t as computeHeikinAshi,
|
|
1383
|
+
Ot as computeIndicatorFromSeries,
|
|
1384
|
+
Ht as computeIndicatorPreset,
|
|
1385
|
+
no as connectStreamToChart,
|
|
1386
|
+
qo as copyToClipboard,
|
|
1387
|
+
ao as createBackpressureManager,
|
|
1388
|
+
qt as createChart,
|
|
1389
|
+
lr as createChartGroup,
|
|
1390
|
+
Xn as createConfigurablePlugin,
|
|
1391
|
+
Qo as createDebugOverlay,
|
|
1392
|
+
Kn as createGpuRenderer,
|
|
1393
|
+
Nt as createIndicatorSeries,
|
|
1394
|
+
zo as createKeyBinding,
|
|
1395
|
+
ar as createLoadingIndicator,
|
|
1396
|
+
Lo as createLocaleFormatter,
|
|
1397
|
+
oo as createLosslessBackpressure,
|
|
1398
|
+
cr as createMasterSlave,
|
|
1399
|
+
ro as createMessageParser,
|
|
1400
|
+
hr as createMockDatafeed,
|
|
1401
|
+
io as createMockStream,
|
|
1402
|
+
Vt as createNativeRenderer,
|
|
1403
|
+
Yn as createPlugin,
|
|
1404
|
+
Kt as createPluginContext,
|
|
1405
|
+
so as createRealtimeBackpressure,
|
|
1406
|
+
Bn as createRenderer,
|
|
1407
|
+
jt as createScale,
|
|
1408
|
+
ht as createSnapshot,
|
|
1409
|
+
mo as createStackedChart,
|
|
1410
|
+
Jt as createTheme,
|
|
1411
|
+
Pr as createThemeEditor,
|
|
1412
|
+
lo as createWebSocketStream,
|
|
1413
|
+
Da as crossCorrelation,
|
|
1414
|
+
Nr as cumsum,
|
|
1415
|
+
_r as cumulativeIntegral,
|
|
1416
|
+
Qt as decodeFloat32Array,
|
|
1417
|
+
Zt as decompressString,
|
|
1418
|
+
_n as defineAndRegister,
|
|
1419
|
+
G as definePlugin,
|
|
1420
|
+
Vr as dema,
|
|
1421
|
+
Gr as derivative,
|
|
1422
|
+
ra as destroyDownsamplePool,
|
|
1423
|
+
en as destroyIndicatorPool,
|
|
1424
|
+
Ea as detectAnomalies,
|
|
1425
|
+
Ar as detectCycles,
|
|
1426
|
+
tn as detectIndicatorMarkers,
|
|
1427
|
+
Mr as detectPeaks,
|
|
1428
|
+
Ia as dominantFrequency,
|
|
1429
|
+
ia as downsampleAsync,
|
|
1430
|
+
Cr as downsampleLTTB,
|
|
1431
|
+
nn as easings,
|
|
1432
|
+
Kr as ema,
|
|
1433
|
+
an as emaAsync,
|
|
1434
|
+
Zo as enableDebugMode,
|
|
1435
|
+
on as encodeFloat32Array,
|
|
1436
|
+
it as evaluateRendererCompare,
|
|
1437
|
+
La as exponentialMovingAverage,
|
|
1438
|
+
ka as fft,
|
|
1439
|
+
Ra as fftFromComplexInput,
|
|
1440
|
+
Mn as formatBusinessDayTick,
|
|
1441
|
+
No as formatData,
|
|
1442
|
+
Fr as formatScientific,
|
|
1443
|
+
Dr as formatValue,
|
|
1444
|
+
Er as formatWithPrefix,
|
|
1445
|
+
Xa as gaussianSmooth,
|
|
1446
|
+
ft as generateCVData,
|
|
1447
|
+
Ir as generateCycleColors,
|
|
1448
|
+
gt as generateNyquistData,
|
|
1449
|
+
ut as generateRandomData,
|
|
1450
|
+
ct as generateSawtoothWave,
|
|
1451
|
+
st as generateSineWave,
|
|
1452
|
+
lt as generateSquareWave,
|
|
1453
|
+
dt as generateTriangleWave,
|
|
1454
|
+
ot as getBaseline,
|
|
1455
|
+
Lr as getBestPrefix,
|
|
1456
|
+
rn as getChartInitQueue,
|
|
1457
|
+
Vo as getClipboardManager,
|
|
1458
|
+
sa as getDownsamplePoolSize,
|
|
1459
|
+
ko as getGlobalLocale,
|
|
1460
|
+
Ro as getLocale,
|
|
1461
|
+
Gn as getPluginRegistry,
|
|
1462
|
+
Ya as getPositiveFrequencies,
|
|
1463
|
+
wr as getPresetNames,
|
|
1464
|
+
Sr as getPresetTheme,
|
|
1465
|
+
sn as getSharedAnimationEngine,
|
|
1466
|
+
ln as getThemeByName,
|
|
1467
|
+
ta as getTooltipThemeForChartTheme,
|
|
1468
|
+
Ba as hammingWindow,
|
|
1469
|
+
_a as hanningWindow,
|
|
1470
|
+
Ga as highPassFilter,
|
|
1471
|
+
Wa as ifft,
|
|
1472
|
+
za as ifftComplex,
|
|
1473
|
+
Ua as ifftFromArrays,
|
|
1474
|
+
Wr as integrate,
|
|
1475
|
+
cn as interleaveData,
|
|
1476
|
+
Cn as isBusinessDay,
|
|
1477
|
+
Fn as isBusinessDayScaleActive,
|
|
1478
|
+
dr as linkCharts,
|
|
1479
|
+
Wn as listPluginsByCategory,
|
|
1480
|
+
zn as loadPlugin,
|
|
1481
|
+
$a as lowPassFilter,
|
|
1482
|
+
la as lowerBoundX,
|
|
1483
|
+
ca as lttbDownsample,
|
|
1484
|
+
jr as macd,
|
|
1485
|
+
dn as macdAsync,
|
|
1486
|
+
Dn as mapToBusinessDayScale,
|
|
1487
|
+
Oa as medianFilter,
|
|
1488
|
+
un as mergeAnimationConfig,
|
|
1489
|
+
fn as mergeLayoutOptions,
|
|
1490
|
+
da as minMaxDownsample,
|
|
1491
|
+
Jr as momentum,
|
|
1492
|
+
kr as movingAverage,
|
|
1493
|
+
Ha as nextPowerOf2,
|
|
1494
|
+
ya as nextTaskId,
|
|
1495
|
+
Qr as normalize,
|
|
1496
|
+
Zr as obv,
|
|
1497
|
+
ua as ohlcDownsampleAsync,
|
|
1498
|
+
fa as ohlcMinMaxDownsample,
|
|
1499
|
+
gn as parseColor,
|
|
1500
|
+
jn as parseColorToRGBA,
|
|
1501
|
+
Uo as parseShortcut,
|
|
1502
|
+
ei as percentChange,
|
|
1503
|
+
qa as powerSpectrum,
|
|
1504
|
+
pn as queueChartInit,
|
|
1505
|
+
Xo as registerLocale,
|
|
1506
|
+
Un as registerPlugin,
|
|
1507
|
+
hn as resetChartQueue,
|
|
1508
|
+
ti as roc,
|
|
1509
|
+
ni as rsi,
|
|
1510
|
+
mn as rsiAsync,
|
|
1511
|
+
Na as savitzkyGolay,
|
|
1512
|
+
Yo as setGlobalLocale,
|
|
1513
|
+
or as showLoading,
|
|
1514
|
+
rr as showProgress,
|
|
1515
|
+
Va as simpsonsIntegration,
|
|
1516
|
+
Ka as singleFrequencyFilter,
|
|
1517
|
+
ga as sliceSeriesToViewport,
|
|
1518
|
+
ai as sma,
|
|
1519
|
+
yn as smaAsync,
|
|
1520
|
+
zr as solveLinearSystem,
|
|
1521
|
+
oi as standardDeviation,
|
|
1522
|
+
xn as stateToUrlHash,
|
|
1523
|
+
ri as stochastic,
|
|
1524
|
+
Rr as subtractBaseline,
|
|
1525
|
+
ja as tTest,
|
|
1526
|
+
ii as tema,
|
|
1527
|
+
Ja as trapezoidalIntegration,
|
|
1528
|
+
pa as upperBoundX,
|
|
1529
|
+
vn as urlHashToState,
|
|
1530
|
+
fo as useSciPlot,
|
|
1531
|
+
Pn as validateChartState,
|
|
1532
|
+
Xr as validateData,
|
|
1533
|
+
$n as validateManifest,
|
|
1534
|
+
si as vwap,
|
|
1535
|
+
vt as waitFor,
|
|
1536
|
+
wn as waitForAnimations,
|
|
1537
|
+
xt as waitForFrames,
|
|
1538
|
+
li as wma
|
|
1227
1539
|
};
|
|
1228
1540
|
//# sourceMappingURL=velo-plot.full.js.map
|