velo-plot 3.1.0 → 4.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChartCore-AnR_3Xkb.js → ChartCore-KYG2HTcK.js} +1349 -1213
- package/dist/ChartCore-KYG2HTcK.js.map +1 -0
- package/dist/{PluginRegistry-CzMHebYP.js → PluginRegistry-CDf_jcnp.js} +2 -2
- package/dist/{PluginRegistry-CzMHebYP.js.map → PluginRegistry-CDf_jcnp.js.map} +1 -1
- package/dist/SVGDocumentBuilder-C-uLkcFW.js +83 -0
- package/dist/SVGDocumentBuilder-C-uLkcFW.js.map +1 -0
- package/dist/angular-hooks.js +1 -1
- package/dist/angular.js +4 -4
- package/dist/{chartSyncBridge-D_rCtbFq.js → chartSyncBridge-C1uRy0ZS.js} +3 -3
- package/dist/{chartSyncBridge-D_rCtbFq.js.map → chartSyncBridge-C1uRy0ZS.js.map} +1 -1
- package/dist/core/chart/ChartCore.d.ts +7 -3
- package/dist/core/chart/ChartRenderLoop.d.ts +5 -0
- package/dist/core/chart/ChartRenderer.d.ts +9 -0
- package/dist/core/chart/ChartSetup.d.ts +1 -0
- package/dist/core/chart/exporter/SVGExporter.d.ts +9 -7
- package/dist/core/chart/exporter/svg/SVGDocumentBuilder.d.ts +27 -0
- package/dist/core/chart/exporter/svg/SVGExportContext.d.ts +147 -0
- package/dist/core/chart/exporter/svg/SVGOrchestrator.d.ts +3 -0
- package/dist/core/chart/exporter/svg/SVGThemeAdapter.d.ts +22 -0
- package/dist/core/chart/exporter/svg/__tests__/testFixtures.d.ts +46 -0
- package/dist/core/chart/exporter/svg/__tests__/visualTestUtils.d.ts +12 -0
- package/dist/core/chart/exporter/svg/overlay/axes.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/border.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/errorBars.d.ts +7 -0
- package/dist/core/chart/exporter/svg/overlay/grid.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/index.d.ts +12 -0
- package/dist/core/chart/exporter/svg/overlay/legend.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/pluginCharts.d.ts +6 -0
- package/dist/core/chart/exporter/svg/overlay/polarGrid.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/specialChart.d.ts +15 -0
- package/dist/core/chart/exporter/svg/overlay/title.d.ts +4 -0
- package/dist/core/chart/exporter/svg/plugins/annotations.d.ts +5 -0
- package/dist/core/chart/exporter/svg/plugins/brokenAxis.d.ts +20 -0
- package/dist/core/chart/exporter/svg/plugins/latex.d.ts +9 -0
- package/dist/core/chart/exporter/svg/plugins/register.d.ts +8 -0
- package/dist/core/chart/exporter/svg/plugins/regression.d.ts +33 -0
- package/dist/core/chart/exporter/svg/plugins/roi.d.ts +12 -0
- package/dist/core/chart/exporter/svg/plugins/tradeMarkers.d.ts +3 -0
- package/dist/core/chart/exporter/svg/plugins/types.d.ts +28 -0
- package/dist/core/chart/exporter/svg/plugins/watermark.d.ts +13 -0
- package/dist/core/chart/exporter/svg/series/band.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/bar.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/boxplot.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/candlestick.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/finitePoints.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/gauge.d.ts +5 -0
- package/dist/core/chart/exporter/svg/series/heatmap.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/indicator.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/line.d.ts +12 -0
- package/dist/core/chart/exporter/svg/series/polar.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/radar.d.ts +5 -0
- package/dist/core/chart/exporter/svg/series/registry.d.ts +10 -0
- package/dist/core/chart/exporter/svg/series/sankey.d.ts +5 -0
- package/dist/core/chart/exporter/svg/series/scatter.d.ts +1 -0
- package/dist/core/chart/exporter/svg/series/ternary.d.ts +7 -0
- package/dist/core/chart/exporter/svg/series/waterfall.d.ts +6 -0
- package/dist/core/chart/exporter/svg/seriesAtTimestamp.d.ts +4 -0
- package/dist/core/chart/exporter/svg/seriesUtils.d.ts +3 -0
- package/dist/core/chart/exporter/svg/symbols.d.ts +5 -0
- package/dist/core/chart/exporter/svg/tickUtils.d.ts +9 -0
- package/dist/core/chart/mountSVGString.d.ts +5 -0
- package/dist/core/chart/types.d.ts +2 -2
- package/dist/core/stacked/StackSVGComposer.d.ts +14 -0
- package/dist/core/stacked/index.d.ts +3 -2
- package/dist/core/stacked/types.d.ts +12 -4
- package/dist/createStackedChart-DjA3aJAu.js +2761 -0
- package/dist/createStackedChart-DjA3aJAu.js.map +1 -0
- package/dist/{hooks-DH-3bewj.js → hooks-4wQH27r9.js} +3 -3
- package/dist/{hooks-DH-3bewj.js.map → hooks-4wQH27r9.js.map} +1 -1
- package/dist/index-Bj-xyXY6.js +582 -0
- package/dist/index-Bj-xyXY6.js.map +1 -0
- package/dist/plugins/PluginManager.d.ts +5 -0
- package/dist/plugins/annotations.js +8 -7
- package/dist/plugins/annotations.js.map +1 -1
- package/dist/plugins/broken-axis.js +198 -152
- package/dist/plugins/broken-axis.js.map +1 -1
- package/dist/plugins/forecasting.js +273 -258
- package/dist/plugins/forecasting.js.map +1 -1
- package/dist/plugins/ml-integration.js +107 -93
- package/dist/plugins/ml-integration.js.map +1 -1
- package/dist/plugins/radar/types.d.ts +11 -0
- package/dist/plugins/radar.js +64 -53
- package/dist/plugins/radar.js.map +1 -1
- package/dist/plugins/roi/index.d.ts +2 -0
- package/dist/plugins/roi.js +184 -145
- package/dist/plugins/roi.js.map +1 -1
- package/dist/plugins/snapshot.js +20 -15
- package/dist/plugins/snapshot.js.map +1 -1
- package/dist/plugins/types.d.ts +4 -0
- package/dist/react.js +2 -2
- package/dist/regression-HNdyk1Dm.js +28 -0
- package/dist/regression-HNdyk1Dm.js.map +1 -0
- package/dist/renderer/ChartSeriesRenderer.d.ts +3 -2
- package/dist/renderer/SVGChartRenderer.d.ts +15 -0
- package/dist/renderer/SankeyRenderer.d.ts +1 -0
- package/dist/renderer/registerSVG.d.ts +5 -0
- package/dist/renderer/sankeyLayout.d.ts +29 -0
- package/dist/scientific.js +2 -2
- package/dist/solid.js +2 -2
- package/dist/svelte.js +2 -2
- package/dist/tickUtils-B_X-ha13.js +41 -0
- package/dist/tickUtils-B_X-ha13.js.map +1 -0
- package/dist/trading.js +3 -3
- package/dist/types.d.ts +2 -1
- package/dist/velo-plot.full.js +1107 -1292
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +2 -2
- package/dist/vue/VeloPlot.vue.d.ts +1 -1
- package/dist/vue/index.d.ts +33 -33
- package/dist/vue.js +2 -2
- package/package.json +6 -1
- package/dist/ChartCore-AnR_3Xkb.js.map +0 -1
- package/dist/createStackedChart-DqcLCFGS.js +0 -1338
- package/dist/createStackedChart-DqcLCFGS.js.map +0 -1
- package/dist/index-Cv6ZDLWf.js +0 -521
- package/dist/index-Cv6ZDLWf.js.map +0 -1
package/dist/velo-plot.full.js
CHANGED
|
@@ -1,141 +1,124 @@
|
|
|
1
1
|
var Oe = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { c as
|
|
5
|
-
import { P as
|
|
6
|
-
import {
|
|
7
|
-
import { E as
|
|
8
|
-
import { a as qe,
|
|
9
|
-
import {
|
|
10
|
-
import { r as
|
|
11
|
-
import {
|
|
12
|
-
import { P as
|
|
13
|
-
import { W as
|
|
14
|
-
import { PluginAnalysis as
|
|
15
|
-
import { SciChart as
|
|
16
|
-
import { LOCALE_DE_DE as
|
|
17
|
-
import { D as
|
|
18
|
-
import { ClipboardManager as
|
|
19
|
-
import { DebugOverlay as
|
|
20
|
-
import { L as
|
|
21
|
-
import { C as
|
|
22
|
-
import { P as
|
|
23
|
-
import { B as
|
|
24
|
-
import { AnnotationManager as
|
|
25
|
-
import { d as
|
|
26
|
-
import { e as
|
|
2
|
+
var Ve = (t, e, r) => e in t ? Oe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var B = (t, e, r) => Ve(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { c as $e } from "./index-Bj-xyXY6.js";
|
|
5
|
+
import { P as en, a as tn, b as rn, d as nn } from "./index-Bj-xyXY6.js";
|
|
6
|
+
import { a as se, c as le } from "./axisFormat-Sz4WIJfQ.js";
|
|
7
|
+
import { E as on, b as sn, f as ln, i as cn, m as un } from "./axisFormat-Sz4WIJfQ.js";
|
|
8
|
+
import { h as j, i as He, j as ze, k as Ne, l as Ue, a as qe, n as Ke, o as je, p as Je } from "./createStackedChart-DjA3aJAu.js";
|
|
9
|
+
import { q as fn, S as hn, b as gn, u as pn, f as mn, g as yn, v as vn, t as bn, c as xn, d as Pn, w as wn, e as An, m as Sn, r as Tn, s as Cn } from "./createStackedChart-DjA3aJAu.js";
|
|
10
|
+
import { r as W, i as Ae, j as Qe, k as Ze, l as et, m as tt, n as rt, o as nt, q as N, p as U, s as ce, t as at, H as ot, u as it, C as $, N as Se, v as st, w as lt, x as ct, D as ue, L as K, y as de, O as ut } from "./ChartCore-KYG2HTcK.js";
|
|
11
|
+
import { A as Fn, I as Dn, B as En, T as Rn, e as In, E as Ln, d as kn, a as Bn, M as _n, P as Yn, V as Xn, S as Wn, a1 as Gn, Y as On, c as Vn, h as $n, b as Hn, f as zn, X as Nn, Z as Un, z as qn, W as Kn, J as jn, G as Jn, g as Qn, F as Zn, U as ea, K as ta, R as ra, _ as na, $ as aa, a0 as oa, Q as ia } from "./ChartCore-KYG2HTcK.js";
|
|
12
|
+
import { P as la, c as ca, a as ua, d as da, g as fa, e as ha, l as ga, m as pa, o as ma, b as ya, s as va, u as ba } from "./index-0InEyj0q.js";
|
|
13
|
+
import { W as Pa, n as wa } from "./pool-DZ8shSqv.js";
|
|
14
|
+
import { PluginAnalysis as Sa, analyzeComplexSpectrum as Ta, analyzeSpectrum as Ca, arraysToComplex as Ma, autoCorrelation as Fa, bandPassFilter as Da, bandStopFilter as Ea, blackmanWindow as Ra, butterworth as Ia, complexToArrays as La, crossCorrelation as ka, detectAnomalies as Ba, dominantFrequency as _a, exponentialMovingAverage as Ya, fft as Xa, fftFromComplexInput as Wa, gaussianSmooth as Ga, generateContours as Oa, getPositiveFrequencies as Va, hammingWindow as $a, hanningWindow as Ha, highPassFilter as za, ifft as Na, ifftComplex as Ua, ifftFromArrays as qa, joinSegments as Ka, lowPassFilter as ja, medianFilter as Ja, nextPowerOf2 as Qa, powerSpectrum as Za, savitzkyGolay as eo, simpsonsIntegration as to, singleFrequencyFilter as ro, tTest as no, trapezoidalIntegration as ao } from "./plugins/analysis.js";
|
|
15
|
+
import { SciChart as io, SciPlot as so, StackedPlot as lo, VeloPlot as co, useChartGroup as uo, useChartSync as fo, useIndicator as ho, useSciChart as go, useSciPlot as po, useStackedPlot as mo, useVeloPlot as yo } from "./react.js";
|
|
16
|
+
import { LOCALE_DE_DE as bo, LOCALE_EN_US as xo, LOCALE_ES_ES as Po, LOCALE_FR_FR as wo, LOCALE_JA_JP as Ao, LOCALE_PT_BR as So, LOCALE_ZH_CN as To, PluginI18n as Co, createLocaleFormatter as Mo, getGlobalLocale as Fo, getLocale as Do, registerLocale as Eo, setGlobalLocale as Ro } from "./plugins/i18n.js";
|
|
17
|
+
import { D as Lo, K as ko, c as Bo, p as _o } from "./index-CWxIHdwX.js";
|
|
18
|
+
import { ClipboardManager as Xo, PluginClipboard as Wo, copyToClipboard as Go, formatData as Oo, getClipboardManager as Vo } from "./plugins/clipboard.js";
|
|
19
|
+
import { DebugOverlay as Ho, PluginDebug as zo, createDebugOverlay as No, enableDebugMode as Uo } from "./plugins/debug.js";
|
|
20
|
+
import { L as Ko, P as jo, c as Jo, s as Qo, a as Zo } from "./index-qhscKTDy.js";
|
|
21
|
+
import { C as ti, c as ri, a as ni, l as ai } from "./index-CaXWSOTk.js";
|
|
22
|
+
import { P as ii, b as si, T as li, c as ci, a as ui, g as di } from "./index-Dag88bW4.js";
|
|
23
|
+
import { B as hi, C as gi, P as pi, a as mi, e as yi, g as vi, b as bi, d as xi, f as Pi, c as wi } from "./index-BgrvqltV.js";
|
|
24
|
+
import { AnnotationManager as Si, PluginAnnotations as Ti } from "./plugins/annotations.js";
|
|
25
|
+
import { d as G } from "./PluginRegistry-CDf_jcnp.js";
|
|
26
|
+
import { e as Mi, c as Fi, a as Di, g as Ei, b as Ri, l as Ii, r as Li, v as ki } from "./PluginRegistry-CDf_jcnp.js";
|
|
27
27
|
import { P as _i, a as Yi, T as Xi, g as Wi } from "./index-B7PTX94B.js";
|
|
28
|
-
import { h as
|
|
29
|
-
import { a as
|
|
30
|
-
import { BaseBufferStore as
|
|
31
|
-
import { i as
|
|
32
|
-
import { Plugin3D as
|
|
33
|
-
import { PluginKeyboard as
|
|
34
|
-
import { PluginSync as
|
|
35
|
-
import { PluginDataExport as
|
|
36
|
-
import { PluginContextMenu as
|
|
37
|
-
import { PluginAnomalyDetection as
|
|
38
|
-
import { PluginMLIntegration as
|
|
39
|
-
import { PluginPatternRecognition as
|
|
40
|
-
import { PluginRegression as
|
|
28
|
+
import { h as Oi, d as Vi, e as $i, i as Hi, b as zi, a as Ni, f as Ui, c as qi, g as Ki, m as ji, s as Ji, v as Qi } from "./utils-Dx0h0bgQ.js";
|
|
29
|
+
import { a as es, c as ts, d as rs, i as ns, s as as } from "./math-Ddm2EZjj.js";
|
|
30
|
+
import { BaseBufferStore as is, BaseTextureStore as ss, GpuBenchmark as ls, GpuCompute as cs, GpuRenderer as us, PipelineCache as ds, PluginGpu as fs, SeriesAdapter as hs, WebGLBackend as gs, WebGPUBackend as ps, createGpuRenderer as ms, parseColorToRGBA as ys } from "./plugins/gpu.js";
|
|
31
|
+
import { i as bs, j as xs, g as Ps, f as ws, k as As, d as Ss, e as Ts, m as Cs, c as Ms, n as Fs, o as Ds, p as Es, b as Rs, r as Is, s as Ls, h as ks, a as Bs, t as _s, v as Ys, w as Xs } from "./indicators--eJGmVox.js";
|
|
32
|
+
import { Plugin3D as Gs } from "./plugins/3d.js";
|
|
33
|
+
import { PluginKeyboard as Vs } from "./plugins/keyboard.js";
|
|
34
|
+
import { PluginSync as Hs } from "./plugins/sync.js";
|
|
35
|
+
import { PluginDataExport as Ns } from "./plugins/data-export.js";
|
|
36
|
+
import { PluginContextMenu as qs } from "./plugins/context-menu.js";
|
|
37
|
+
import { PluginAnomalyDetection as js } from "./plugins/anomaly-detection.js";
|
|
38
|
+
import { PluginMLIntegration as Qs } from "./plugins/ml-integration.js";
|
|
39
|
+
import { PluginPatternRecognition as el } from "./plugins/pattern-recognition.js";
|
|
40
|
+
import { PluginRegression as rl } from "./plugins/regression.js";
|
|
41
41
|
import { PluginRadar as al } from "./plugins/radar.js";
|
|
42
|
-
import { PluginSnapshot as
|
|
43
|
-
import { PluginDataTransform as
|
|
44
|
-
import { PluginLaTeX as
|
|
45
|
-
import { PluginCaching as
|
|
46
|
-
import { PluginLazyLoad as
|
|
47
|
-
import { PluginBrokenAxis as
|
|
48
|
-
import { PluginVideoRecorder as
|
|
49
|
-
import { PluginOffscreen as
|
|
50
|
-
import { PluginROI as
|
|
51
|
-
import { PluginForecasting as
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
for (let
|
|
56
|
-
const
|
|
57
|
-
c[
|
|
42
|
+
import { PluginSnapshot as il } from "./plugins/snapshot.js";
|
|
43
|
+
import { PluginDataTransform as ll } from "./plugins/data-transform.js";
|
|
44
|
+
import { PluginLaTeX as ul } from "./plugins/latex.js";
|
|
45
|
+
import { PluginCaching as fl } from "./plugins/caching.js";
|
|
46
|
+
import { PluginLazyLoad as gl } from "./plugins/lazy-load.js";
|
|
47
|
+
import { PluginBrokenAxis as ml } from "./plugins/broken-axis.js";
|
|
48
|
+
import { PluginVideoRecorder as vl } from "./plugins/video-recorder.js";
|
|
49
|
+
import { PluginOffscreen as xl } from "./plugins/offscreen.js";
|
|
50
|
+
import { PluginROI as wl } from "./plugins/roi.js";
|
|
51
|
+
import { PluginForecasting as Sl } from "./plugins/forecasting.js";
|
|
52
|
+
function dt(t, e, r, n, a, o, i) {
|
|
53
|
+
const s = t.length, l = i / 2, c = new Float32Array(s * 20), u = new Float32Array(s * 12);
|
|
54
|
+
let h = 0, v = 0;
|
|
55
|
+
for (let d = 0; d < s; d++) {
|
|
56
|
+
const p = t[d], x = e[d], b = r[d], m = n[d], y = a[d], g = o[d];
|
|
57
|
+
c[h++] = p, c[h++] = x, c[h++] = p, c[h++] = b, c[h++] = p, c[h++] = y, c[h++] = p, c[h++] = g, c[h++] = p - l, c[h++] = m, c[h++] = p + l, c[h++] = m, c[h++] = p - l, c[h++] = b, c[h++] = p + l, c[h++] = b, c[h++] = p - l, c[h++] = y, c[h++] = p + l, c[h++] = y, u[v++] = p - l, u[v++] = b, u[v++] = p + l, u[v++] = b, u[v++] = p + l, u[v++] = y, u[v++] = p - l, u[v++] = b, u[v++] = p + l, u[v++] = y, u[v++] = p - l, u[v++] = y;
|
|
58
58
|
}
|
|
59
59
|
return { lines: c, boxes: u };
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
let u = 0,
|
|
64
|
-
for (let
|
|
65
|
-
const b = t[
|
|
66
|
-
let
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
c[
|
|
61
|
+
function ft(t, e, r, n) {
|
|
62
|
+
const a = t.length, o = r / 2, i = new Float32Array(a * 12), s = new Float32Array(a * 12), l = new Float32Array(a * 12), c = new Float32Array((a - 1) * 4);
|
|
63
|
+
let u = 0, h = 0, v = 0, d = 0, p = 0;
|
|
64
|
+
for (let x = 0; x < a; x++) {
|
|
65
|
+
const b = t[x], m = e[x], y = (n == null ? void 0 : n[x]) ?? !1;
|
|
66
|
+
let g, f;
|
|
67
|
+
if (y ? (g = 0, f = p, l[v++] = b - o, l[v++] = g, l[v++] = b + o, l[v++] = g, l[v++] = b + o, l[v++] = f, l[v++] = b - o, l[v++] = g, l[v++] = b + o, l[v++] = f, l[v++] = b - o, l[v++] = f) : (g = p, f = p + m, p = f, m >= 0 ? (i[u++] = b - o, i[u++] = g, i[u++] = b + o, i[u++] = g, i[u++] = b + o, i[u++] = f, i[u++] = b - o, i[u++] = g, i[u++] = b + o, i[u++] = f, i[u++] = b - o, i[u++] = f) : (s[h++] = b - o, s[h++] = f, s[h++] = b + o, s[h++] = f, s[h++] = b + o, s[h++] = g, s[h++] = b - o, s[h++] = f, s[h++] = b + o, s[h++] = g, s[h++] = b - o, s[h++] = g)), x < a - 1) {
|
|
68
|
+
const A = t[x + 1];
|
|
69
|
+
c[d++] = b + o, c[d++] = f, c[d++] = A - o, c[d++] = f;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return {
|
|
73
73
|
positiveData: i.subarray(0, u),
|
|
74
|
-
negativeData:
|
|
75
|
-
subtotalData:
|
|
76
|
-
connectorData: c.subarray(0,
|
|
74
|
+
negativeData: s.subarray(0, h),
|
|
75
|
+
subtotalData: l.subarray(0, v),
|
|
76
|
+
connectorData: c.subarray(0, d),
|
|
77
77
|
positiveCount: u / 2,
|
|
78
|
-
negativeCount:
|
|
79
|
-
subtotalCount:
|
|
78
|
+
negativeCount: h / 2,
|
|
79
|
+
subtotalCount: v / 2
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const n =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return o;
|
|
89
|
-
}
|
|
90
|
-
function le(t) {
|
|
91
|
-
if (t.length < 2) return 1;
|
|
92
|
-
let e = 1 / 0;
|
|
93
|
-
for (let r = 1; r < t.length; r++) {
|
|
94
|
-
const n = Math.abs(t[r] - t[r - 1]);
|
|
95
|
-
n > 0 && n < e && (e = n);
|
|
96
|
-
}
|
|
97
|
-
return e === 1 / 0 ? 1 : e * 0.8;
|
|
98
|
-
}
|
|
99
|
-
function ft(t, e, r) {
|
|
100
|
-
const n = t.length, o = e.length;
|
|
101
|
-
n * o > r.length && console.warn("[Heatmap] Z array is too small for the specified grid dimensions");
|
|
102
|
-
const a = (n - 1) * (o - 1), i = new Float32Array(a * 6 * 3);
|
|
103
|
-
let l = 0;
|
|
104
|
-
for (let s = 0; s < o - 1; s++)
|
|
82
|
+
function ht(t, e, r) {
|
|
83
|
+
const n = t.length, a = e.length;
|
|
84
|
+
n * a > r.length && console.warn("[Heatmap] Z array is too small for the specified grid dimensions");
|
|
85
|
+
const o = (n - 1) * (a - 1), i = new Float32Array(o * 6 * 3);
|
|
86
|
+
let s = 0;
|
|
87
|
+
for (let l = 0; l < a - 1; l++)
|
|
105
88
|
for (let c = 0; c < n - 1; c++) {
|
|
106
|
-
const u = t[c],
|
|
107
|
-
i[
|
|
89
|
+
const u = t[c], h = t[c + 1], v = e[l], d = e[l + 1], p = r[l * n + c], x = r[l * n + (c + 1)], b = r[(l + 1) * n + c], m = r[(l + 1) * n + (c + 1)];
|
|
90
|
+
i[s++] = u, i[s++] = v, i[s++] = p, i[s++] = h, i[s++] = v, i[s++] = x, i[s++] = u, i[s++] = d, i[s++] = b, i[s++] = u, i[s++] = d, i[s++] = b, i[s++] = h, i[s++] = v, i[s++] = x, i[s++] = h, i[s++] = d, i[s++] = m;
|
|
108
91
|
}
|
|
109
92
|
return i;
|
|
110
93
|
}
|
|
111
|
-
function
|
|
94
|
+
function gt(t = "viridis") {
|
|
112
95
|
const r = new Uint8Array(1024);
|
|
113
96
|
for (let n = 0; n < 256; n++) {
|
|
114
|
-
const
|
|
115
|
-
let
|
|
116
|
-
t === "jet" ? (
|
|
97
|
+
const a = n / 255;
|
|
98
|
+
let o, i, s;
|
|
99
|
+
t === "jet" ? (o = Math.min(Math.max(1.5 - Math.abs(a * 4 - 3), 0), 1), i = Math.min(Math.max(1.5 - Math.abs(a * 4 - 2), 0), 1), s = Math.min(Math.max(1.5 - Math.abs(a * 4 - 1), 0), 1)) : t === "grayscale" ? o = i = s = a : t === "plasma" ? (o = 0.5 + 0.5 * Math.sin(Math.PI * (a - 0.5)), i = 0.5 + 0.5 * Math.sin(Math.PI * a), s = 0.8) : (o = 0.267 * (1 - a) + 0.993 * a, i = 5e-3 * (1 - a) + 0.906 * a, s = 0.337 * (1 - a) + 0.144 * a), r[n * 4 + 0] = o * 255, r[n * 4 + 1] = i * 255, r[n * 4 + 2] = s * 255, r[n * 4 + 3] = 255;
|
|
117
100
|
}
|
|
118
101
|
return r;
|
|
119
102
|
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
for (let
|
|
123
|
-
if (!Number.isFinite(t[
|
|
124
|
-
const
|
|
125
|
-
i &&
|
|
103
|
+
function pt(t, e, r, n, a, o, i = !1) {
|
|
104
|
+
const s = t.length, l = [], c = [], u = o / 2, v = o / 10 / 2;
|
|
105
|
+
for (let d = 0; d < s; d++) {
|
|
106
|
+
if (!Number.isFinite(t[d])) continue;
|
|
107
|
+
const p = a[d] >= e[d], x = p ? l : c, b = Math.max(e[d], a[d]), m = Math.min(e[d], a[d]);
|
|
108
|
+
i && p || fe(x, t[d] - u, m, t[d] + u, b), fe(x, t[d] - v, n[d], t[d] + v, r[d]);
|
|
126
109
|
}
|
|
127
110
|
return {
|
|
128
|
-
bullish: new Float32Array(
|
|
111
|
+
bullish: new Float32Array(l),
|
|
129
112
|
bearish: new Float32Array(c)
|
|
130
113
|
};
|
|
131
114
|
}
|
|
132
|
-
function
|
|
133
|
-
t.push(e, r, n, r, e,
|
|
115
|
+
function fe(t, e, r, n, a) {
|
|
116
|
+
t.push(e, r, n, r, e, a), t.push(n, r, n, a, e, a);
|
|
134
117
|
}
|
|
135
|
-
function
|
|
136
|
-
const r = e.getData(), n = e.getId(),
|
|
118
|
+
function te(t, e) {
|
|
119
|
+
const r = e.getData(), n = e.getId(), a = e.getType();
|
|
137
120
|
if (e.hasErrorData()) {
|
|
138
|
-
const
|
|
121
|
+
const o = tt(
|
|
139
122
|
r.x,
|
|
140
123
|
r.y,
|
|
141
124
|
{
|
|
@@ -149,72 +132,75 @@ function de(t, e) {
|
|
|
149
132
|
xErrorPlus: r.xErrorPlus
|
|
150
133
|
}
|
|
151
134
|
);
|
|
152
|
-
t.renderer.createBuffer(`${n}_errors`,
|
|
135
|
+
t.renderer.createBuffer(`${n}_errors`, o);
|
|
153
136
|
}
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
137
|
+
if (a === "step" || a === "step+scatter") {
|
|
138
|
+
const o = e.getStyle().stepMode ?? "after";
|
|
156
139
|
t.renderer.createBuffer(
|
|
157
140
|
`${n}_step`,
|
|
158
|
-
|
|
141
|
+
rt(r.x, r.y, o)
|
|
159
142
|
);
|
|
160
143
|
}
|
|
161
144
|
}
|
|
162
|
-
function
|
|
163
|
-
const r = e.getData(), n = e.getStyle().barWidth ??
|
|
145
|
+
function mt(t, e) {
|
|
146
|
+
const r = e.getData(), n = e.getStyle().barWidth ?? j(r.x);
|
|
164
147
|
t.renderer.createBuffer(
|
|
165
148
|
e.getId(),
|
|
166
|
-
|
|
167
|
-
),
|
|
149
|
+
He(r.x, r.y, n)
|
|
150
|
+
), te(t, e), e.resetLastAppendCount();
|
|
168
151
|
}
|
|
169
|
-
function
|
|
170
|
-
var
|
|
171
|
-
(i = (a = t.renderer) == null ? void 0 : a.installHeatmapProgram) == null || i.call(a);
|
|
152
|
+
function yt(t, e) {
|
|
153
|
+
var o, i, s, l;
|
|
172
154
|
const r = e.getHeatmapData(), n = e.getHeatmapStyle();
|
|
173
155
|
if (!r || r.xValues.length < 2) return;
|
|
174
|
-
t.renderer.
|
|
156
|
+
if (typeof ((o = t.renderer) == null ? void 0 : o.createColormapTexture) != "function") {
|
|
157
|
+
e.resetLastAppendCount();
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
(s = (i = t.renderer).installHeatmapProgram) == null || s.call(i), t.renderer.createBuffer(
|
|
175
161
|
e.getId(),
|
|
176
|
-
|
|
162
|
+
ht(r.xValues, r.yValues, r.zValues)
|
|
177
163
|
);
|
|
178
|
-
const
|
|
164
|
+
const a = ((l = n == null ? void 0 : n.colorScale) == null ? void 0 : l.name) || "viridis";
|
|
179
165
|
t.renderer.createColormapTexture(
|
|
180
166
|
`${e.getId()}_colormap`,
|
|
181
|
-
|
|
167
|
+
gt(a)
|
|
182
168
|
), e.resetLastAppendCount();
|
|
183
169
|
}
|
|
184
|
-
function
|
|
170
|
+
function vt(t, e) {
|
|
185
171
|
const r = e.getData(), n = e.getId();
|
|
186
172
|
if (r.open && r.high && r.low && r.close) {
|
|
187
|
-
const
|
|
173
|
+
const a = e.getStyle().barWidth ?? j(r.x), o = !!e.getStyle().hollow, { bullish: i, bearish: s } = pt(
|
|
188
174
|
r.x,
|
|
189
175
|
r.open,
|
|
190
176
|
r.high,
|
|
191
177
|
r.low,
|
|
192
178
|
r.close,
|
|
193
|
-
|
|
194
|
-
|
|
179
|
+
a,
|
|
180
|
+
o
|
|
195
181
|
);
|
|
196
|
-
t.renderer.createBuffer(`${n}_bullish`, i), t.renderer.createBuffer(`${n}_bearish`,
|
|
182
|
+
t.renderer.createBuffer(`${n}_bullish`, i), t.renderer.createBuffer(`${n}_bearish`, s), e.bullishCount = i.length / 2, e.bearishCount = s.length / 2;
|
|
197
183
|
}
|
|
198
184
|
e.resetLastAppendCount();
|
|
199
185
|
}
|
|
200
|
-
function
|
|
186
|
+
function bt(t, e) {
|
|
201
187
|
const r = e.getData(), n = e.getId();
|
|
202
188
|
if (r.low && r.open && r.median && r.close && r.high) {
|
|
203
|
-
const
|
|
189
|
+
const a = e.getStyle().barWidth ?? j(r.x), { lines: o, boxes: i } = dt(
|
|
204
190
|
r.x,
|
|
205
191
|
r.low,
|
|
206
192
|
r.open,
|
|
207
193
|
r.median,
|
|
208
194
|
r.close,
|
|
209
195
|
r.high,
|
|
210
|
-
|
|
196
|
+
a
|
|
211
197
|
);
|
|
212
|
-
t.renderer.createBuffer(`${n}_box_lines`,
|
|
198
|
+
t.renderer.createBuffer(`${n}_box_lines`, o), t.renderer.createBuffer(`${n}_box_faces`, i);
|
|
213
199
|
}
|
|
214
200
|
e.resetLastAppendCount();
|
|
215
201
|
}
|
|
216
|
-
function
|
|
217
|
-
const r = e.getData(), n = e.getId(),
|
|
202
|
+
function xt(t, e) {
|
|
203
|
+
const r = e.getData(), n = e.getId(), a = e.getStyle().barWidth ?? j(r.x), o = e.getStyle().isSubtotal, i = ft(r.x, r.y, a, o);
|
|
218
204
|
t.renderer.createBuffer(`${n}_wf_positive`, i.positiveData), t.renderer.createBuffer(`${n}_wf_negative`, i.negativeData), t.renderer.createBuffer(`${n}_wf_subtotal`, i.subtotalData), t.renderer.createBuffer(`${n}_wf_connectors`, i.connectorData), e.waterfallCounts = {
|
|
219
205
|
positive: i.positiveCount,
|
|
220
206
|
negative: i.negativeCount,
|
|
@@ -222,34 +208,34 @@ function bt(t, e) {
|
|
|
222
208
|
connectors: i.connectorData.length / 2
|
|
223
209
|
}, e.resetLastAppendCount();
|
|
224
210
|
}
|
|
225
|
-
function
|
|
211
|
+
function Pt(t, e) {
|
|
226
212
|
const r = e.getPolarData();
|
|
227
213
|
if (!r || r.r.length === 0) return;
|
|
228
|
-
const n = e.getStyle(),
|
|
214
|
+
const n = e.getStyle(), a = n.angleMode || "degrees", o = n.closePath !== !1;
|
|
229
215
|
if (n.fill || !1) {
|
|
230
|
-
const
|
|
231
|
-
t.renderer.createBuffer(e.getId(),
|
|
216
|
+
const s = Qe(r, a, o);
|
|
217
|
+
t.renderer.createBuffer(e.getId(), s);
|
|
232
218
|
} else {
|
|
233
|
-
const
|
|
234
|
-
t.renderer.createBuffer(e.getId(),
|
|
219
|
+
const s = Ze(r, a, o);
|
|
220
|
+
t.renderer.createBuffer(e.getId(), s);
|
|
235
221
|
}
|
|
236
222
|
e.resetLastAppendCount();
|
|
237
223
|
}
|
|
238
|
-
function
|
|
239
|
-
const r = e.getData(),
|
|
240
|
-
t.renderer.createBuffer(e.getId(),
|
|
224
|
+
function he(t, e) {
|
|
225
|
+
const r = e.getData(), a = e.getType() === "area" ? new Float32Array(r.x.length).fill(0) : r.y2 || new Float32Array(r.x.length).fill(0);
|
|
226
|
+
t.renderer.createBuffer(e.getId(), et(r.x, r.y, a)), te(t, e), e.resetLastAppendCount();
|
|
241
227
|
}
|
|
242
228
|
function wt(t, e) {
|
|
243
229
|
const r = e.getData();
|
|
244
|
-
t.renderer.createBuffer(e.getId(),
|
|
230
|
+
t.renderer.createBuffer(e.getId(), Ae(r.x, r.y)), te(t, e), e.resetLastAppendCount();
|
|
245
231
|
}
|
|
246
|
-
let
|
|
247
|
-
function
|
|
248
|
-
if (!
|
|
249
|
-
|
|
232
|
+
let ge = !1;
|
|
233
|
+
function At() {
|
|
234
|
+
if (!ge) {
|
|
235
|
+
ge = !0, W("bar", mt), W("heatmap", yt), W("candlestick", vt), W("boxplot", bt), W("waterfall", xt), W("polar", Pt), W("band", he), W("area", he), W("heikin-ashi", (t, e) => {
|
|
250
236
|
var n;
|
|
251
237
|
const r = e.getData();
|
|
252
|
-
(n = r == null ? void 0 : r.x) != null && n.length && (t.renderer.createBuffer(e.getId(),
|
|
238
|
+
(n = r == null ? void 0 : r.x) != null && n.length && (t.renderer.createBuffer(e.getId(), Ae(r.x, r.y)), e.resetLastAppendCount());
|
|
253
239
|
});
|
|
254
240
|
for (const t of [
|
|
255
241
|
"line",
|
|
@@ -258,34 +244,34 @@ function Pt() {
|
|
|
258
244
|
"step",
|
|
259
245
|
"step+scatter"
|
|
260
246
|
])
|
|
261
|
-
|
|
247
|
+
W(t, wt);
|
|
262
248
|
}
|
|
263
249
|
}
|
|
264
|
-
function St(t, e, r, n,
|
|
265
|
-
t.useProgram(e.program), t.bindBuffer(t.ARRAY_BUFFER, r), t.enableVertexAttribArray(e.attributes.position), t.vertexAttribPointer(e.attributes.position, 2, t.FLOAT, !1, 12, 0), e.attributes.value !== void 0 && e.attributes.value !== -1 && (t.enableVertexAttribArray(e.attributes.value), t.vertexAttribPointer(e.attributes.value, 1, t.FLOAT, !1, 12, 8)), t.uniform2f(e.uniforms.uScale,
|
|
250
|
+
function St(t, e, r, n, a, o = { min: 0, max: 1 }, i) {
|
|
251
|
+
t.useProgram(e.program), t.bindBuffer(t.ARRAY_BUFFER, r), t.enableVertexAttribArray(e.attributes.position), t.vertexAttribPointer(e.attributes.position, 2, t.FLOAT, !1, 12, 0), e.attributes.value !== void 0 && e.attributes.value !== -1 && (t.enableVertexAttribArray(e.attributes.value), t.vertexAttribPointer(e.attributes.value, 1, t.FLOAT, !1, 12, 8)), t.uniform2f(e.uniforms.uScale, a.scale[0], a.scale[1]), t.uniform2f(
|
|
266
252
|
e.uniforms.uTranslate,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
), e.uniforms.uMinValue && t.uniform1f(e.uniforms.uMinValue,
|
|
253
|
+
a.translate[0],
|
|
254
|
+
a.translate[1]
|
|
255
|
+
), e.uniforms.uMinValue && t.uniform1f(e.uniforms.uMinValue, o.min), e.uniforms.uMaxValue && t.uniform1f(e.uniforms.uMaxValue, o.max), i && e.uniforms.uColormap ? (t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(e.uniforms.uColormap, 0)) : e.uniforms.uColormap && (t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, null)), t.drawArrays(t.TRIANGLES, 0, n), t.disableVertexAttribArray(e.attributes.position), e.attributes.value !== void 0 && e.attributes.value !== -1 && t.disableVertexAttribArray(e.attributes.value);
|
|
270
256
|
}
|
|
271
|
-
function Tt(t, e, r, n,
|
|
272
|
-
t.useProgram(e.program), t.bindBuffer(t.ARRAY_BUFFER, r), t.enableVertexAttribArray(e.attributes.position), t.vertexAttribPointer(e.attributes.position, 2, t.FLOAT, !1, 0, 0), t.uniform2f(e.uniforms.uScale,
|
|
257
|
+
function Tt(t, e, r, n, a, o) {
|
|
258
|
+
t.useProgram(e.program), t.bindBuffer(t.ARRAY_BUFFER, r), t.enableVertexAttribArray(e.attributes.position), t.vertexAttribPointer(e.attributes.position, 2, t.FLOAT, !1, 0, 0), t.uniform2f(e.uniforms.uScale, a.scale[0], a.scale[1]), t.uniform2f(
|
|
273
259
|
e.uniforms.uTranslate,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
), t.uniform4f(e.uniforms.uColor,
|
|
260
|
+
a.translate[0],
|
|
261
|
+
a.translate[1]
|
|
262
|
+
), t.uniform4f(e.uniforms.uColor, o[0], o[1], o[2], o[3]), t.drawArrays(t.TRIANGLES, 0, n), t.disableVertexAttribArray(e.attributes.position);
|
|
277
263
|
}
|
|
278
|
-
function
|
|
279
|
-
const
|
|
264
|
+
function Ct(t, e, r, n, a) {
|
|
265
|
+
const o = nt(a);
|
|
280
266
|
t.useProgram(e.line.program), t.bindBuffer(t.ARRAY_BUFFER, r.boxBuffer), t.enableVertexAttribArray(e.line.attributes.position), t.vertexAttribPointer(e.line.attributes.position, 2, t.FLOAT, !1, 0, 0), t.uniform2f(e.line.uniforms.uScale, n.scale[0], n.scale[1]), t.uniform2f(
|
|
281
267
|
e.line.uniforms.uTranslate,
|
|
282
268
|
n.translate[0],
|
|
283
269
|
n.translate[1]
|
|
284
270
|
);
|
|
285
|
-
const i = [...
|
|
286
|
-
i[3] *= 0.5, t.uniform4f(e.line.uniforms.uColor, i[0], i[1], i[2], i[3]), t.drawArrays(t.TRIANGLES, 0, r.boxCount), t.uniform4f(e.line.uniforms.uColor,
|
|
271
|
+
const i = [...o];
|
|
272
|
+
i[3] *= 0.5, t.uniform4f(e.line.uniforms.uColor, i[0], i[1], i[2], i[3]), t.drawArrays(t.TRIANGLES, 0, r.boxCount), t.uniform4f(e.line.uniforms.uColor, o[0], o[1], o[2], o[3]), t.lineWidth(a.width || 1), t.bindBuffer(t.ARRAY_BUFFER, r.linesBuffer), t.vertexAttribPointer(e.line.attributes.position, 2, t.FLOAT, !1, 0, 0), t.drawArrays(t.LINES, 0, r.linesCount), t.disableVertexAttribArray(e.line.attributes.position);
|
|
287
273
|
}
|
|
288
|
-
function
|
|
274
|
+
function Mt(t, e, r) {
|
|
289
275
|
St(
|
|
290
276
|
t.gl,
|
|
291
277
|
t.programs.heatmapProgram,
|
|
@@ -296,7 +282,7 @@ function Ct(t, e, r) {
|
|
|
296
282
|
e.colormapTexture
|
|
297
283
|
);
|
|
298
284
|
}
|
|
299
|
-
function
|
|
285
|
+
function Ft(t, e, r, n) {
|
|
300
286
|
Tt(
|
|
301
287
|
t.gl,
|
|
302
288
|
t.programs.lineProgram,
|
|
@@ -306,8 +292,8 @@ function Mt(t, e, r, n) {
|
|
|
306
292
|
n
|
|
307
293
|
);
|
|
308
294
|
}
|
|
309
|
-
function
|
|
310
|
-
e.boxBuffer && e.boxLinesBuffer &&
|
|
295
|
+
function Dt(t, e, r) {
|
|
296
|
+
e.boxBuffer && e.boxLinesBuffer && Ct(
|
|
311
297
|
t.gl,
|
|
312
298
|
{ line: t.programs.lineProgram, point: t.programs.pointProgram },
|
|
313
299
|
{
|
|
@@ -321,411 +307,222 @@ function Ft(t, e, r) {
|
|
|
321
307
|
);
|
|
322
308
|
}
|
|
323
309
|
function Et(t, e, r) {
|
|
324
|
-
const { gl: n, programs:
|
|
325
|
-
e.wfPositiveBuffer && e.wfPositiveCount && e.wfPositiveCount > 0 && (n.useProgram(
|
|
326
|
-
|
|
310
|
+
const { gl: n, programs: a, dpr: o } = t, i = U(e.style.positiveColor || "#22c55e"), s = U(e.style.negativeColor || "#ef4444"), l = U(e.style.subtotalColor || "#3b82f6"), c = U(e.style.connectorColor || "#64748b");
|
|
311
|
+
e.wfPositiveBuffer && e.wfPositiveCount && e.wfPositiveCount > 0 && (n.useProgram(a.lineProgram.program), n.bindBuffer(n.ARRAY_BUFFER, e.wfPositiveBuffer), n.enableVertexAttribArray(a.lineProgram.attributes.position), n.vertexAttribPointer(
|
|
312
|
+
a.lineProgram.attributes.position,
|
|
327
313
|
2,
|
|
328
314
|
n.FLOAT,
|
|
329
315
|
!1,
|
|
330
316
|
0,
|
|
331
317
|
0
|
|
332
318
|
), n.uniform2f(
|
|
333
|
-
|
|
319
|
+
a.lineProgram.uniforms.uScale,
|
|
334
320
|
r.scale[0],
|
|
335
321
|
r.scale[1]
|
|
336
322
|
), n.uniform2f(
|
|
337
|
-
|
|
323
|
+
a.lineProgram.uniforms.uTranslate,
|
|
338
324
|
r.translate[0],
|
|
339
325
|
r.translate[1]
|
|
340
326
|
), n.uniform4f(
|
|
341
|
-
|
|
327
|
+
a.lineProgram.uniforms.uColor,
|
|
342
328
|
i[0],
|
|
343
329
|
i[1],
|
|
344
330
|
i[2],
|
|
345
331
|
0.9
|
|
346
|
-
), n.drawArrays(n.TRIANGLES, 0, e.wfPositiveCount)), e.wfNegativeBuffer && e.wfNegativeCount && e.wfNegativeCount > 0 && (n.useProgram(
|
|
347
|
-
|
|
332
|
+
), n.drawArrays(n.TRIANGLES, 0, e.wfPositiveCount)), e.wfNegativeBuffer && e.wfNegativeCount && e.wfNegativeCount > 0 && (n.useProgram(a.lineProgram.program), n.bindBuffer(n.ARRAY_BUFFER, e.wfNegativeBuffer), n.enableVertexAttribArray(a.lineProgram.attributes.position), n.vertexAttribPointer(
|
|
333
|
+
a.lineProgram.attributes.position,
|
|
348
334
|
2,
|
|
349
335
|
n.FLOAT,
|
|
350
336
|
!1,
|
|
351
337
|
0,
|
|
352
338
|
0
|
|
353
339
|
), n.uniform2f(
|
|
354
|
-
|
|
340
|
+
a.lineProgram.uniforms.uScale,
|
|
355
341
|
r.scale[0],
|
|
356
342
|
r.scale[1]
|
|
357
343
|
), n.uniform2f(
|
|
358
|
-
|
|
344
|
+
a.lineProgram.uniforms.uTranslate,
|
|
359
345
|
r.translate[0],
|
|
360
346
|
r.translate[1]
|
|
361
347
|
), n.uniform4f(
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
348
|
+
a.lineProgram.uniforms.uColor,
|
|
349
|
+
s[0],
|
|
350
|
+
s[1],
|
|
351
|
+
s[2],
|
|
366
352
|
0.9
|
|
367
|
-
), n.drawArrays(n.TRIANGLES, 0, e.wfNegativeCount)), e.wfSubtotalBuffer && e.wfSubtotalCount && e.wfSubtotalCount > 0 && (n.useProgram(
|
|
368
|
-
|
|
353
|
+
), n.drawArrays(n.TRIANGLES, 0, e.wfNegativeCount)), e.wfSubtotalBuffer && e.wfSubtotalCount && e.wfSubtotalCount > 0 && (n.useProgram(a.lineProgram.program), n.bindBuffer(n.ARRAY_BUFFER, e.wfSubtotalBuffer), n.enableVertexAttribArray(a.lineProgram.attributes.position), n.vertexAttribPointer(
|
|
354
|
+
a.lineProgram.attributes.position,
|
|
369
355
|
2,
|
|
370
356
|
n.FLOAT,
|
|
371
357
|
!1,
|
|
372
358
|
0,
|
|
373
359
|
0
|
|
374
360
|
), n.uniform2f(
|
|
375
|
-
|
|
361
|
+
a.lineProgram.uniforms.uScale,
|
|
376
362
|
r.scale[0],
|
|
377
363
|
r.scale[1]
|
|
378
364
|
), n.uniform2f(
|
|
379
|
-
|
|
365
|
+
a.lineProgram.uniforms.uTranslate,
|
|
380
366
|
r.translate[0],
|
|
381
367
|
r.translate[1]
|
|
382
368
|
), n.uniform4f(
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
369
|
+
a.lineProgram.uniforms.uColor,
|
|
370
|
+
l[0],
|
|
371
|
+
l[1],
|
|
372
|
+
l[2],
|
|
387
373
|
0.9
|
|
388
|
-
), n.drawArrays(n.TRIANGLES, 0, e.wfSubtotalCount)), e.style.showConnectors !== !1 && e.wfConnectorBuffer && e.wfConnectorCount && e.wfConnectorCount > 0 && (n.useProgram(
|
|
389
|
-
|
|
374
|
+
), n.drawArrays(n.TRIANGLES, 0, e.wfSubtotalCount)), e.style.showConnectors !== !1 && e.wfConnectorBuffer && e.wfConnectorCount && e.wfConnectorCount > 0 && (n.useProgram(a.lineProgram.program), n.bindBuffer(n.ARRAY_BUFFER, e.wfConnectorBuffer), n.enableVertexAttribArray(a.lineProgram.attributes.position), n.vertexAttribPointer(
|
|
375
|
+
a.lineProgram.attributes.position,
|
|
390
376
|
2,
|
|
391
377
|
n.FLOAT,
|
|
392
378
|
!1,
|
|
393
379
|
0,
|
|
394
380
|
0
|
|
395
381
|
), n.uniform2f(
|
|
396
|
-
|
|
382
|
+
a.lineProgram.uniforms.uScale,
|
|
397
383
|
r.scale[0],
|
|
398
384
|
r.scale[1]
|
|
399
385
|
), n.uniform2f(
|
|
400
|
-
|
|
386
|
+
a.lineProgram.uniforms.uTranslate,
|
|
401
387
|
r.translate[0],
|
|
402
388
|
r.translate[1]
|
|
403
389
|
), n.uniform4f(
|
|
404
|
-
|
|
390
|
+
a.lineProgram.uniforms.uColor,
|
|
405
391
|
c[0],
|
|
406
392
|
c[1],
|
|
407
393
|
c[2],
|
|
408
394
|
0.6
|
|
409
|
-
), n.lineWidth(1), n.drawArrays(n.LINES, 0, e.wfConnectorCount)), n.disableVertexAttribArray(
|
|
395
|
+
), n.lineWidth(1), n.drawArrays(n.LINES, 0, e.wfConnectorCount)), n.disableVertexAttribArray(a.lineProgram.attributes.position);
|
|
410
396
|
}
|
|
411
|
-
let
|
|
412
|
-
function
|
|
413
|
-
|
|
397
|
+
let pe = !1;
|
|
398
|
+
function Rt() {
|
|
399
|
+
pe || (pe = !0, N(
|
|
414
400
|
"heatmap",
|
|
415
|
-
(t, e, r) =>
|
|
416
|
-
),
|
|
401
|
+
(t, e, r) => Mt(t, e, r)
|
|
402
|
+
), N(
|
|
417
403
|
"bar",
|
|
418
|
-
(t, e, r, n) =>
|
|
419
|
-
),
|
|
404
|
+
(t, e, r, n) => Ft(t, e, r, n)
|
|
405
|
+
), N(
|
|
420
406
|
"boxplot",
|
|
421
|
-
(t, e, r) =>
|
|
422
|
-
),
|
|
407
|
+
(t, e, r) => Dt(t, e, r)
|
|
408
|
+
), N(
|
|
423
409
|
"waterfall",
|
|
424
410
|
(t, e, r) => Et(t, e, r)
|
|
425
411
|
));
|
|
426
412
|
}
|
|
427
|
-
function
|
|
428
|
-
const { value:
|
|
429
|
-
needleColor:
|
|
430
|
-
needleWidth:
|
|
413
|
+
function It(t, e, r, n) {
|
|
414
|
+
const { value: a, min: o, max: i } = e, {
|
|
415
|
+
needleColor: s = "#333",
|
|
416
|
+
needleWidth: l = 3,
|
|
431
417
|
ranges: c = [],
|
|
432
418
|
radius: u = 0.8,
|
|
433
|
-
startAngle:
|
|
434
|
-
endAngle:
|
|
435
|
-
showValue:
|
|
436
|
-
valueColor:
|
|
437
|
-
valueSize:
|
|
419
|
+
startAngle: h = 135,
|
|
420
|
+
endAngle: v = 405,
|
|
421
|
+
showValue: d = !0,
|
|
422
|
+
valueColor: p = "#fff",
|
|
423
|
+
valueSize: x = 24,
|
|
438
424
|
label: b
|
|
439
|
-
} = r, m = n.x + n.width / 2,
|
|
440
|
-
t.save(), t.beginPath(), t.arc(m,
|
|
441
|
-
for (const
|
|
442
|
-
const
|
|
425
|
+
} = r, m = n.x + n.width / 2, y = n.y + n.height / 2, g = Math.min(n.width, n.height) / 2 * u, f = v - h, A = Math.max(0, Math.min(1, (a - o) / (i - o))), w = (h + A * f) * (Math.PI / 180);
|
|
426
|
+
t.save(), t.beginPath(), t.arc(m, y, g, h * (Math.PI / 180), v * (Math.PI / 180)), t.strokeStyle = "rgba(255, 255, 255, 0.1)", t.lineWidth = g * 0.2, t.lineCap = "round", t.stroke();
|
|
427
|
+
for (const S of c) {
|
|
428
|
+
const D = Math.max(0, Math.min(1, (S.from - o) / (i - o))), T = Math.max(0, Math.min(1, (S.to - o) / (i - o)));
|
|
443
429
|
t.beginPath(), t.arc(
|
|
444
430
|
m,
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
(
|
|
448
|
-
(
|
|
449
|
-
), t.strokeStyle =
|
|
431
|
+
y,
|
|
432
|
+
g,
|
|
433
|
+
(h + D * f) * (Math.PI / 180),
|
|
434
|
+
(h + T * f) * (Math.PI / 180)
|
|
435
|
+
), t.strokeStyle = S.color, t.lineWidth = g * 0.2, t.stroke();
|
|
450
436
|
}
|
|
451
|
-
const
|
|
452
|
-
for (let
|
|
453
|
-
const
|
|
454
|
-
t.beginPath(), t.moveTo(m +
|
|
437
|
+
const F = 11;
|
|
438
|
+
for (let S = 0; S < F; S++) {
|
|
439
|
+
const D = (h + S / (F - 1) * f) * (Math.PI / 180), T = g * 0.85, I = g * 0.95;
|
|
440
|
+
t.beginPath(), t.moveTo(m + T * Math.cos(D), y + T * Math.sin(D)), t.lineTo(m + I * Math.cos(D), y + I * Math.sin(D)), t.strokeStyle = "rgba(255, 255, 255, 0.5)", t.lineWidth = 2, t.stroke();
|
|
455
441
|
}
|
|
456
|
-
t.beginPath(), t.moveTo(m,
|
|
457
|
-
}
|
|
458
|
-
function
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
} =
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
});
|
|
476
|
-
const p = Array.from(v), f = /* @__PURE__ */ new Map(), T = new Set(a.map((x) => x.target));
|
|
477
|
-
p.filter((x) => !T.has(x)).forEach((x) => f.set(x, 0));
|
|
478
|
-
let L = !0;
|
|
479
|
-
for (; L; )
|
|
480
|
-
L = !1, a.forEach((x) => {
|
|
481
|
-
const A = f.get(x.source);
|
|
482
|
-
if (A !== void 0) {
|
|
483
|
-
const E = f.get(x.target), _ = A + 1;
|
|
484
|
-
(E === void 0 || _ > E) && (f.set(x.target, _), L = !0);
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
p.forEach((x) => {
|
|
488
|
-
f.get(x) === void 0 && f.set(x, 0);
|
|
489
|
-
});
|
|
490
|
-
const D = Math.max(...Array.from(f.values())), k = Array.from({ length: D + 1 }, () => []);
|
|
491
|
-
p.forEach((x) => k[f.get(x)].push(x));
|
|
492
|
-
const M = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
|
|
493
|
-
a.forEach((x) => {
|
|
494
|
-
B.set(x.source, (B.get(x.source) || 0) + x.value), M.set(x.target, (M.get(x.target) || 0) + x.value);
|
|
495
|
-
});
|
|
496
|
-
const P = (x) => Math.max(M.get(x) || 0, B.get(x) || 0);
|
|
497
|
-
let F = 0;
|
|
498
|
-
k.forEach((x) => {
|
|
499
|
-
let A = 0;
|
|
500
|
-
x.forEach((E) => A += P(E)), A > F && (F = A);
|
|
501
|
-
});
|
|
502
|
-
const C = /* @__PURE__ */ new Map(), $ = k.length, I = (m.width - i) / Math.max(1, $ - 1);
|
|
503
|
-
k.forEach((x, A) => {
|
|
504
|
-
const E = m.x + A * I, _ = [];
|
|
505
|
-
let O = 0;
|
|
506
|
-
x.forEach((z) => {
|
|
507
|
-
const G = P(z), V = F > 0 ? G / F * (m.height * 0.9) : 20;
|
|
508
|
-
_.push(V), O += V;
|
|
509
|
-
});
|
|
510
|
-
const q = (x.length - 1) * l, j = O + q;
|
|
511
|
-
let H = m.y + (m.height - j) / 2;
|
|
512
|
-
x.forEach((z, G) => {
|
|
513
|
-
const V = _[G];
|
|
514
|
-
let N = s[G % s.length];
|
|
515
|
-
if (o.length > 0) {
|
|
516
|
-
const X = o.find((K) => K.id === z);
|
|
517
|
-
X != null && X.color && (N = X.color);
|
|
518
|
-
}
|
|
519
|
-
C.set(z, { x: E, y: H, width: i, height: V, color: N, value: P(z) }), H += V + l;
|
|
520
|
-
});
|
|
521
|
-
}), t.save();
|
|
522
|
-
const Y = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
|
|
523
|
-
a.forEach((x) => {
|
|
524
|
-
const A = C.get(x.source), E = C.get(x.target);
|
|
525
|
-
if (!A || !E) return;
|
|
526
|
-
const _ = Y.get(x.source) || 0, O = R.get(x.target) || 0, q = B.get(x.source) || 1, j = M.get(x.target) || 1, H = x.value / q * A.height, z = x.value / j * E.height, G = A.x + A.width, V = A.y + _, N = V + H, X = E.x, K = E.y + O, ee = K + z, J = (X - G) * 0.5, te = t.createLinearGradient(G, (V + N) / 2, X, (K + ee) / 2);
|
|
527
|
-
te.addColorStop(0, A.color), te.addColorStop(1, E.color), t.beginPath(), t.moveTo(G, V), t.bezierCurveTo(G + J, V, X - J, K, X, K), t.lineTo(X, ee), t.bezierCurveTo(X - J, ee, G + J, N, G, N), t.closePath(), t.fillStyle = te, t.globalAlpha = c, t.fill(), t.strokeStyle = A.color, t.globalAlpha = c * 0.3, t.lineWidth = 0.5, t.stroke(), Y.set(x.source, _ + H), R.set(x.target, O + z);
|
|
528
|
-
}), t.restore(), t.save(), t.globalAlpha = 1, C.forEach((x) => {
|
|
529
|
-
t.fillStyle = x.color, t.fillRect(x.x, x.y, x.width, x.height);
|
|
530
|
-
const A = t.createLinearGradient(x.x, x.y, x.x + x.width, x.y);
|
|
531
|
-
A.addColorStop(0, "rgba(255, 255, 255, 0.15)"), A.addColorStop(1, "rgba(0, 0, 0, 0.15)"), t.fillStyle = A, t.fillRect(x.x, x.y, x.width, x.height);
|
|
532
|
-
}), t.restore(), u && (t.save(), t.font = "bold 11px Inter, -apple-system, sans-serif", t.textBaseline = "middle", C.forEach((x, A) => {
|
|
533
|
-
let E = String(A);
|
|
534
|
-
const _ = o.find((j) => j.id === A);
|
|
535
|
-
_ != null && _.name && (E = _.name);
|
|
536
|
-
const O = x.x <= m.x + 5, q = x.x >= m.x + m.width - i - 5;
|
|
537
|
-
t.shadowBlur = 3, t.shadowColor = "rgba(0, 0, 0, 0.7)", t.fillStyle = "#ffffff", O ? (t.textAlign = "right", t.fillText(E, x.x - 10, x.y + x.height / 2)) : q ? (t.textAlign = "left", t.fillText(E, x.x + x.width + 10, x.y + x.height / 2)) : (t.textAlign = "center", t.fillText(E, x.x + x.width / 2, x.y - 10));
|
|
442
|
+
t.beginPath(), t.moveTo(m, y), t.lineTo(m + g * 0.9 * Math.cos(w), y + g * 0.9 * Math.sin(w)), t.strokeStyle = s, t.lineWidth = l, t.lineCap = "round", t.shadowColor = s, t.shadowBlur = 10, t.stroke(), t.shadowBlur = 0, t.beginPath(), t.arc(m, y, 8, 0, Math.PI * 2), t.fillStyle = s, t.fill(), t.strokeStyle = "#fff", t.lineWidth = 2, t.stroke(), d && (t.textAlign = "center", t.textBaseline = "middle", t.font = `bold ${x}px Inter, sans-serif`, t.fillStyle = p, t.fillText(a.toFixed(1), m, y + g * 0.4), b && (t.font = `${x * 0.5}px Inter, sans-serif`, t.fillStyle = "rgba(255, 255, 255, 0.6)", t.fillText(b, m, y + g * 0.6))), t.restore();
|
|
443
|
+
}
|
|
444
|
+
function Lt(t, e, r, n) {
|
|
445
|
+
const a = ze(e, r, n);
|
|
446
|
+
if (!a) return;
|
|
447
|
+
const { nodeRegistry: o, links: i, nodeOutValue: s, nodeInValue: l, workingArea: c } = a, { linkOpacity: u, showLabels: h, nodeWidth: v } = a.style;
|
|
448
|
+
t.save(), i.forEach((d) => {
|
|
449
|
+
const p = d.source, x = d.target, b = d.sourceOffset, m = d.targetOffset, y = s.get(d.link.source) || 1, g = l.get(d.link.target) || 1, f = d.link.value / y * p.height, A = d.link.value / g * x.height, w = p.x + p.width, F = p.y + b, S = F + f, D = x.x, T = x.y + m, I = T + A, P = (D - w) * 0.5, C = t.createLinearGradient(w, (F + S) / 2, D, (T + I) / 2);
|
|
450
|
+
C.addColorStop(0, p.color), C.addColorStop(1, x.color), t.beginPath(), t.moveTo(w, F), t.bezierCurveTo(w + P, F, D - P, T, D, T), t.lineTo(D, I), t.bezierCurveTo(D - P, I, w + P, S, w, S), t.closePath(), t.fillStyle = C, t.globalAlpha = u, t.fill(), t.strokeStyle = p.color, t.globalAlpha = u * 0.3, t.lineWidth = 0.5, t.stroke();
|
|
451
|
+
}), t.restore(), t.save(), t.globalAlpha = 1, o.forEach((d) => {
|
|
452
|
+
t.fillStyle = d.color, t.fillRect(d.x, d.y, d.width, d.height);
|
|
453
|
+
const p = t.createLinearGradient(d.x, d.y, d.x + d.width, d.y);
|
|
454
|
+
p.addColorStop(0, "rgba(255, 255, 255, 0.15)"), p.addColorStop(1, "rgba(0, 0, 0, 0.15)"), t.fillStyle = p, t.fillRect(d.x, d.y, d.width, d.height);
|
|
455
|
+
}), t.restore(), h && (t.save(), t.font = "bold 11px Inter, -apple-system, sans-serif", t.textBaseline = "middle", o.forEach((d, p) => {
|
|
456
|
+
let x = String(p);
|
|
457
|
+
const b = e.nodes.find((g) => g.id === p);
|
|
458
|
+
b != null && b.name && (x = b.name);
|
|
459
|
+
const m = d.x <= c.x + 5, y = d.x >= c.x + c.width - v - 5;
|
|
460
|
+
t.shadowBlur = 3, t.shadowColor = "rgba(0, 0, 0, 0.7)", t.fillStyle = "#ffffff", m ? (t.textAlign = "right", t.fillText(x, d.x - 10, d.y + d.height / 2)) : y ? (t.textAlign = "left", t.fillText(x, d.x + d.width + 10, d.y + d.height / 2)) : (t.textAlign = "center", t.fillText(x, d.x + d.width / 2, d.y - 10));
|
|
538
461
|
}), t.restore());
|
|
539
462
|
}
|
|
540
|
-
let
|
|
541
|
-
function
|
|
542
|
-
|
|
543
|
-
const n = e.getGaugeData(),
|
|
544
|
-
n &&
|
|
545
|
-
}),
|
|
546
|
-
const n = e.getSankeyData(),
|
|
547
|
-
n &&
|
|
463
|
+
let me = !1;
|
|
464
|
+
function kt() {
|
|
465
|
+
me || (me = !0, ce("gauge", (t, e, r) => {
|
|
466
|
+
const n = e.getGaugeData(), a = e.getGaugeStyle();
|
|
467
|
+
n && a && It(t, n, a, r);
|
|
468
|
+
}), ce("sankey", (t, e, r) => {
|
|
469
|
+
const n = e.getSankeyData(), a = e.getSankeyStyle();
|
|
470
|
+
n && a && Lt(t, n, a, r);
|
|
548
471
|
}));
|
|
549
472
|
}
|
|
550
|
-
function
|
|
551
|
-
e.heatmapProgram =
|
|
473
|
+
function Bt(t, e) {
|
|
474
|
+
e.heatmapProgram = at(t, it, ot, "heatmap");
|
|
552
475
|
}
|
|
553
|
-
let
|
|
554
|
-
function
|
|
555
|
-
|
|
556
|
-
e.renderer === "webgpu" && (t._webgpuInitPromise =
|
|
476
|
+
let ye = !1;
|
|
477
|
+
function _t() {
|
|
478
|
+
ye || (ye = !0, $.afterConstruct = (t, e) => {
|
|
479
|
+
e.renderer === "webgpu" && (t._webgpuInitPromise = Yt(t));
|
|
557
480
|
});
|
|
558
481
|
}
|
|
559
|
-
async function
|
|
560
|
-
var
|
|
482
|
+
async function Yt(t) {
|
|
483
|
+
var a, o;
|
|
561
484
|
const e = t, { createGpuChartRenderer: r } = await import("./GpuChartRenderer-Dxc0hrQA.js"), n = await r(e.webglCanvas, {
|
|
562
485
|
backend: "webgpu",
|
|
563
486
|
powerPreference: "high-performance"
|
|
564
487
|
});
|
|
565
488
|
if (n) {
|
|
566
|
-
e.renderer = n, e.activeRendererType = n.backend, e.renderer.setDPR(e.dpr), (
|
|
489
|
+
e.renderer = n, e.activeRendererType = n.backend, e.renderer.setDPR(e.dpr), (a = e.renderLoop) == null || a.setRenderer(e.renderer);
|
|
567
490
|
return;
|
|
568
491
|
}
|
|
569
492
|
console.warn(
|
|
570
493
|
"[VeloPlot] WebGPU unavailable — falling back to WebGL2. See docs/adr/001-webgpu-renderer-strategy.md."
|
|
571
|
-
), e.renderer = new
|
|
572
|
-
}
|
|
573
|
-
let
|
|
574
|
-
function
|
|
575
|
-
|
|
576
|
-
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
`<svg width="${i}" height="${l}" viewBox="0 0 ${i} ${l}" xmlns="http://www.w3.org/2000/svg" font-family="${a.xAxis.fontFamily || "sans-serif"}">`,
|
|
589
|
-
`<rect width="100%" height="100%" fill="${a.backgroundColor}" />`,
|
|
590
|
-
'<g transform="translate(0,0)">'
|
|
591
|
-
];
|
|
592
|
-
return Gt(u, r, n, c, a), Xt(u, t, r, n, o, s.primaryYAxisId), Wt(u, r, n, c, a), Vt(u, r, n, c, a, s), u.push("</g>"), u.push("</svg>"), u.join(`
|
|
593
|
-
`);
|
|
594
|
-
}
|
|
595
|
-
function Xt(t, e, r, n, o, a) {
|
|
596
|
-
for (const i of e) {
|
|
597
|
-
if (!i.isVisible()) continue;
|
|
598
|
-
const l = o.get(i.getYAxisId() || a || "default") ?? ke(o, a);
|
|
599
|
-
if (!l) continue;
|
|
600
|
-
const s = i.getData();
|
|
601
|
-
if (!s || s.x.length === 0) continue;
|
|
602
|
-
const c = i.getStyle(), u = i.getType();
|
|
603
|
-
if (u === "line" || u === "step") {
|
|
604
|
-
const d = [], y = c.stepMode || "after";
|
|
605
|
-
for (let h = 0; h < s.x.length; h++) {
|
|
606
|
-
const g = n.transform(s.x[h]), w = l.transform(s.y[h]);
|
|
607
|
-
if (h > 0 && u === "step") {
|
|
608
|
-
const b = n.transform(s.x[h - 1]), m = l.transform(s.y[h - 1]);
|
|
609
|
-
if (y === "after") d.push(`${g.toFixed(1)},${m.toFixed(1)}`);
|
|
610
|
-
else if (y === "before") d.push(`${b.toFixed(1)},${w.toFixed(1)}`);
|
|
611
|
-
else if (y === "center") {
|
|
612
|
-
const v = (b + g) / 2;
|
|
613
|
-
d.push(`${v.toFixed(1)},${m.toFixed(1)}`), d.push(`${v.toFixed(1)},${w.toFixed(1)}`);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
d.push(`${g.toFixed(1)},${w.toFixed(1)}`);
|
|
617
|
-
}
|
|
618
|
-
t.push(
|
|
619
|
-
`<polyline points="${d.join(" ")}" fill="none" stroke="${c.color}" stroke-width="${c.width || 1.5}" stroke-opacity="${c.opacity || 1}" stroke-linejoin="round" />`
|
|
620
|
-
);
|
|
621
|
-
} else if (u === "scatter")
|
|
622
|
-
for (let d = 0; d < s.x.length; d++) {
|
|
623
|
-
const y = n.transform(s.x[d]), h = l.transform(s.y[d]);
|
|
624
|
-
t.push(
|
|
625
|
-
`<circle cx="${y.toFixed(1)}" cy="${h.toFixed(1)}" r="${((c.pointSize || 4) / 2).toFixed(1)}" fill="${c.color}" fill-opacity="${c.opacity || 1}" />`
|
|
626
|
-
);
|
|
627
|
-
}
|
|
628
|
-
else if (u === "bar") {
|
|
629
|
-
const d = (c.barWidth || 5) * (r.width / (n.domain[1] - n.domain[0]));
|
|
630
|
-
for (let y = 0; y < s.x.length; y++) {
|
|
631
|
-
const h = n.transform(s.x[y]), g = l.transform(s.y[y]), w = l.transform(0), b = Math.min(g, w), m = Math.abs(g - w);
|
|
632
|
-
t.push(
|
|
633
|
-
`<rect x="${(h - d / 2).toFixed(1)}" y="${b.toFixed(1)}" width="${d.toFixed(1)}" height="${m.toFixed(1)}" fill="${c.color}" fill-opacity="${c.opacity || 1}" />`
|
|
634
|
-
);
|
|
635
|
-
}
|
|
636
|
-
} else if (u === "band" || u === "area") {
|
|
637
|
-
const d = u === "area" ? new Float32Array(s.x.length).fill(0) : s.y2 || new Float32Array(s.x.length).fill(0), y = [];
|
|
638
|
-
for (let h = 0; h < s.x.length; h++)
|
|
639
|
-
y.push(
|
|
640
|
-
`${n.transform(s.x[h]).toFixed(1)},${l.transform(s.y[h]).toFixed(1)}`
|
|
641
|
-
);
|
|
642
|
-
for (let h = s.x.length - 1; h >= 0; h--)
|
|
643
|
-
y.push(
|
|
644
|
-
`${n.transform(s.x[h]).toFixed(1)},${l.transform(d[h]).toFixed(1)}`
|
|
645
|
-
);
|
|
646
|
-
t.push(
|
|
647
|
-
`<polygon points="${y.join(" ")}" fill="${c.color}" fill-opacity="${(Number(c.opacity) || 1) * 0.3}" stroke="${c.color}" stroke-width="${c.width || 1}" />`
|
|
648
|
-
);
|
|
649
|
-
} else if (u === "candlestick") {
|
|
650
|
-
const d = (c.barWidth || 5) * (r.width / (n.domain[1] - n.domain[0])), y = c.bullishColor || "#26a69a", h = c.bearishColor || "#ef5350";
|
|
651
|
-
if (s.open && s.high && s.low && s.close)
|
|
652
|
-
for (let g = 0; g < s.x.length; g++) {
|
|
653
|
-
const w = s.close[g] >= s.open[g], b = n.transform(s.x[g]), m = l.transform(s.open[g]), v = l.transform(s.close[g]), p = l.transform(s.high[g]), f = l.transform(s.low[g]), T = w ? y : h;
|
|
654
|
-
t.push(
|
|
655
|
-
`<line x1="${b.toFixed(1)}" y1="${p.toFixed(1)}" x2="${b.toFixed(1)}" y2="${f.toFixed(1)}" stroke="${T}" stroke-width="1" />`
|
|
656
|
-
);
|
|
657
|
-
const S = Math.min(m, v), L = Math.max(1, Math.abs(m - v));
|
|
658
|
-
t.push(
|
|
659
|
-
`<rect x="${(b - d / 2).toFixed(1)}" y="${S.toFixed(1)}" width="${d.toFixed(1)}" height="${L.toFixed(1)}" fill="${T}" />`
|
|
660
|
-
);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
494
|
+
), e.renderer = new Se(e.webglCanvas), e.activeRendererType = "webgl", e.renderer.setDPR(e.dpr), (o = e.renderLoop) == null || o.setRenderer(e.renderer);
|
|
495
|
+
}
|
|
496
|
+
let ve = !1;
|
|
497
|
+
function Xt() {
|
|
498
|
+
ve || (ve = !0, Se.heatmapProgramInstaller = Bt, _t(), At(), Rt(), kt());
|
|
499
|
+
}
|
|
500
|
+
function Wt(t, e) {
|
|
501
|
+
return Ne(Ue(t, e));
|
|
502
|
+
}
|
|
503
|
+
let be = !1;
|
|
504
|
+
function Gt() {
|
|
505
|
+
if (be) return;
|
|
506
|
+
be = !0;
|
|
507
|
+
const t = $.afterConstruct;
|
|
508
|
+
$.afterConstruct = (e, r) => {
|
|
509
|
+
t == null || t(e, r), r.renderer === "svg" && Ot(e);
|
|
510
|
+
};
|
|
664
511
|
}
|
|
665
|
-
function
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
`<line x1="${e.x}" y1="${a}" x2="${e.x + e.width}" y2="${a}" stroke="${o.xAxis.lineColor}" stroke-width="${o.xAxis.lineWidth || 2}" />`
|
|
669
|
-
), t.push(
|
|
670
|
-
`<line x1="${i}" y1="${e.y}" x2="${i}" y2="${e.y + e.height}" stroke="${o.yAxis.lineColor}" stroke-width="${o.yAxis.lineWidth || 2}" />`
|
|
671
|
-
);
|
|
512
|
+
function Ot(t) {
|
|
513
|
+
const e = t;
|
|
514
|
+
e.svgRoot && (e.webglCanvas.style.display = "none", e.overlayCanvas && (e.overlayCanvas.style.display = "block", e.overlayCanvas.style.pointerEvents = "none", e.overlayCanvas.style.zIndex = "2"), e.svgRoot.style.display = "block", e.svgRoot.style.zIndex = "1");
|
|
672
515
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
if (b < e.x || b > e.x + e.width) return;
|
|
678
|
-
const m = Ne(w, i, u), v = d + (h.tickLength ?? 4) + h.labelSize * 0.75;
|
|
679
|
-
t.push(
|
|
680
|
-
`<text x="${b.toFixed(1)}" y="${v.toFixed(1)}" fill="${h.labelColor}" font-size="${h.labelSize}" text-anchor="middle">${Ce(m)}</text>`
|
|
681
|
-
);
|
|
682
|
-
}), (l == null ? void 0 : l.showLabels) !== !1 && n.ticks(c).forEach((w) => {
|
|
683
|
-
const b = ye(n.transform(w));
|
|
684
|
-
if (b < e.y || b > e.y + e.height) return;
|
|
685
|
-
const m = Ue(w, l), v = y - (g.tickLength ?? 4) - 4;
|
|
686
|
-
t.push(
|
|
687
|
-
`<text x="${v.toFixed(1)}" y="${(b + g.labelSize * 0.35).toFixed(1)}" fill="${g.labelColor}" font-size="${g.labelSize}" text-anchor="end">${Ce(m)}</text>`
|
|
688
|
-
);
|
|
516
|
+
let xe = !1;
|
|
517
|
+
function Vt() {
|
|
518
|
+
xe || (xe = !0, Gt(), $.prototype.exportSVG = function(t) {
|
|
519
|
+
return Wt(this, t);
|
|
689
520
|
});
|
|
690
521
|
}
|
|
691
|
-
|
|
692
|
-
o.grid.visible && (r.ticks(10).forEach((a) => {
|
|
693
|
-
const i = Q(r.transform(a));
|
|
694
|
-
i >= e.x && i <= e.x + e.width && t.push(
|
|
695
|
-
`<line x1="${i.toFixed(1)}" y1="${e.y}" x2="${i.toFixed(1)}" y2="${e.y + e.height}" stroke="${o.grid.majorColor}" stroke-opacity="0.1" stroke-dasharray="2,2" />`
|
|
696
|
-
);
|
|
697
|
-
}), n.ticks(10).forEach((a) => {
|
|
698
|
-
const i = Q(n.transform(a));
|
|
699
|
-
i >= e.y && i <= e.y + e.height && t.push(
|
|
700
|
-
`<line x1="${e.x}" y1="${i.toFixed(1)}" x2="${e.x + e.width}" y2="${i.toFixed(1)}" stroke="${o.grid.majorColor}" stroke-opacity="0.1" stroke-dasharray="2,2" />`
|
|
701
|
-
);
|
|
702
|
-
}));
|
|
703
|
-
}
|
|
704
|
-
let Me = !1;
|
|
705
|
-
function Ot() {
|
|
706
|
-
Me || (Me = !0, ue.prototype.exportSVG = function() {
|
|
707
|
-
const t = this, e = t.container.getBoundingClientRect();
|
|
708
|
-
return Yt(
|
|
709
|
-
t.getAllSeries(),
|
|
710
|
-
t.viewBounds,
|
|
711
|
-
t.getPlotArea(),
|
|
712
|
-
t.xScale,
|
|
713
|
-
t.yScales,
|
|
714
|
-
t.theme,
|
|
715
|
-
e.width || t.container.clientWidth,
|
|
716
|
-
e.height || t.container.clientHeight,
|
|
717
|
-
{
|
|
718
|
-
xAxis: t.xAxisOptions,
|
|
719
|
-
yAxis: t.yAxisOptionsMap.get(t.primaryYAxisId),
|
|
720
|
-
primaryYAxisId: t.primaryYAxisId
|
|
721
|
-
}
|
|
722
|
-
);
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
class Ht {
|
|
522
|
+
class $t {
|
|
726
523
|
constructor(e, r) {
|
|
727
|
-
|
|
728
|
-
|
|
524
|
+
B(this, "alerts", /* @__PURE__ */ new Map());
|
|
525
|
+
B(this, "idCounter", 0);
|
|
729
526
|
this.events = e, this.getSeries = r;
|
|
730
527
|
}
|
|
731
528
|
addAlert(e) {
|
|
@@ -746,24 +543,24 @@ class Ht {
|
|
|
746
543
|
for (const [e, r] of [...this.alerts.entries()]) {
|
|
747
544
|
const n = this.getSeries(r.seriesId);
|
|
748
545
|
if (!n) continue;
|
|
749
|
-
const
|
|
750
|
-
if (!(
|
|
751
|
-
const i =
|
|
546
|
+
const a = n.getData(), o = a.close ?? a.y;
|
|
547
|
+
if (!(o != null && o.length)) continue;
|
|
548
|
+
const i = o[o.length - 1];
|
|
752
549
|
if (!Number.isFinite(i)) continue;
|
|
753
|
-
const
|
|
754
|
-
let
|
|
550
|
+
const s = o.length > 1 ? o[o.length - 2] : i;
|
|
551
|
+
let l = !1;
|
|
755
552
|
switch (r.direction) {
|
|
756
553
|
case "above":
|
|
757
|
-
|
|
554
|
+
l = i >= r.price;
|
|
758
555
|
break;
|
|
759
556
|
case "below":
|
|
760
|
-
|
|
557
|
+
l = i <= r.price;
|
|
761
558
|
break;
|
|
762
559
|
case "cross":
|
|
763
|
-
|
|
560
|
+
l = s < r.price && i >= r.price || s > r.price && i <= r.price;
|
|
764
561
|
break;
|
|
765
562
|
}
|
|
766
|
-
if (!
|
|
563
|
+
if (!l) continue;
|
|
767
564
|
const c = {
|
|
768
565
|
id: e,
|
|
769
566
|
price: r.price,
|
|
@@ -779,94 +576,94 @@ class Ht {
|
|
|
779
576
|
this.alerts.clear();
|
|
780
577
|
}
|
|
781
578
|
}
|
|
782
|
-
const
|
|
579
|
+
const Ht = {
|
|
783
580
|
entry: "#38bdf8",
|
|
784
581
|
sl: "#ef4444",
|
|
785
582
|
tp: "#22c55e"
|
|
786
|
-
},
|
|
583
|
+
}, zt = {
|
|
787
584
|
entry: "Entry",
|
|
788
585
|
sl: "SL",
|
|
789
586
|
tp: "TP"
|
|
790
587
|
};
|
|
791
|
-
function
|
|
588
|
+
function Nt(t, e) {
|
|
792
589
|
const r = t.style ?? "entry";
|
|
793
590
|
return {
|
|
794
591
|
id: e,
|
|
795
592
|
type: "horizontal-line",
|
|
796
593
|
y: t.price,
|
|
797
|
-
color: t.color ??
|
|
798
|
-
label: t.label ??
|
|
594
|
+
color: t.color ?? Ht[r],
|
|
595
|
+
label: t.label ?? zt[r],
|
|
799
596
|
labelPosition: "right",
|
|
800
597
|
lineDash: r === "sl" ? [6, 4] : r === "tp" ? [4, 4] : void 0,
|
|
801
598
|
interactive: t.interactive ?? !1
|
|
802
599
|
};
|
|
803
600
|
}
|
|
804
|
-
let
|
|
805
|
-
function
|
|
806
|
-
|
|
807
|
-
var n,
|
|
601
|
+
let Pe = !1;
|
|
602
|
+
function Ut() {
|
|
603
|
+
st((t, e) => {
|
|
604
|
+
var n, a;
|
|
808
605
|
if (e.type === "heatmap" || e.type === "indicator")
|
|
809
606
|
return e;
|
|
810
607
|
let r = { ...e };
|
|
811
608
|
if (r.type === "heikin-ashi") {
|
|
812
|
-
const
|
|
813
|
-
if (
|
|
814
|
-
const i =
|
|
815
|
-
open:
|
|
816
|
-
high:
|
|
817
|
-
low:
|
|
818
|
-
close:
|
|
609
|
+
const o = r.data;
|
|
610
|
+
if (o != null && o.open && o.high && o.low && o.close) {
|
|
611
|
+
const i = $e({
|
|
612
|
+
open: o.open,
|
|
613
|
+
high: o.high,
|
|
614
|
+
low: o.low,
|
|
615
|
+
close: o.close
|
|
819
616
|
});
|
|
820
617
|
r = {
|
|
821
618
|
...r,
|
|
822
619
|
type: "candlestick",
|
|
823
|
-
data: { ...
|
|
620
|
+
data: { ...o, ...i }
|
|
824
621
|
};
|
|
825
622
|
}
|
|
826
623
|
}
|
|
827
|
-
if (
|
|
828
|
-
const { displayX:
|
|
624
|
+
if (se(t.xAxisOptions) && ((a = (n = r.data) == null ? void 0 : n.x) != null && a.length)) {
|
|
625
|
+
const { displayX: o, mapping: i } = le(
|
|
829
626
|
r.data.x,
|
|
830
627
|
t.xAxisOptions
|
|
831
628
|
);
|
|
832
629
|
t.setTimeScaleMapping(i), r = {
|
|
833
630
|
...r,
|
|
834
|
-
data: { ...r.data, x:
|
|
631
|
+
data: { ...r.data, x: o }
|
|
835
632
|
};
|
|
836
633
|
}
|
|
837
634
|
return r;
|
|
838
|
-
}),
|
|
839
|
-
if (e.x &&
|
|
840
|
-
const { displayX: r, mapping: n } =
|
|
635
|
+
}), lt((t) => t.type === "indicator" ? Ke(t) : [t]), ct((t, e) => {
|
|
636
|
+
if (e.x && se(t.xAxisOptions)) {
|
|
637
|
+
const { displayX: r, mapping: n } = le(e.x, t.xAxisOptions);
|
|
841
638
|
return t.setTimeScaleMapping(n), { ...e, x: r };
|
|
842
639
|
}
|
|
843
640
|
return e;
|
|
844
641
|
});
|
|
845
642
|
}
|
|
846
|
-
function
|
|
847
|
-
const t =
|
|
643
|
+
function qt() {
|
|
644
|
+
const t = $.prototype;
|
|
848
645
|
if (t._tradingPatched) return;
|
|
849
646
|
t._tradingPatched = !0, t.addIndicator = async function(r, n) {
|
|
850
647
|
return qe(this, r, n);
|
|
851
648
|
}, t.addAlert = function(r) {
|
|
852
|
-
return
|
|
649
|
+
return q(this).addAlert(r);
|
|
853
650
|
}, t.removeAlert = function(r) {
|
|
854
|
-
return
|
|
651
|
+
return q(this).removeAlert(r);
|
|
855
652
|
}, t.clearAlerts = function() {
|
|
856
|
-
|
|
653
|
+
q(this).clearAlerts();
|
|
857
654
|
}, t.getAlerts = function() {
|
|
858
|
-
return
|
|
655
|
+
return q(this).getAlerts();
|
|
859
656
|
}, t.addPositionLine = function(r) {
|
|
860
657
|
const n = this;
|
|
861
658
|
n._positionLineCounter === void 0 && (n._positionLineCounter = 0);
|
|
862
|
-
const
|
|
863
|
-
return n.addAnnotation(
|
|
659
|
+
const a = r.id ?? `position-${++n._positionLineCounter}`;
|
|
660
|
+
return n.addAnnotation(Nt(r, a)), a;
|
|
864
661
|
}, t.setDrawingMode = function(r) {
|
|
865
|
-
var
|
|
662
|
+
var a;
|
|
866
663
|
const n = this.getPlugin(
|
|
867
664
|
"velo-plot-drawing-tools"
|
|
868
665
|
);
|
|
869
|
-
(
|
|
666
|
+
(a = n == null ? void 0 : n.setMode) == null || a.call(n, r);
|
|
870
667
|
};
|
|
871
668
|
const e = t.destroy;
|
|
872
669
|
t.destroy = function() {
|
|
@@ -875,9 +672,9 @@ function jt() {
|
|
|
875
672
|
return (n = r._alertManager) == null || n.destroy(), r._alertManager = void 0, r.setFeatureHooks(null), e.call(this);
|
|
876
673
|
};
|
|
877
674
|
}
|
|
878
|
-
function
|
|
675
|
+
function q(t) {
|
|
879
676
|
const e = t;
|
|
880
|
-
return e._alertManager || (e._alertManager = new
|
|
677
|
+
return e._alertManager || (e._alertManager = new $t(t.events, (r) => {
|
|
881
678
|
const n = r ? t.series.get(r) : void 0;
|
|
882
679
|
return n || t.series.values().next().value;
|
|
883
680
|
}), t.setFeatureHooks({
|
|
@@ -895,18 +692,18 @@ function ie(t) {
|
|
|
895
692
|
}
|
|
896
693
|
})), e._alertManager;
|
|
897
694
|
}
|
|
898
|
-
function
|
|
899
|
-
|
|
695
|
+
function Te() {
|
|
696
|
+
Pe || (Pe = !0, Xt(), Ut(), qt(), Vt());
|
|
900
697
|
}
|
|
901
|
-
|
|
902
|
-
class
|
|
698
|
+
Te();
|
|
699
|
+
class Ce {
|
|
903
700
|
constructor(e, r = {}) {
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
this.canvas = e, this.available =
|
|
701
|
+
B(this, "available");
|
|
702
|
+
B(this, "canvas");
|
|
703
|
+
B(this, "adapter");
|
|
704
|
+
B(this, "device");
|
|
705
|
+
B(this, "context");
|
|
706
|
+
this.canvas = e, this.available = Ce.isSupported();
|
|
910
707
|
}
|
|
911
708
|
static isSupported() {
|
|
912
709
|
return typeof globalThis.navigator < "u" && typeof globalThis.navigator.gpu < "u";
|
|
@@ -924,10 +721,10 @@ class Re {
|
|
|
924
721
|
if (!n)
|
|
925
722
|
throw new Error("[VeloPlot] Failed to get WebGPU context");
|
|
926
723
|
this.context = n;
|
|
927
|
-
const
|
|
724
|
+
const a = e.preferredFormat ?? (r.getPreferredCanvasFormat ? r.getPreferredCanvasFormat() : "bgra8unorm");
|
|
928
725
|
this.context.configure({
|
|
929
726
|
device: this.device,
|
|
930
|
-
format:
|
|
727
|
+
format: a,
|
|
931
728
|
alphaMode: "premultiplied"
|
|
932
729
|
});
|
|
933
730
|
}
|
|
@@ -942,68 +739,68 @@ const Kt = `
|
|
|
942
739
|
vec2 clip = (aPosition / uResolution) * 2.0 - 1.0;
|
|
943
740
|
gl_Position = vec4(clip.x, -clip.y, 0.0, 1.0);
|
|
944
741
|
}
|
|
945
|
-
`,
|
|
742
|
+
`, jt = `
|
|
946
743
|
precision mediump float;
|
|
947
744
|
uniform vec4 uColor;
|
|
948
745
|
void main() {
|
|
949
746
|
gl_FragColor = uColor;
|
|
950
747
|
}
|
|
951
748
|
`;
|
|
952
|
-
function
|
|
749
|
+
function we(t, e, r) {
|
|
953
750
|
const n = t.createShader(e);
|
|
954
751
|
if (!n) throw new Error("createShader failed");
|
|
955
752
|
if (t.shaderSource(n, r), t.compileShader(n), !t.getShaderParameter(n, t.COMPILE_STATUS))
|
|
956
753
|
throw new Error(t.getShaderInfoLog(n) ?? "shader compile failed");
|
|
957
754
|
return n;
|
|
958
755
|
}
|
|
959
|
-
function
|
|
960
|
-
const e =
|
|
756
|
+
function Jt(t) {
|
|
757
|
+
const e = we(t, t.VERTEX_SHADER, Kt), r = we(t, t.FRAGMENT_SHADER, jt), n = t.createProgram();
|
|
961
758
|
if (!n) throw new Error("createProgram failed");
|
|
962
759
|
if (t.attachShader(n, e), t.attachShader(n, r), t.linkProgram(n), !t.getProgramParameter(n, t.LINK_STATUS))
|
|
963
760
|
throw new Error(t.getProgramInfoLog(n) ?? "program link failed");
|
|
964
761
|
return t.deleteShader(e), t.deleteShader(r), n;
|
|
965
762
|
}
|
|
966
|
-
function
|
|
967
|
-
const { plotArea: e, xLines: r, yLines: n } = t,
|
|
763
|
+
function Qt(t) {
|
|
764
|
+
const { plotArea: e, xLines: r, yLines: n } = t, a = e.y, o = e.y + e.height, i = e.x, s = e.x + e.width, l = (r.length + n.length) * 2, c = new Float32Array(l * 2);
|
|
968
765
|
let u = 0;
|
|
969
|
-
for (const
|
|
970
|
-
c[u++] =
|
|
971
|
-
for (const
|
|
972
|
-
c[u++] = i, c[u++] =
|
|
766
|
+
for (const h of r)
|
|
767
|
+
c[u++] = h, c[u++] = a, c[u++] = h, c[u++] = o;
|
|
768
|
+
for (const h of n)
|
|
769
|
+
c[u++] = i, c[u++] = h, c[u++] = s, c[u++] = h;
|
|
973
770
|
return c;
|
|
974
771
|
}
|
|
975
|
-
class
|
|
772
|
+
class Zt {
|
|
976
773
|
constructor(e) {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
774
|
+
B(this, "gl");
|
|
775
|
+
B(this, "program");
|
|
776
|
+
B(this, "buffer");
|
|
777
|
+
B(this, "aPosition");
|
|
778
|
+
B(this, "uResolution");
|
|
779
|
+
B(this, "uColor");
|
|
983
780
|
const r = e.getContext("webgl", {
|
|
984
781
|
alpha: !0,
|
|
985
782
|
antialias: !1,
|
|
986
783
|
preserveDrawingBuffer: !0
|
|
987
784
|
});
|
|
988
785
|
if (!r) throw new Error("WebGL not available for grid spike");
|
|
989
|
-
this.gl = r, this.program =
|
|
786
|
+
this.gl = r, this.program = Jt(r), this.aPosition = r.getAttribLocation(this.program, "aPosition"), this.uResolution = r.getUniformLocation(this.program, "uResolution"), this.uColor = r.getUniformLocation(this.program, "uColor");
|
|
990
787
|
const n = r.createBuffer();
|
|
991
788
|
if (!n) throw new Error("createBuffer failed");
|
|
992
789
|
this.buffer = n;
|
|
993
790
|
}
|
|
994
791
|
/** Upload vertices and draw grid lines */
|
|
995
792
|
draw(e) {
|
|
996
|
-
const r = this.gl, n =
|
|
793
|
+
const r = this.gl, n = Qt(e), a = n.length / 4;
|
|
997
794
|
r.viewport(0, 0, e.width, e.height), r.clearColor(0.04, 0.05, 0.08, 1), r.clear(r.COLOR_BUFFER_BIT), r.useProgram(this.program), r.bindBuffer(r.ARRAY_BUFFER, this.buffer), r.bufferData(r.ARRAY_BUFFER, n, r.DYNAMIC_DRAW), r.enableVertexAttribArray(this.aPosition), r.vertexAttribPointer(this.aPosition, 2, r.FLOAT, !1, 0, 0), r.uniform2f(this.uResolution, e.width, e.height);
|
|
998
|
-
const
|
|
999
|
-
return r.uniform4f(this.uColor,
|
|
795
|
+
const o = e.color ?? [0.2, 0.22, 0.3, 0.6];
|
|
796
|
+
return r.uniform4f(this.uColor, o[0], o[1], o[2], o[3]), r.lineWidth(e.lineWidth ?? 1), r.drawArrays(r.LINES, 0, n.length / 2), a;
|
|
1000
797
|
}
|
|
1001
798
|
destroy() {
|
|
1002
799
|
const e = this.gl;
|
|
1003
800
|
e.deleteBuffer(this.buffer), e.deleteProgram(this.program);
|
|
1004
801
|
}
|
|
1005
802
|
}
|
|
1006
|
-
function
|
|
803
|
+
function er(t) {
|
|
1007
804
|
const e = () => {
|
|
1008
805
|
};
|
|
1009
806
|
return {
|
|
@@ -1030,11 +827,11 @@ function tr(t) {
|
|
|
1030
827
|
measureText: (r) => ({ width: r.length * 7 })
|
|
1031
828
|
};
|
|
1032
829
|
}
|
|
1033
|
-
function
|
|
830
|
+
function tr(t, e) {
|
|
1034
831
|
const r = document.createElement("canvas");
|
|
1035
|
-
return r.width = t, r.height = e, r.getContext("2d") ??
|
|
832
|
+
return r.width = t, r.height = e, r.getContext("2d") ?? er(r);
|
|
1036
833
|
}
|
|
1037
|
-
function
|
|
834
|
+
function Me(t, e) {
|
|
1038
835
|
const r = { top: 40, right: 40, bottom: 50, left: 60 };
|
|
1039
836
|
return {
|
|
1040
837
|
x: r.left,
|
|
@@ -1043,93 +840,93 @@ function $e(t, e) {
|
|
|
1043
840
|
height: e - r.top - r.bottom
|
|
1044
841
|
};
|
|
1045
842
|
}
|
|
1046
|
-
function
|
|
1047
|
-
const
|
|
1048
|
-
return { xLines:
|
|
843
|
+
function Fe(t, e, r, n, a) {
|
|
844
|
+
const o = e.ticks(n).map((s) => de(e.transform(s))), i = r.ticks(a).map((s) => de(r.transform(s)));
|
|
845
|
+
return { xLines: o, yLines: i };
|
|
1049
846
|
}
|
|
1050
|
-
function
|
|
847
|
+
function De(t, e) {
|
|
1051
848
|
const r = [];
|
|
1052
|
-
for (let
|
|
849
|
+
for (let o = 0; o < e; o++) {
|
|
1053
850
|
const i = performance.now();
|
|
1054
851
|
t(), r.push((performance.now() - i) * 1e3);
|
|
1055
852
|
}
|
|
1056
|
-
r.sort((
|
|
1057
|
-
const n = r.reduce((
|
|
1058
|
-
return { avg: n, p95:
|
|
853
|
+
r.sort((o, i) => o - i);
|
|
854
|
+
const n = r.reduce((o, i) => o + i, 0) / r.length, a = r[Math.floor(r.length * 0.95)] ?? n;
|
|
855
|
+
return { avg: n, p95: a };
|
|
1059
856
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const e = Math.round((t.width ?? 1920) * (t.dpr ?? 1)), r = Math.round((t.height ?? 1080) * (t.dpr ?? 1)), n = t.xTickCount ?? 24,
|
|
1062
|
-
...
|
|
857
|
+
function rr(t = {}) {
|
|
858
|
+
const e = Math.round((t.width ?? 1920) * (t.dpr ?? 1)), r = Math.round((t.height ?? 1080) * (t.dpr ?? 1)), n = t.xTickCount ?? 24, a = t.yTickCount ?? 16, o = t.frames ?? 120, i = tr(e, r), s = {
|
|
859
|
+
...ue,
|
|
1063
860
|
grid: {
|
|
1064
|
-
...
|
|
861
|
+
...ue.grid,
|
|
1065
862
|
visible: !0,
|
|
1066
863
|
showMinor: t.showMinor ?? !0
|
|
1067
864
|
}
|
|
1068
|
-
},
|
|
1069
|
-
c.setDomain(0, 1e6), u.setDomain(-1, 1), c.setRange(
|
|
1070
|
-
const
|
|
1071
|
-
i.clearRect(0, 0, e, r),
|
|
1072
|
-
},
|
|
865
|
+
}, l = Me(e, r), c = new K(), u = new K();
|
|
866
|
+
c.setDomain(0, 1e6), u.setDomain(-1, 1), c.setRange(l.x, l.x + l.width), u.setRange(l.y + l.height, l.y);
|
|
867
|
+
const h = new ut(i, s), { avg: v, p95: d } = De(() => {
|
|
868
|
+
i.clearRect(0, 0, e, r), h.drawGrid(l, c, u, { tickCount: n }, { tickCount: a });
|
|
869
|
+
}, o), { xLines: p, yLines: x } = Fe(l, c, u, n, a);
|
|
1073
870
|
return {
|
|
1074
871
|
backend: "canvas2d",
|
|
1075
872
|
dpr: t.dpr ?? 1,
|
|
1076
873
|
width: e,
|
|
1077
874
|
height: r,
|
|
1078
875
|
xTicks: n,
|
|
1079
|
-
yTicks:
|
|
1080
|
-
lineSegments:
|
|
1081
|
-
avgFrameUs: Math.round(
|
|
1082
|
-
p95FrameUs: Math.round(
|
|
1083
|
-
frames:
|
|
876
|
+
yTicks: a,
|
|
877
|
+
lineSegments: p.length + x.length,
|
|
878
|
+
avgFrameUs: Math.round(v),
|
|
879
|
+
p95FrameUs: Math.round(d),
|
|
880
|
+
frames: o
|
|
1084
881
|
};
|
|
1085
882
|
}
|
|
1086
|
-
function
|
|
1087
|
-
const e = Math.round((t.width ?? 1920) * (t.dpr ?? 1)), r = Math.round((t.height ?? 1080) * (t.dpr ?? 1)), n = t.xTickCount ?? 24,
|
|
883
|
+
function nr(t = {}) {
|
|
884
|
+
const e = Math.round((t.width ?? 1920) * (t.dpr ?? 1)), r = Math.round((t.height ?? 1080) * (t.dpr ?? 1)), n = t.xTickCount ?? 24, a = t.yTickCount ?? 16, o = t.frames ?? 120, i = document.createElement("canvas");
|
|
1088
885
|
i.width = e, i.height = r;
|
|
1089
|
-
let
|
|
886
|
+
let s;
|
|
1090
887
|
try {
|
|
1091
|
-
|
|
888
|
+
s = new Zt(i);
|
|
1092
889
|
} catch {
|
|
1093
890
|
return null;
|
|
1094
891
|
}
|
|
1095
|
-
const
|
|
1096
|
-
c.setDomain(0, 1e6), u.setDomain(-1, 1), c.setRange(
|
|
1097
|
-
const { xLines:
|
|
1098
|
-
let
|
|
1099
|
-
const { avg:
|
|
1100
|
-
|
|
1101
|
-
},
|
|
1102
|
-
return
|
|
892
|
+
const l = Me(e, r), c = new K(), u = new K();
|
|
893
|
+
c.setDomain(0, 1e6), u.setDomain(-1, 1), c.setRange(l.x, l.x + l.width), u.setRange(l.y + l.height, l.y);
|
|
894
|
+
const { xLines: h, yLines: v } = Fe(l, c, u, n, a), d = { plotArea: l, xLines: h, yLines: v, width: e, height: r };
|
|
895
|
+
let p = 0;
|
|
896
|
+
const { avg: x, p95: b } = De(() => {
|
|
897
|
+
p = s.draw(d);
|
|
898
|
+
}, o);
|
|
899
|
+
return s.destroy(), {
|
|
1103
900
|
backend: "webgl",
|
|
1104
901
|
dpr: t.dpr ?? 1,
|
|
1105
902
|
width: e,
|
|
1106
903
|
height: r,
|
|
1107
904
|
xTicks: n,
|
|
1108
|
-
yTicks:
|
|
1109
|
-
lineSegments:
|
|
1110
|
-
avgFrameUs: Math.round(
|
|
905
|
+
yTicks: a,
|
|
906
|
+
lineSegments: p,
|
|
907
|
+
avgFrameUs: Math.round(x),
|
|
1111
908
|
p95FrameUs: Math.round(b),
|
|
1112
|
-
frames:
|
|
909
|
+
frames: o
|
|
1113
910
|
};
|
|
1114
911
|
}
|
|
1115
|
-
function
|
|
1116
|
-
const e = (t == null ? void 0 : t.dpr) ?? 2, r = (t == null ? void 0 : t.frames) ?? 120, n =
|
|
1117
|
-
if (!
|
|
912
|
+
function Rr(t) {
|
|
913
|
+
const e = (t == null ? void 0 : t.dpr) ?? 2, r = (t == null ? void 0 : t.frames) ?? 120, n = rr({ dpr: e, frames: r, showMinor: !0 }), a = nr({ dpr: e, frames: r });
|
|
914
|
+
if (!a)
|
|
1118
915
|
return {
|
|
1119
916
|
canvas2d: n,
|
|
1120
917
|
webgl: null,
|
|
1121
918
|
gainPercent: 0,
|
|
1122
919
|
recommendation: "defer"
|
|
1123
920
|
};
|
|
1124
|
-
const
|
|
921
|
+
const o = (n.avgFrameUs - a.avgFrameUs) / n.avgFrameUs * 100;
|
|
1125
922
|
return {
|
|
1126
923
|
canvas2d: n,
|
|
1127
|
-
webgl:
|
|
1128
|
-
gainPercent: Math.round(
|
|
1129
|
-
recommendation:
|
|
924
|
+
webgl: a,
|
|
925
|
+
gainPercent: Math.round(o * 10) / 10,
|
|
926
|
+
recommendation: o >= 20 ? "implement" : "defer"
|
|
1130
927
|
};
|
|
1131
928
|
}
|
|
1132
|
-
const ar = "1.17.0",
|
|
929
|
+
const ar = "1.17.0", or = "2026-07-05", ir = "Stage 1 baselines. Headless CI uses effective FPS (render throughput when rAF throttled) via scripts/benchmark-scenario-eval.mjs smoke floors.", sr = 0.1, lr = 0.95, cr = {
|
|
1133
930
|
"line-1m-pan": {
|
|
1134
931
|
minAvgFps: 50,
|
|
1135
932
|
maxAvgFrameTimeMs: 20,
|
|
@@ -1169,43 +966,43 @@ const ar = "1.17.0", ir = "2026-07-05", sr = "Stage 1 baselines. Headless CI use
|
|
|
1169
966
|
dpr: 2,
|
|
1170
967
|
description: "WebGL grid spike lines only @2x"
|
|
1171
968
|
}
|
|
1172
|
-
},
|
|
969
|
+
}, ee = {
|
|
1173
970
|
version: ar,
|
|
1174
|
-
recordedAt:
|
|
1175
|
-
notes:
|
|
1176
|
-
regressionThreshold:
|
|
1177
|
-
webgpuMinFpsRatio:
|
|
1178
|
-
scenarios:
|
|
971
|
+
recordedAt: or,
|
|
972
|
+
notes: ir,
|
|
973
|
+
regressionThreshold: sr,
|
|
974
|
+
webgpuMinFpsRatio: lr,
|
|
975
|
+
scenarios: cr
|
|
1179
976
|
};
|
|
1180
977
|
function Ir() {
|
|
1181
|
-
return
|
|
978
|
+
return ee;
|
|
1182
979
|
}
|
|
1183
|
-
function
|
|
1184
|
-
const r =
|
|
980
|
+
function Lr(t, e) {
|
|
981
|
+
const r = ee.scenarios[t];
|
|
1185
982
|
if (!r)
|
|
1186
983
|
return { passed: !0, failures: [] };
|
|
1187
|
-
const n = [],
|
|
984
|
+
const n = [], a = ee.regressionThreshold ?? 0.1;
|
|
1188
985
|
if ("avgFps" in e && r.minAvgFps !== void 0) {
|
|
1189
|
-
const
|
|
1190
|
-
e.avgFps <
|
|
1191
|
-
`FPS ${e.avgFps} < baseline min ${r.minAvgFps} (allowed ${
|
|
986
|
+
const o = r.minAvgFps * (1 - a);
|
|
987
|
+
e.avgFps < o && n.push(
|
|
988
|
+
`FPS ${e.avgFps} < baseline min ${r.minAvgFps} (allowed ${o.toFixed(1)} with ${a * 100}% slack)`
|
|
1192
989
|
);
|
|
1193
990
|
}
|
|
1194
991
|
if ("avgFrameTime" in e && r.maxAvgFrameTimeMs !== void 0) {
|
|
1195
|
-
const
|
|
1196
|
-
e.avgFrameTime >
|
|
992
|
+
const o = r.maxAvgFrameTimeMs * (1 + a);
|
|
993
|
+
e.avgFrameTime > o && n.push(
|
|
1197
994
|
`Frame time ${e.avgFrameTime}ms > baseline max ${r.maxAvgFrameTimeMs}ms`
|
|
1198
995
|
);
|
|
1199
996
|
}
|
|
1200
997
|
if ("avgFrameUs" in e && r.maxAvgFrameUs !== void 0) {
|
|
1201
|
-
const
|
|
1202
|
-
e.avgFrameUs >
|
|
998
|
+
const o = r.maxAvgFrameUs * (1 + a);
|
|
999
|
+
e.avgFrameUs > o && n.push(
|
|
1203
1000
|
`Grid frame ${e.avgFrameUs}µs > baseline max ${r.maxAvgFrameUs}µs`
|
|
1204
1001
|
);
|
|
1205
1002
|
}
|
|
1206
1003
|
return { passed: n.length === 0, failures: n };
|
|
1207
1004
|
}
|
|
1208
|
-
function
|
|
1005
|
+
function kr(t, e, r, n = 0.95) {
|
|
1209
1006
|
if (!r || !e)
|
|
1210
1007
|
return {
|
|
1211
1008
|
webgl: t,
|
|
@@ -1215,19 +1012,19 @@ function $r(t, e, r, n = 0.95) {
|
|
|
1215
1012
|
meetsTarget: !1,
|
|
1216
1013
|
recommendation: "webgpu-unavailable"
|
|
1217
1014
|
};
|
|
1218
|
-
const
|
|
1015
|
+
const a = t.avgFps > 0 ? e.avgFps / t.avgFps : 0, o = a >= n;
|
|
1219
1016
|
return {
|
|
1220
1017
|
webgl: t,
|
|
1221
1018
|
webgpu: e,
|
|
1222
1019
|
webgpuActive: !0,
|
|
1223
|
-
fpsRatio:
|
|
1224
|
-
meetsTarget:
|
|
1225
|
-
recommendation:
|
|
1020
|
+
fpsRatio: a,
|
|
1021
|
+
meetsTarget: o,
|
|
1022
|
+
recommendation: o ? "webgpu-ready" : "webgl-faster"
|
|
1226
1023
|
};
|
|
1227
1024
|
}
|
|
1228
|
-
class
|
|
1025
|
+
class ur {
|
|
1229
1026
|
constructor(e) {
|
|
1230
|
-
|
|
1027
|
+
B(this, "seed");
|
|
1231
1028
|
this.seed = e;
|
|
1232
1029
|
}
|
|
1233
1030
|
next() {
|
|
@@ -1249,11 +1046,11 @@ function Br(t) {
|
|
|
1249
1046
|
xEnd: 10,
|
|
1250
1047
|
offset: 0,
|
|
1251
1048
|
...t
|
|
1252
|
-
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount),
|
|
1253
|
-
for (let
|
|
1254
|
-
r[
|
|
1255
|
-
const i = e.amplitude * Math.sin(2 * Math.PI * e.frequency * r[
|
|
1256
|
-
n[
|
|
1049
|
+
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1050
|
+
for (let o = 0; o < e.pointCount; o++) {
|
|
1051
|
+
r[o] = e.xStart + o * a;
|
|
1052
|
+
const i = e.amplitude * Math.sin(2 * Math.PI * e.frequency * r[o] + e.phase), s = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1053
|
+
n[o] = i + s + e.offset;
|
|
1257
1054
|
}
|
|
1258
1055
|
return { x: r, y: n };
|
|
1259
1056
|
}
|
|
@@ -1268,11 +1065,11 @@ function _r(t) {
|
|
|
1268
1065
|
xEnd: 10,
|
|
1269
1066
|
offset: 0,
|
|
1270
1067
|
...t
|
|
1271
|
-
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount),
|
|
1272
|
-
for (let
|
|
1273
|
-
r[
|
|
1274
|
-
const i = r[
|
|
1275
|
-
n[
|
|
1068
|
+
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1069
|
+
for (let o = 0; o < e.pointCount; o++) {
|
|
1070
|
+
r[o] = e.xStart + o * a;
|
|
1071
|
+
const i = r[o] * e.frequency + e.phase / (2 * Math.PI), s = Math.sign(Math.sin(2 * Math.PI * i)) * e.amplitude, l = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1072
|
+
n[o] = s + l + e.offset;
|
|
1276
1073
|
}
|
|
1277
1074
|
return { x: r, y: n };
|
|
1278
1075
|
}
|
|
@@ -1287,11 +1084,11 @@ function Yr(t) {
|
|
|
1287
1084
|
xEnd: 10,
|
|
1288
1085
|
offset: 0,
|
|
1289
1086
|
...t
|
|
1290
|
-
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount),
|
|
1291
|
-
for (let
|
|
1292
|
-
r[
|
|
1293
|
-
const i = r[
|
|
1294
|
-
n[
|
|
1087
|
+
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1088
|
+
for (let o = 0; o < e.pointCount; o++) {
|
|
1089
|
+
r[o] = e.xStart + o * a;
|
|
1090
|
+
const i = r[o] * e.frequency + e.phase / (2 * Math.PI), s = e.amplitude * 2 * (i - Math.floor(i + 0.5)), l = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1091
|
+
n[o] = s + l + e.offset;
|
|
1295
1092
|
}
|
|
1296
1093
|
return { x: r, y: n };
|
|
1297
1094
|
}
|
|
@@ -1306,11 +1103,11 @@ function Xr(t) {
|
|
|
1306
1103
|
xEnd: 10,
|
|
1307
1104
|
offset: 0,
|
|
1308
1105
|
...t
|
|
1309
|
-
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount),
|
|
1310
|
-
for (let
|
|
1311
|
-
r[
|
|
1312
|
-
const i = r[
|
|
1313
|
-
n[
|
|
1106
|
+
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1107
|
+
for (let o = 0; o < e.pointCount; o++) {
|
|
1108
|
+
r[o] = e.xStart + o * a;
|
|
1109
|
+
const i = r[o] * e.frequency + e.phase / (2 * Math.PI), s = e.amplitude * 2 * Math.abs(2 * (i - Math.floor(i + 0.5))) - e.amplitude, l = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1110
|
+
n[o] = s + l + e.offset;
|
|
1314
1111
|
}
|
|
1315
1112
|
return { x: r, y: n };
|
|
1316
1113
|
}
|
|
@@ -1322,20 +1119,20 @@ function Wr(t) {
|
|
|
1322
1119
|
sorted: !0,
|
|
1323
1120
|
seed: Date.now(),
|
|
1324
1121
|
...t
|
|
1325
|
-
}, r = new
|
|
1326
|
-
for (let
|
|
1327
|
-
n[
|
|
1122
|
+
}, r = new ur(e.seed), n = new Float32Array(e.pointCount), a = new Float32Array(e.pointCount);
|
|
1123
|
+
for (let o = 0; o < e.pointCount; o++)
|
|
1124
|
+
n[o] = r.nextRange(e.xRange[0], e.xRange[1]), a[o] = r.nextRange(e.yRange[0], e.yRange[1]);
|
|
1328
1125
|
if (e.sorted) {
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1331
|
-
const i = new Float32Array(e.pointCount),
|
|
1332
|
-
for (let
|
|
1333
|
-
i[
|
|
1334
|
-
return { x: i, y:
|
|
1126
|
+
const o = Array.from({ length: e.pointCount }, (l, c) => c);
|
|
1127
|
+
o.sort((l, c) => n[l] - n[c]);
|
|
1128
|
+
const i = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount);
|
|
1129
|
+
for (let l = 0; l < e.pointCount; l++)
|
|
1130
|
+
i[l] = n[o[l]], s[l] = a[o[l]];
|
|
1131
|
+
return { x: i, y: s };
|
|
1335
1132
|
}
|
|
1336
|
-
return { x: n, y:
|
|
1133
|
+
return { x: n, y: a };
|
|
1337
1134
|
}
|
|
1338
|
-
function
|
|
1135
|
+
function Gr(t) {
|
|
1339
1136
|
const e = {
|
|
1340
1137
|
pointCount: 2e3,
|
|
1341
1138
|
vMin: -0.5,
|
|
@@ -1345,17 +1142,17 @@ function Vr(t) {
|
|
|
1345
1142
|
// 10 µA
|
|
1346
1143
|
noise: 0.02,
|
|
1347
1144
|
...t
|
|
1348
|
-
}, r = e.pointCount * e.cycles, n = new Float32Array(r),
|
|
1349
|
-
for (let
|
|
1350
|
-
for (let
|
|
1351
|
-
const c =
|
|
1352
|
-
|
|
1353
|
-
const u = n[c],
|
|
1354
|
-
|
|
1145
|
+
}, r = e.pointCount * e.cycles, n = new Float32Array(r), a = new Float32Array(r), o = e.pointCount, i = o / 2;
|
|
1146
|
+
for (let s = 0; s < e.cycles; s++)
|
|
1147
|
+
for (let l = 0; l < o; l++) {
|
|
1148
|
+
const c = s * o + l;
|
|
1149
|
+
l < i ? n[c] = e.vMin + (e.vMax - e.vMin) * (l / i) : n[c] = e.vMax - (e.vMax - e.vMin) * ((l - i) / i);
|
|
1150
|
+
const u = n[c], h = 0, v = l < i ? 1 : -1, d = 0.1, p = -Math.pow(u - h, 2) / (2 * d * d), x = e.peakCurrent * Math.exp(p), b = v * e.peakCurrent * 0.1, m = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
|
|
1151
|
+
a[c] = v * x + b + m;
|
|
1355
1152
|
}
|
|
1356
|
-
return { x: n, y:
|
|
1153
|
+
return { x: n, y: a };
|
|
1357
1154
|
}
|
|
1358
|
-
function
|
|
1155
|
+
function Or(t) {
|
|
1359
1156
|
const e = {
|
|
1360
1157
|
pointCount: 50,
|
|
1361
1158
|
rSolution: 100,
|
|
@@ -1364,101 +1161,101 @@ function Gr(t) {
|
|
|
1364
1161
|
// Ohms
|
|
1365
1162
|
frequency: [1e5, 0.01],
|
|
1366
1163
|
...t
|
|
1367
|
-
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount),
|
|
1164
|
+
}, r = new Float32Array(e.pointCount), n = new Float32Array(e.pointCount), a = Math.log10(e.frequency[1]), o = Math.log10(e.frequency[0]);
|
|
1368
1165
|
for (let i = 0; i < e.pointCount; i++) {
|
|
1369
|
-
const
|
|
1370
|
-
r[i] = u, n[i] = -
|
|
1166
|
+
const s = o - (o - a) * (i / (e.pointCount - 1)), l = 2 * Math.PI * Math.pow(10, s), c = e.rCharge * 1e-5, u = e.rSolution + e.rCharge / (1 + Math.pow(l * c, 2)), h = l * c * e.rCharge / (1 + Math.pow(l * c, 2));
|
|
1167
|
+
r[i] = u, n[i] = -h;
|
|
1371
1168
|
}
|
|
1372
1169
|
return { x: r, y: n };
|
|
1373
1170
|
}
|
|
1374
|
-
async function
|
|
1171
|
+
async function Vr(t, e) {
|
|
1375
1172
|
const r = {
|
|
1376
1173
|
duration: 5e3,
|
|
1377
1174
|
warmup: 1e3,
|
|
1378
1175
|
...e
|
|
1379
|
-
}, n = [],
|
|
1380
|
-
let
|
|
1381
|
-
const i = t.getAllSeries().reduce((
|
|
1382
|
-
return new Promise((
|
|
1383
|
-
const
|
|
1384
|
-
let u = !1,
|
|
1385
|
-
function
|
|
1386
|
-
const
|
|
1387
|
-
if (
|
|
1388
|
-
const b =
|
|
1389
|
-
avgFps: Math.round(
|
|
1390
|
-
minFps: Math.round((n.length > 0 ? Math.min(...n) :
|
|
1391
|
-
maxFps: Math.round((n.length > 0 ? Math.max(...n) :
|
|
1176
|
+
}, n = [], a = [];
|
|
1177
|
+
let o = 0;
|
|
1178
|
+
const i = t.getAllSeries().reduce((s, l) => s + l.getPointCount(), 0);
|
|
1179
|
+
return new Promise((s) => {
|
|
1180
|
+
const l = performance.now() + r.warmup + r.duration, c = performance.now() + r.warmup;
|
|
1181
|
+
let u = !1, h = 0;
|
|
1182
|
+
function v() {
|
|
1183
|
+
const d = performance.now();
|
|
1184
|
+
if (d >= l) {
|
|
1185
|
+
const b = a.length > 0 ? a.reduce((A, w) => A + w, 0) / a.length : 0, m = h > 0 ? d - h : r.duration, y = o > 0 && m > 0 ? o / m * 1e3 : 0, g = n.length > 0 ? n.reduce((A, w) => A + w, 0) / n.length : b > 0 ? 1e3 / b : 0, f = {
|
|
1186
|
+
avgFps: Math.round(y * 100) / 100,
|
|
1187
|
+
minFps: Math.round((n.length > 0 ? Math.min(...n) : y) * 100) / 100,
|
|
1188
|
+
maxFps: Math.round((n.length > 0 ? Math.max(...n) : y) * 100) / 100,
|
|
1392
1189
|
avgFrameTime: Math.round(b * 1e3) / 1e3,
|
|
1393
|
-
frameCount:
|
|
1190
|
+
frameCount: o,
|
|
1394
1191
|
duration: r.duration,
|
|
1395
1192
|
pointsRendered: i,
|
|
1396
|
-
throughput: Math.round(i *
|
|
1193
|
+
throughput: Math.round(i * y / 1e3) * 1e3,
|
|
1397
1194
|
/** @internal render-only FPS (not wall clock) */
|
|
1398
|
-
...
|
|
1195
|
+
...g > 0 ? { renderFps: Math.round(g * 100) / 100 } : {}
|
|
1399
1196
|
};
|
|
1400
|
-
|
|
1197
|
+
s(f);
|
|
1401
1198
|
return;
|
|
1402
1199
|
}
|
|
1403
|
-
|
|
1404
|
-
const
|
|
1200
|
+
d >= c && !u && (u = !0, h = d, o = 0, a.length = 0, n.length = 0);
|
|
1201
|
+
const p = performance.now();
|
|
1405
1202
|
t.render();
|
|
1406
|
-
const
|
|
1203
|
+
const x = performance.now();
|
|
1407
1204
|
if (u) {
|
|
1408
|
-
const b =
|
|
1409
|
-
|
|
1410
|
-
const m =
|
|
1205
|
+
const b = x - p;
|
|
1206
|
+
a.push(b), o++;
|
|
1207
|
+
const m = a.slice(-30);
|
|
1411
1208
|
if (m.length > 0) {
|
|
1412
|
-
const
|
|
1413
|
-
|
|
1209
|
+
const y = m.reduce((g, f) => g + f, 0) / m.length;
|
|
1210
|
+
y > 0 && n.push(1e3 / y);
|
|
1414
1211
|
}
|
|
1415
1212
|
}
|
|
1416
|
-
requestAnimationFrame(
|
|
1213
|
+
requestAnimationFrame(v);
|
|
1417
1214
|
}
|
|
1418
|
-
requestAnimationFrame(
|
|
1215
|
+
requestAnimationFrame(v);
|
|
1419
1216
|
});
|
|
1420
1217
|
}
|
|
1421
|
-
function
|
|
1218
|
+
function $r(t, e) {
|
|
1422
1219
|
const r = {
|
|
1423
1220
|
format: "json",
|
|
1424
1221
|
includeStyles: !0,
|
|
1425
1222
|
...e
|
|
1426
|
-
}, n = t.getAllSeries().map((
|
|
1427
|
-
id:
|
|
1428
|
-
type:
|
|
1429
|
-
pointCount:
|
|
1430
|
-
...r.includeStyles ? { style:
|
|
1431
|
-
})),
|
|
1223
|
+
}, n = t.getAllSeries().map((o) => ({
|
|
1224
|
+
id: o.getId(),
|
|
1225
|
+
type: o.getType(),
|
|
1226
|
+
pointCount: o.getPointCount(),
|
|
1227
|
+
...r.includeStyles ? { style: o.getStyle() } : {}
|
|
1228
|
+
})), a = {
|
|
1432
1229
|
timestamp: Date.now(),
|
|
1433
1230
|
config: {},
|
|
1434
1231
|
series: n,
|
|
1435
1232
|
bounds: t.getViewBounds()
|
|
1436
1233
|
};
|
|
1437
|
-
return r.format === "png" && t.exportImage && (
|
|
1234
|
+
return r.format === "png" && t.exportImage && (a.image = t.exportImage()), a;
|
|
1438
1235
|
}
|
|
1439
|
-
function
|
|
1236
|
+
function Hr(t, e, r = 1e-6) {
|
|
1440
1237
|
const n = [];
|
|
1441
1238
|
t.series.length !== e.series.length && n.push(`Series count: ${t.series.length} vs ${e.series.length}`);
|
|
1442
|
-
for (let
|
|
1443
|
-
const i = t.series[
|
|
1444
|
-
i.id !==
|
|
1239
|
+
for (let o = 0; o < Math.min(t.series.length, e.series.length); o++) {
|
|
1240
|
+
const i = t.series[o], s = e.series[o];
|
|
1241
|
+
i.id !== s.id && n.push(`Series[${o}] id: "${i.id}" vs "${s.id}"`), i.type !== s.type && n.push(`Series[${o}] type: "${i.type}" vs "${s.type}"`), i.pointCount !== s.pointCount && n.push(`Series[${o}] pointCount: ${i.pointCount} vs ${s.pointCount}`);
|
|
1445
1242
|
}
|
|
1446
|
-
const
|
|
1447
|
-
for (const
|
|
1448
|
-
Math.abs(t.bounds[
|
|
1243
|
+
const a = ["xMin", "xMax", "yMin", "yMax"];
|
|
1244
|
+
for (const o of a)
|
|
1245
|
+
Math.abs(t.bounds[o] - e.bounds[o]) > r && n.push(`Bounds.${o}: ${t.bounds[o]} vs ${e.bounds[o]}`);
|
|
1449
1246
|
return {
|
|
1450
1247
|
equal: n.length === 0,
|
|
1451
1248
|
differences: n
|
|
1452
1249
|
};
|
|
1453
1250
|
}
|
|
1454
|
-
function
|
|
1251
|
+
function zr(t, e) {
|
|
1455
1252
|
const r = [];
|
|
1456
1253
|
return e.minFps && t.avgFps < e.minFps && r.push(`FPS ${t.avgFps} < required ${e.minFps}`), e.maxFrameTime && t.avgFrameTime > e.maxFrameTime && r.push(`Frame time ${t.avgFrameTime}ms > required ${e.maxFrameTime}ms`), e.minThroughput && t.throughput < e.minThroughput && r.push(`Throughput ${t.throughput} < required ${e.minThroughput}`), {
|
|
1457
1254
|
passed: r.length === 0,
|
|
1458
1255
|
failures: r
|
|
1459
1256
|
};
|
|
1460
1257
|
}
|
|
1461
|
-
function
|
|
1258
|
+
function Nr(t = 1) {
|
|
1462
1259
|
return new Promise((e) => {
|
|
1463
1260
|
let r = t;
|
|
1464
1261
|
function n() {
|
|
@@ -1467,127 +1264,127 @@ function Ur(t = 1) {
|
|
|
1467
1264
|
requestAnimationFrame(n);
|
|
1468
1265
|
});
|
|
1469
1266
|
}
|
|
1470
|
-
function
|
|
1267
|
+
function Ur(t) {
|
|
1471
1268
|
return new Promise((e) => setTimeout(e, t));
|
|
1472
1269
|
}
|
|
1473
|
-
const
|
|
1270
|
+
const dr = {
|
|
1474
1271
|
name: "crosshair",
|
|
1475
1272
|
version: "1.0.0",
|
|
1476
1273
|
description: "Interactive crosshair that follows mouse cursor",
|
|
1477
1274
|
provides: ["interaction", "visualization"],
|
|
1478
1275
|
tags: ["cursor", "crosshair", "tooltip"]
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1276
|
+
}, fr = G(
|
|
1277
|
+
dr,
|
|
1481
1278
|
(t = {}) => {
|
|
1482
1279
|
const {
|
|
1483
1280
|
showVertical: e = !0,
|
|
1484
1281
|
showHorizontal: r = !0,
|
|
1485
1282
|
color: n,
|
|
1486
|
-
lineStyle:
|
|
1487
|
-
lineWidth:
|
|
1283
|
+
lineStyle: a = "dashed",
|
|
1284
|
+
lineWidth: o = 1,
|
|
1488
1285
|
snapToData: i = !1,
|
|
1489
|
-
valueFormat:
|
|
1286
|
+
valueFormat: s = { xPrecision: 4, yPrecision: 4 }
|
|
1490
1287
|
} = t;
|
|
1491
|
-
let
|
|
1492
|
-
t.showAxisLabels !== void 0 && t.valueDisplayMode === void 0 && (
|
|
1288
|
+
let l = t.valueDisplayMode ?? "disabled";
|
|
1289
|
+
t.showAxisLabels !== void 0 && t.valueDisplayMode === void 0 && (l = t.showAxisLabels ? "floating" : "disabled");
|
|
1493
1290
|
const c = t.cornerPosition ?? "top-left";
|
|
1494
|
-
let u = -1,
|
|
1291
|
+
let u = -1, h = -1, v, d = null, p = null;
|
|
1495
1292
|
return {
|
|
1496
|
-
onInit(
|
|
1497
|
-
|
|
1498
|
-
const f =
|
|
1293
|
+
onInit(g) {
|
|
1294
|
+
v = "crosshair-overlay";
|
|
1295
|
+
const f = g.ui.createOverlay(v, {
|
|
1499
1296
|
zIndex: 500,
|
|
1500
1297
|
position: { top: "0", left: "0", right: "0", bottom: "0" }
|
|
1501
1298
|
});
|
|
1502
|
-
|
|
1299
|
+
d = document.createElement("canvas"), d.style.cssText = "width: 100%; height: 100%;", f.appendChild(d), p = d.getContext("2d"), x(g);
|
|
1503
1300
|
},
|
|
1504
|
-
onDestroy(
|
|
1505
|
-
|
|
1301
|
+
onDestroy(g) {
|
|
1302
|
+
g.ui.removeOverlay(v), d = null, p = null;
|
|
1506
1303
|
},
|
|
1507
|
-
onResize(
|
|
1508
|
-
|
|
1304
|
+
onResize(g) {
|
|
1305
|
+
x(g);
|
|
1509
1306
|
},
|
|
1510
|
-
onInteraction(
|
|
1307
|
+
onInteraction(g, f) {
|
|
1511
1308
|
if (f.type === "mousemove") {
|
|
1512
|
-
if (u = f.pixelX,
|
|
1513
|
-
const
|
|
1514
|
-
|
|
1309
|
+
if (u = f.pixelX, h = f.pixelY, i && f.inPlotArea) {
|
|
1310
|
+
const A = g.coords.pickPoint(u, h);
|
|
1311
|
+
A && (u = A.pixelX, h = A.pixelY);
|
|
1515
1312
|
}
|
|
1516
|
-
b(
|
|
1313
|
+
b(g);
|
|
1517
1314
|
}
|
|
1518
1315
|
},
|
|
1519
1316
|
onViewChange() {
|
|
1520
1317
|
}
|
|
1521
1318
|
};
|
|
1522
|
-
function
|
|
1523
|
-
if (!
|
|
1524
|
-
const f =
|
|
1525
|
-
|
|
1319
|
+
function x(g) {
|
|
1320
|
+
if (!d || !p) return;
|
|
1321
|
+
const f = g.render.canvasSize, A = g.render.pixelRatio;
|
|
1322
|
+
d.width = f.width * A, d.height = f.height * A, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(A, A);
|
|
1526
1323
|
}
|
|
1527
|
-
function b(
|
|
1528
|
-
var
|
|
1529
|
-
if (!
|
|
1530
|
-
const { width: f, height:
|
|
1531
|
-
if (
|
|
1532
|
-
const
|
|
1533
|
-
if (u <
|
|
1324
|
+
function b(g) {
|
|
1325
|
+
var S;
|
|
1326
|
+
if (!p || !d) return;
|
|
1327
|
+
const { width: f, height: A } = g.render.canvasSize;
|
|
1328
|
+
if (p.clearRect(0, 0, f, A), u < 0 || h < 0) return;
|
|
1329
|
+
const w = g.render.plotArea;
|
|
1330
|
+
if (u < w.x || u > w.x + w.width || h < w.y || h > w.y + w.height)
|
|
1534
1331
|
return;
|
|
1535
|
-
const
|
|
1536
|
-
|
|
1332
|
+
const F = n || ((S = g.ui.theme.cursor) == null ? void 0 : S.color) || "#888888";
|
|
1333
|
+
p.save(), p.strokeStyle = F, p.lineWidth = o, a === "dashed" ? p.setLineDash([6, 4]) : a === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(u, w.y), p.lineTo(u, w.y + w.height), p.stroke()), r && (p.beginPath(), p.moveTo(w.x, h), p.lineTo(w.x + w.width, h), p.stroke()), p.restore(), l === "floating" ? m(g, p, u, h, F) : l === "corner" && y(g, p, u, h, F);
|
|
1537
1334
|
}
|
|
1538
|
-
function m(
|
|
1539
|
-
const
|
|
1335
|
+
function m(g, f, A, w, F) {
|
|
1336
|
+
const S = g.coords.pixelToDataX(A), D = g.coords.pixelToDataY(w), T = g.render.plotArea;
|
|
1540
1337
|
f.save(), f.font = "11px system-ui, sans-serif", f.textAlign = "center", f.textBaseline = "top";
|
|
1541
|
-
const
|
|
1542
|
-
f.fillStyle =
|
|
1543
|
-
const
|
|
1544
|
-
f.fillStyle =
|
|
1338
|
+
const I = S.toPrecision(s.xPrecision), C = f.measureText(I).width + 8, M = 18, L = A - C / 2, E = T.y + T.height + 2;
|
|
1339
|
+
f.fillStyle = F, f.fillRect(L, E, C, M), f.fillStyle = "#ffffff", f.fillText(I, A, E + 3), f.textAlign = "right", f.textBaseline = "middle";
|
|
1340
|
+
const _ = D.toPrecision(s.yPrecision), X = f.measureText(_).width + 8, k = 18, Y = T.x - X - 2, H = w - k / 2;
|
|
1341
|
+
f.fillStyle = F, f.fillRect(Y, H, X, k), f.fillStyle = "#ffffff", f.fillText(_, T.x - 6, w), f.restore();
|
|
1545
1342
|
}
|
|
1546
|
-
function
|
|
1547
|
-
const
|
|
1343
|
+
function y(g, f, A, w, F) {
|
|
1344
|
+
const S = g.coords.pixelToDataX(A), D = g.coords.pixelToDataY(w), T = g.render.plotArea;
|
|
1548
1345
|
f.save(), f.font = "11px system-ui, sans-serif";
|
|
1549
|
-
const
|
|
1550
|
-
let
|
|
1346
|
+
const I = `X: ${S.toPrecision(s.xPrecision)}`, P = `Y: ${D.toPrecision(s.yPrecision)}`, C = f.measureText(I), M = f.measureText(P), L = Math.max(C.width, M.width), E = 6, _ = 16, R = L + E * 2, X = _ * 2 + E * 2;
|
|
1347
|
+
let k, Y;
|
|
1551
1348
|
switch (c) {
|
|
1552
1349
|
case "top-left":
|
|
1553
|
-
|
|
1350
|
+
k = T.x + 8, Y = T.y + 8;
|
|
1554
1351
|
break;
|
|
1555
1352
|
case "top-right":
|
|
1556
|
-
|
|
1353
|
+
k = T.x + T.width - R - 8, Y = T.y + 8;
|
|
1557
1354
|
break;
|
|
1558
1355
|
case "bottom-left":
|
|
1559
|
-
|
|
1356
|
+
k = T.x + 8, Y = T.y + T.height - X - 8;
|
|
1560
1357
|
break;
|
|
1561
1358
|
case "bottom-right":
|
|
1562
|
-
|
|
1359
|
+
k = T.x + T.width - R - 8, Y = T.y + T.height - X - 8;
|
|
1563
1360
|
break;
|
|
1564
1361
|
default:
|
|
1565
|
-
|
|
1362
|
+
k = T.x + 8, Y = T.y + 8;
|
|
1566
1363
|
}
|
|
1567
|
-
f.fillStyle =
|
|
1364
|
+
f.fillStyle = F, f.globalAlpha = 0.85, f.fillRect(k, Y, R, X), f.globalAlpha = 1, f.strokeStyle = "rgba(255,255,255,0.3)", f.lineWidth = 1, f.strokeRect(k, Y, R, X), f.fillStyle = "#ffffff", f.textAlign = "left", f.textBaseline = "top", f.fillText(I, k + E, Y + E), f.fillText(P, k + E, Y + E + _), f.restore();
|
|
1568
1365
|
}
|
|
1569
1366
|
}
|
|
1570
|
-
),
|
|
1367
|
+
), hr = {
|
|
1571
1368
|
name: "statistics-overlay",
|
|
1572
1369
|
version: "1.0.0",
|
|
1573
1370
|
description: "Displays real-time statistics for chart data",
|
|
1574
1371
|
provides: ["visualization", "analysis"],
|
|
1575
1372
|
tags: ["statistics", "overlay", "analytics"]
|
|
1576
|
-
},
|
|
1577
|
-
|
|
1373
|
+
}, gr = G(
|
|
1374
|
+
hr,
|
|
1578
1375
|
(t = {}) => {
|
|
1579
1376
|
const {
|
|
1580
1377
|
position: e = "top-right",
|
|
1581
1378
|
show: r = ["count", "mean", "min", "max"],
|
|
1582
1379
|
seriesId: n,
|
|
1583
|
-
autoUpdate:
|
|
1380
|
+
autoUpdate: a = !0
|
|
1584
1381
|
} = t;
|
|
1585
|
-
let
|
|
1382
|
+
let o, i = null;
|
|
1586
1383
|
return {
|
|
1587
1384
|
onInit(c) {
|
|
1588
|
-
|
|
1385
|
+
o = "stats-overlay";
|
|
1589
1386
|
const u = {};
|
|
1590
|
-
e.includes("top") && (u.top = "10px"), e.includes("bottom") && (u.bottom = "10px"), e.includes("left") && (u.left = "10px"), e.includes("right") && (u.right = "10px"), i = c.ui.createOverlay(
|
|
1387
|
+
e.includes("top") && (u.top = "10px"), e.includes("bottom") && (u.bottom = "10px"), e.includes("left") && (u.left = "10px"), e.includes("right") && (u.right = "10px"), i = c.ui.createOverlay(o, {
|
|
1591
1388
|
zIndex: 800,
|
|
1592
1389
|
position: u,
|
|
1593
1390
|
pointerEvents: !1
|
|
@@ -1605,74 +1402,74 @@ const fr = {
|
|
|
1605
1402
|
<div style="font-weight: bold; margin-bottom: 4px; color: #4ade80;">📊 Statistics</div>
|
|
1606
1403
|
<div class="stats-content"></div>
|
|
1607
1404
|
</div>
|
|
1608
|
-
`,
|
|
1405
|
+
`, s(c);
|
|
1609
1406
|
},
|
|
1610
1407
|
onDestroy(c) {
|
|
1611
|
-
c.ui.removeOverlay(
|
|
1408
|
+
c.ui.removeOverlay(o), i = null;
|
|
1612
1409
|
},
|
|
1613
1410
|
onDataUpdate(c) {
|
|
1614
|
-
|
|
1411
|
+
a && s(c);
|
|
1615
1412
|
},
|
|
1616
1413
|
onSeriesAdd(c) {
|
|
1617
|
-
|
|
1414
|
+
s(c);
|
|
1618
1415
|
},
|
|
1619
1416
|
onSeriesRemove(c) {
|
|
1620
|
-
|
|
1417
|
+
s(c);
|
|
1621
1418
|
},
|
|
1622
1419
|
api: {
|
|
1623
1420
|
refresh(c) {
|
|
1624
|
-
|
|
1421
|
+
s(c);
|
|
1625
1422
|
}
|
|
1626
1423
|
}
|
|
1627
1424
|
};
|
|
1628
|
-
function
|
|
1425
|
+
function s(c) {
|
|
1629
1426
|
if (!i) return;
|
|
1630
1427
|
const u = i.querySelector(".stats-content");
|
|
1631
1428
|
if (!u) return;
|
|
1632
|
-
const
|
|
1633
|
-
if (
|
|
1429
|
+
const h = c.data.getAllSeries(), v = n ? h.filter((b) => b.getId() === n) : h;
|
|
1430
|
+
if (v.length === 0) {
|
|
1634
1431
|
u.innerHTML = "<div style='color: #888'>No data</div>";
|
|
1635
1432
|
return;
|
|
1636
1433
|
}
|
|
1637
|
-
let
|
|
1638
|
-
if (
|
|
1434
|
+
let d = [];
|
|
1435
|
+
if (v.forEach((b) => {
|
|
1639
1436
|
const m = b.getData();
|
|
1640
|
-
m != null && m.y && (
|
|
1641
|
-
}),
|
|
1437
|
+
m != null && m.y && (d = d.concat(Array.from(m.y)));
|
|
1438
|
+
}), d.length === 0) {
|
|
1642
1439
|
u.innerHTML = "<div style='color: #888'>No data</div>";
|
|
1643
1440
|
return;
|
|
1644
1441
|
}
|
|
1645
|
-
const
|
|
1646
|
-
r.includes("count") &&
|
|
1442
|
+
const p = l(d), x = [];
|
|
1443
|
+
r.includes("count") && x.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), r.includes("mean") && x.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), r.includes("min") && x.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), r.includes("max") && x.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), r.includes("std") && x.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), r.includes("range") && x.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), u.innerHTML = x.join("");
|
|
1647
1444
|
}
|
|
1648
|
-
function
|
|
1445
|
+
function l(c) {
|
|
1649
1446
|
const u = c.length;
|
|
1650
|
-
let
|
|
1447
|
+
let h = 0, v = 1 / 0, d = -1 / 0;
|
|
1651
1448
|
for (const m of c)
|
|
1652
|
-
|
|
1653
|
-
const
|
|
1654
|
-
let
|
|
1449
|
+
h += m, m < v && (v = m), m > d && (d = m);
|
|
1450
|
+
const p = h / u;
|
|
1451
|
+
let x = 0;
|
|
1655
1452
|
for (const m of c)
|
|
1656
|
-
|
|
1657
|
-
const b = Math.sqrt(
|
|
1453
|
+
x += (m - p) ** 2;
|
|
1454
|
+
const b = Math.sqrt(x / u);
|
|
1658
1455
|
return {
|
|
1659
1456
|
count: u,
|
|
1660
|
-
mean:
|
|
1661
|
-
min:
|
|
1662
|
-
max:
|
|
1457
|
+
mean: p,
|
|
1458
|
+
min: v,
|
|
1459
|
+
max: d,
|
|
1663
1460
|
std: b,
|
|
1664
|
-
range:
|
|
1461
|
+
range: d - v
|
|
1665
1462
|
};
|
|
1666
1463
|
}
|
|
1667
1464
|
}
|
|
1668
|
-
),
|
|
1465
|
+
), pr = {
|
|
1669
1466
|
name: "watermark",
|
|
1670
1467
|
version: "1.0.0",
|
|
1671
1468
|
description: "Adds a customizable watermark to the chart",
|
|
1672
1469
|
provides: ["visualization"],
|
|
1673
1470
|
tags: ["watermark", "branding", "overlay"]
|
|
1674
|
-
},
|
|
1675
|
-
|
|
1471
|
+
}, mr = G(
|
|
1472
|
+
pr,
|
|
1676
1473
|
(t) => {
|
|
1677
1474
|
if (!(t != null && t.text))
|
|
1678
1475
|
throw new Error("WatermarkPlugin requires 'text' configuration");
|
|
@@ -1680,123 +1477,141 @@ const fr = {
|
|
|
1680
1477
|
text: e,
|
|
1681
1478
|
fontSize: r = 48,
|
|
1682
1479
|
fontFamily: n = "system-ui, sans-serif",
|
|
1683
|
-
color:
|
|
1684
|
-
position:
|
|
1685
|
-
rotation: i =
|
|
1480
|
+
color: a = "rgba(128, 128, 128, 0.15)",
|
|
1481
|
+
position: o = "center",
|
|
1482
|
+
rotation: i = o === "center" ? -30 : 0
|
|
1686
1483
|
} = t;
|
|
1687
1484
|
return {
|
|
1688
|
-
onRenderOverlay(
|
|
1689
|
-
const
|
|
1690
|
-
if (!
|
|
1691
|
-
|
|
1692
|
-
const c =
|
|
1693
|
-
|
|
1694
|
-
let u,
|
|
1695
|
-
|
|
1485
|
+
onRenderOverlay(s) {
|
|
1486
|
+
const l = s.render.ctx2d;
|
|
1487
|
+
if (!l) return;
|
|
1488
|
+
s.render.canvasSize;
|
|
1489
|
+
const c = s.render.plotArea;
|
|
1490
|
+
l.save(), l.font = `${r}px ${n}`, l.fillStyle = a, l.textAlign = "center", l.textBaseline = "middle";
|
|
1491
|
+
let u, h;
|
|
1492
|
+
o === "center" ? (u = c.x + c.width / 2, h = c.y + c.height / 2) : o === "bottom-right" ? (u = c.x + c.width - r, h = c.y + c.height - r / 2) : (u = c.x + r, h = c.y + c.height - r / 2), l.translate(u, h), l.rotate(i * Math.PI / 180), l.fillText(e, 0, 0), l.restore();
|
|
1493
|
+
},
|
|
1494
|
+
onExportSVG(s) {
|
|
1495
|
+
var l;
|
|
1496
|
+
!s.builder || ((l = s.exportContext) == null ? void 0 : l.options.includeOverlays) === !1 || je(s, e, {
|
|
1497
|
+
opacity: 0.15,
|
|
1498
|
+
rotation: i,
|
|
1499
|
+
color: a
|
|
1500
|
+
});
|
|
1696
1501
|
}
|
|
1697
1502
|
};
|
|
1698
1503
|
}
|
|
1699
|
-
),
|
|
1504
|
+
), yr = {
|
|
1700
1505
|
name: "grid-highlight",
|
|
1701
1506
|
version: "1.0.0",
|
|
1702
1507
|
description: "Highlights specific regions of the chart grid",
|
|
1703
1508
|
provides: ["visualization"],
|
|
1704
1509
|
tags: ["grid", "highlight", "regions"]
|
|
1705
|
-
},
|
|
1706
|
-
|
|
1510
|
+
}, vr = G(
|
|
1511
|
+
yr,
|
|
1707
1512
|
(t = {}) => {
|
|
1708
1513
|
const { xIntervals: e = [], yIntervals: r = [], opacity: n = 0.1 } = t;
|
|
1709
1514
|
return {
|
|
1710
|
-
onRenderOverlay(
|
|
1711
|
-
const i =
|
|
1515
|
+
onRenderOverlay(a, o) {
|
|
1516
|
+
const i = a.render.ctx2d;
|
|
1712
1517
|
if (!i) return;
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1715
|
-
for (const
|
|
1716
|
-
const c =
|
|
1717
|
-
i.fillStyle =
|
|
1518
|
+
const s = a.render.plotArea;
|
|
1519
|
+
a.data.getViewBounds(), i.save(), i.beginPath(), i.rect(s.x, s.y, s.width, s.height), i.clip(), i.globalAlpha = n;
|
|
1520
|
+
for (const l of e) {
|
|
1521
|
+
const c = a.coords.dataToPixelX(l.start), u = a.coords.dataToPixelX(l.end);
|
|
1522
|
+
i.fillStyle = l.color, i.fillRect(
|
|
1718
1523
|
Math.min(c, u),
|
|
1719
|
-
|
|
1524
|
+
s.y,
|
|
1720
1525
|
Math.abs(u - c),
|
|
1721
|
-
|
|
1526
|
+
s.height
|
|
1722
1527
|
);
|
|
1723
1528
|
}
|
|
1724
|
-
for (const
|
|
1725
|
-
const c =
|
|
1726
|
-
i.fillStyle =
|
|
1727
|
-
|
|
1529
|
+
for (const l of r) {
|
|
1530
|
+
const c = a.coords.dataToPixelY(l.start), u = a.coords.dataToPixelY(l.end);
|
|
1531
|
+
i.fillStyle = l.color, i.fillRect(
|
|
1532
|
+
s.x,
|
|
1728
1533
|
Math.min(c, u),
|
|
1729
|
-
|
|
1534
|
+
s.width,
|
|
1730
1535
|
Math.abs(u - c)
|
|
1731
1536
|
);
|
|
1732
1537
|
}
|
|
1733
1538
|
i.restore();
|
|
1539
|
+
},
|
|
1540
|
+
onExportSVG(a) {
|
|
1541
|
+
var i;
|
|
1542
|
+
if (!a.builder || ((i = a.exportContext) == null ? void 0 : i.options.includeOverlays) === !1) return;
|
|
1543
|
+
const o = [];
|
|
1544
|
+
for (const s of e)
|
|
1545
|
+
o.push({ axis: "x", min: s.start, max: s.end, color: s.color });
|
|
1546
|
+
for (const s of r)
|
|
1547
|
+
o.push({ axis: "y", min: s.start, max: s.end, color: s.color });
|
|
1548
|
+
Je(a, o);
|
|
1734
1549
|
}
|
|
1735
1550
|
};
|
|
1736
1551
|
}
|
|
1737
|
-
),
|
|
1552
|
+
), br = {
|
|
1738
1553
|
name: "data-logger",
|
|
1739
1554
|
version: "1.0.0",
|
|
1740
1555
|
description: "Logs chart events for debugging and analysis",
|
|
1741
1556
|
provides: ["analysis"],
|
|
1742
1557
|
tags: ["debug", "logging", "events"]
|
|
1743
|
-
},
|
|
1744
|
-
|
|
1558
|
+
}, xr = G(
|
|
1559
|
+
br,
|
|
1745
1560
|
(t = {}) => {
|
|
1746
1561
|
const {
|
|
1747
1562
|
logDataUpdates: e = !0,
|
|
1748
1563
|
logViewChanges: r = !0,
|
|
1749
1564
|
logInteractions: n = !1,
|
|
1750
|
-
maxEntries:
|
|
1751
|
-
} = t,
|
|
1752
|
-
function i(
|
|
1753
|
-
|
|
1565
|
+
maxEntries: a = 100
|
|
1566
|
+
} = t, o = [];
|
|
1567
|
+
function i(s, l) {
|
|
1568
|
+
o.push({
|
|
1754
1569
|
timestamp: Date.now(),
|
|
1755
|
-
type:
|
|
1756
|
-
data:
|
|
1757
|
-
}),
|
|
1570
|
+
type: s,
|
|
1571
|
+
data: l
|
|
1572
|
+
}), o.length > a && o.shift();
|
|
1758
1573
|
}
|
|
1759
1574
|
return {
|
|
1760
|
-
onInit(
|
|
1761
|
-
|
|
1575
|
+
onInit(s) {
|
|
1576
|
+
s.log.info("Data logger initialized");
|
|
1762
1577
|
},
|
|
1763
|
-
onDataUpdate(
|
|
1578
|
+
onDataUpdate(s, l) {
|
|
1764
1579
|
e && (i("dataUpdate", {
|
|
1765
|
-
seriesId:
|
|
1766
|
-
mode:
|
|
1767
|
-
pointCount:
|
|
1768
|
-
}),
|
|
1580
|
+
seriesId: l.seriesId,
|
|
1581
|
+
mode: l.mode,
|
|
1582
|
+
pointCount: l.pointCount
|
|
1583
|
+
}), s.log.debug(`Data update: ${l.seriesId} (${l.mode}, ${l.pointCount} points)`));
|
|
1769
1584
|
},
|
|
1770
|
-
onViewChange(
|
|
1585
|
+
onViewChange(s, l) {
|
|
1771
1586
|
r && (i("viewChange", {
|
|
1772
|
-
trigger:
|
|
1773
|
-
bounds:
|
|
1774
|
-
}),
|
|
1587
|
+
trigger: l.trigger,
|
|
1588
|
+
bounds: l.current
|
|
1589
|
+
}), s.log.debug(`View change: ${l.trigger}`));
|
|
1775
1590
|
},
|
|
1776
|
-
onInteraction(
|
|
1591
|
+
onInteraction(s, l) {
|
|
1777
1592
|
n && i("interaction", {
|
|
1778
|
-
type:
|
|
1779
|
-
pixelX:
|
|
1780
|
-
pixelY:
|
|
1781
|
-
inPlotArea:
|
|
1593
|
+
type: l.type,
|
|
1594
|
+
pixelX: l.pixelX,
|
|
1595
|
+
pixelY: l.pixelY,
|
|
1596
|
+
inPlotArea: l.inPlotArea
|
|
1782
1597
|
});
|
|
1783
1598
|
},
|
|
1784
|
-
onSerialize(
|
|
1785
|
-
return { entries:
|
|
1599
|
+
onSerialize(s) {
|
|
1600
|
+
return { entries: o };
|
|
1786
1601
|
},
|
|
1787
|
-
onDeserialize(
|
|
1788
|
-
const c =
|
|
1789
|
-
c != null && c.entries && (
|
|
1602
|
+
onDeserialize(s, l) {
|
|
1603
|
+
const c = l;
|
|
1604
|
+
c != null && c.entries && (o.length = 0, o.push(...c.entries));
|
|
1790
1605
|
},
|
|
1791
1606
|
api: {
|
|
1792
1607
|
getEntries() {
|
|
1793
|
-
return [...
|
|
1608
|
+
return [...o];
|
|
1794
1609
|
},
|
|
1795
1610
|
clear() {
|
|
1796
|
-
|
|
1611
|
+
o.length = 0;
|
|
1797
1612
|
},
|
|
1798
1613
|
export() {
|
|
1799
|
-
return JSON.stringify(
|
|
1614
|
+
return JSON.stringify(o, null, 2);
|
|
1800
1615
|
}
|
|
1801
1616
|
}
|
|
1802
1617
|
};
|
|
@@ -1807,122 +1622,122 @@ const fr = {
|
|
|
1807
1622
|
description: "Shows an arrow indicating the direction and trend of streaming data",
|
|
1808
1623
|
provides: ["visualization", "analysis"],
|
|
1809
1624
|
tags: ["streaming", "direction", "trend", "arrow"]
|
|
1810
|
-
},
|
|
1625
|
+
}, wr = G(
|
|
1811
1626
|
Pr,
|
|
1812
1627
|
(t = {}) => {
|
|
1813
1628
|
const {
|
|
1814
1629
|
seriesId: e,
|
|
1815
1630
|
sampleSize: r = 20,
|
|
1816
1631
|
color: n,
|
|
1817
|
-
size:
|
|
1818
|
-
minVelocity:
|
|
1632
|
+
size: a = 40,
|
|
1633
|
+
minVelocity: o = 0.01,
|
|
1819
1634
|
historySize: i = 20,
|
|
1820
|
-
idleTimeout:
|
|
1635
|
+
idleTimeout: s
|
|
1821
1636
|
} = t;
|
|
1822
|
-
let
|
|
1823
|
-
const
|
|
1824
|
-
let b = i, m = null,
|
|
1637
|
+
let l, c = null, u = null, h = null, v = null;
|
|
1638
|
+
const d = [], p = [], x = [];
|
|
1639
|
+
let b = i, m = null, y = Date.now(), g = -1 / 0, f = -1 / 0, A = s;
|
|
1825
1640
|
return {
|
|
1826
1641
|
onInit(P) {
|
|
1827
|
-
|
|
1828
|
-
const
|
|
1642
|
+
l = "direction-indicator-overlay";
|
|
1643
|
+
const C = P.ui.createOverlay(l, {
|
|
1829
1644
|
zIndex: 600,
|
|
1830
1645
|
position: { top: "0", left: "0", right: "0", bottom: "0" },
|
|
1831
1646
|
pointerEvents: !1
|
|
1832
1647
|
});
|
|
1833
|
-
if (c = document.createElement("canvas"), c.style.cssText = "width: 100%; height: 100%; pointer-events: none;",
|
|
1834
|
-
|
|
1648
|
+
if (c = document.createElement("canvas"), c.style.cssText = "width: 100%; height: 100%; pointer-events: none;", C.appendChild(c), u = c.getContext("2d"), w(P), e)
|
|
1649
|
+
v = e;
|
|
1835
1650
|
else {
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1651
|
+
const M = P.data.getAllSeries();
|
|
1652
|
+
M.length > 0 && (v = M[0].getId());
|
|
1838
1653
|
}
|
|
1839
1654
|
},
|
|
1840
1655
|
onDestroy(P) {
|
|
1841
|
-
P.ui.removeOverlay(
|
|
1656
|
+
P.ui.removeOverlay(l), m && clearTimeout(m), c = null, u = null, h = null;
|
|
1842
1657
|
},
|
|
1843
1658
|
onResize(P) {
|
|
1844
|
-
|
|
1659
|
+
w(P);
|
|
1845
1660
|
},
|
|
1846
1661
|
onAfterRender(P) {
|
|
1847
|
-
if (
|
|
1662
|
+
if (F(P), T(P), A) {
|
|
1848
1663
|
m && clearTimeout(m);
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1664
|
+
const C = Date.now() - y;
|
|
1665
|
+
C < A && (m = setTimeout(() => {
|
|
1851
1666
|
P.requestRender();
|
|
1852
|
-
},
|
|
1667
|
+
}, A - C + 10));
|
|
1853
1668
|
}
|
|
1854
1669
|
},
|
|
1855
|
-
onConfigChange(P,
|
|
1856
|
-
if (
|
|
1857
|
-
for (b =
|
|
1858
|
-
for (;
|
|
1859
|
-
for (;
|
|
1670
|
+
onConfigChange(P, C) {
|
|
1671
|
+
if (C.historySize !== void 0) {
|
|
1672
|
+
for (b = C.historySize; d.length > b; ) d.shift();
|
|
1673
|
+
for (; p.length > b; ) p.shift();
|
|
1674
|
+
for (; x.length > b; ) x.shift();
|
|
1860
1675
|
}
|
|
1861
|
-
|
|
1676
|
+
C.idleTimeout !== void 0 && (A = C.idleTimeout);
|
|
1862
1677
|
}
|
|
1863
1678
|
};
|
|
1864
|
-
function
|
|
1679
|
+
function w(P) {
|
|
1865
1680
|
if (!c || !u) return;
|
|
1866
|
-
const
|
|
1867
|
-
c.width =
|
|
1681
|
+
const C = P.render.canvasSize, M = P.render.pixelRatio;
|
|
1682
|
+
c.width = C.width * M, c.height = C.height * M, u.setTransform(1, 0, 0, 1, 0, 0), u.scale(M, M);
|
|
1868
1683
|
}
|
|
1869
|
-
function
|
|
1870
|
-
if (!
|
|
1871
|
-
const
|
|
1872
|
-
if (!
|
|
1873
|
-
const
|
|
1874
|
-
if (
|
|
1875
|
-
const
|
|
1876
|
-
(
|
|
1877
|
-
const R = Math.min(r,
|
|
1878
|
-
let
|
|
1879
|
-
for (let
|
|
1880
|
-
const
|
|
1881
|
-
|
|
1684
|
+
function F(P) {
|
|
1685
|
+
if (!v || !P.data.getSeries(v)) return;
|
|
1686
|
+
const M = P.data.getSeriesData(v);
|
|
1687
|
+
if (!M || !M.x || !M.y) return;
|
|
1688
|
+
const L = M.x.length;
|
|
1689
|
+
if (L < 2) return;
|
|
1690
|
+
const E = M.x[L - 1], _ = M.y[L - 1];
|
|
1691
|
+
(E !== g || _ !== f) && (g = E, f = _, y = Date.now());
|
|
1692
|
+
const R = Math.min(r, L), X = L - R;
|
|
1693
|
+
let k = 0, Y = 0, H = 0, re = 0, ne = 0, ae = 0;
|
|
1694
|
+
for (let O = X; O < L; O++) {
|
|
1695
|
+
const V = O - X, We = M.x[O], Ge = M.y[O], oe = P.coords.dataToPixelX(We), ie = P.coords.dataToPixelY(Ge);
|
|
1696
|
+
k += V, Y += oe, H += ie, re += V * oe, ne += V * ie, ae += V * V;
|
|
1882
1697
|
}
|
|
1883
|
-
const
|
|
1884
|
-
if (Math.abs(
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1887
|
-
const
|
|
1888
|
-
|
|
1698
|
+
const z = k / R, Ee = Y / R, Re = H / R, J = ae - R * z * z;
|
|
1699
|
+
if (Math.abs(J) < 1e-10) return;
|
|
1700
|
+
const Q = (re - R * z * Ee) / J, Z = (ne - R * z * Re) / J, Ie = Math.atan2(Z, Q), Le = P.coords.dataToPixelX(E), ke = P.coords.dataToPixelY(_);
|
|
1701
|
+
d.push(Le), p.push(ke), d.length > b && (d.shift(), p.shift()), x.push(Ie), x.length > b && x.shift();
|
|
1702
|
+
const Be = S(d), _e = S(p), Ye = D(x), Xe = Math.sqrt(Q * Q + Z * Z);
|
|
1703
|
+
h = { angle: Ye, magnitude: Xe, lastX: E, lastY: _, smoothX: Be, smoothY: _e };
|
|
1889
1704
|
}
|
|
1890
|
-
function
|
|
1891
|
-
return P.length === 0 ? 0 : P.reduce((
|
|
1705
|
+
function S(P) {
|
|
1706
|
+
return P.length === 0 ? 0 : P.reduce((C, M) => C + M, 0) / P.length;
|
|
1892
1707
|
}
|
|
1893
|
-
function
|
|
1708
|
+
function D(P) {
|
|
1894
1709
|
if (P.length === 0) return 0;
|
|
1895
|
-
let
|
|
1896
|
-
for (const
|
|
1897
|
-
|
|
1898
|
-
return Math.atan2(
|
|
1710
|
+
let C = 0, M = 0;
|
|
1711
|
+
for (const L of P)
|
|
1712
|
+
C += Math.cos(L), M += Math.sin(L);
|
|
1713
|
+
return Math.atan2(M / P.length, C / P.length);
|
|
1899
1714
|
}
|
|
1900
|
-
function
|
|
1901
|
-
if (!u || !c || !
|
|
1902
|
-
const { width:
|
|
1903
|
-
if (u.clearRect(0, 0,
|
|
1904
|
-
const
|
|
1905
|
-
u.save(),
|
|
1715
|
+
function T(P) {
|
|
1716
|
+
if (!u || !c || !h) return;
|
|
1717
|
+
const { width: C, height: M } = P.render.canvasSize;
|
|
1718
|
+
if (u.clearRect(0, 0, C, M), A !== void 0 && Date.now() - y > A || h.magnitude < o) return;
|
|
1719
|
+
const L = h.smoothX, E = h.smoothY, _ = n || "#FF9800";
|
|
1720
|
+
u.save(), I(u, L, E, h.angle, a, _), u.restore();
|
|
1906
1721
|
}
|
|
1907
|
-
function
|
|
1908
|
-
const R =
|
|
1909
|
-
P.save(), P.translate(
|
|
1722
|
+
function I(P, C, M, L, E, _) {
|
|
1723
|
+
const R = E * 0.6, X = E * 0.4;
|
|
1724
|
+
P.save(), P.translate(C, M), P.rotate(L), P.fillStyle = _, P.beginPath(), P.moveTo(R / 2, 0), P.lineTo(-R / 2, -X / 2), P.lineTo(-R / 2, X / 2), P.closePath(), P.fill(), P.restore();
|
|
1910
1725
|
}
|
|
1911
1726
|
}
|
|
1912
|
-
),
|
|
1913
|
-
Crosshair:
|
|
1914
|
-
Statistics:
|
|
1915
|
-
Watermark:
|
|
1916
|
-
GridHighlight:
|
|
1917
|
-
DataLogger:
|
|
1918
|
-
DirectionIndicator:
|
|
1919
|
-
},
|
|
1727
|
+
), qr = {
|
|
1728
|
+
Crosshair: fr,
|
|
1729
|
+
Statistics: gr,
|
|
1730
|
+
Watermark: mr,
|
|
1731
|
+
GridHighlight: vr,
|
|
1732
|
+
DataLogger: xr,
|
|
1733
|
+
DirectionIndicator: wr
|
|
1734
|
+
}, Ar = {
|
|
1920
1735
|
name: "velo-plot-drag-edit",
|
|
1921
1736
|
version: "1.0.0",
|
|
1922
1737
|
description: "Interactive drag & drop editing of data points",
|
|
1923
1738
|
provides: ["drag-edit", "point-editing"],
|
|
1924
1739
|
tags: ["interaction", "editing", "ux"]
|
|
1925
|
-
},
|
|
1740
|
+
}, Sr = {
|
|
1926
1741
|
enabled: !0,
|
|
1927
1742
|
constraint: "both",
|
|
1928
1743
|
snapToGrid: !1,
|
|
@@ -1948,88 +1763,88 @@ const fr = {
|
|
|
1948
1763
|
}
|
|
1949
1764
|
};
|
|
1950
1765
|
function Kr(t = {}) {
|
|
1951
|
-
const e = { ...
|
|
1952
|
-
let r = null, n = !1,
|
|
1953
|
-
function
|
|
1766
|
+
const e = { ...Sr, ...t };
|
|
1767
|
+
let r = null, n = !1, a = null, o = 0, i = 0, s = !1;
|
|
1768
|
+
function l(m, y) {
|
|
1954
1769
|
if (!r) return null;
|
|
1955
|
-
const
|
|
1956
|
-
return !
|
|
1957
|
-
seriesId:
|
|
1958
|
-
index:
|
|
1959
|
-
originalX:
|
|
1960
|
-
originalY:
|
|
1961
|
-
currentX:
|
|
1962
|
-
currentY:
|
|
1770
|
+
const g = r.coords.pickPoint(m, y, e.hitRadius);
|
|
1771
|
+
return !g || e.editableSeries.length > 0 && !e.editableSeries.includes(g.seriesId) ? null : {
|
|
1772
|
+
seriesId: g.seriesId,
|
|
1773
|
+
index: g.index,
|
|
1774
|
+
originalX: g.x,
|
|
1775
|
+
originalY: g.y,
|
|
1776
|
+
currentX: g.x,
|
|
1777
|
+
currentY: g.y
|
|
1963
1778
|
};
|
|
1964
1779
|
}
|
|
1965
|
-
function c(m,
|
|
1780
|
+
function c(m, y) {
|
|
1966
1781
|
return r ? {
|
|
1967
1782
|
x: r.coords.pixelToDataX(m),
|
|
1968
|
-
y: r.coords.pixelToDataY(
|
|
1783
|
+
y: r.coords.pixelToDataY(y)
|
|
1969
1784
|
} : { x: 0, y: 0 };
|
|
1970
1785
|
}
|
|
1971
|
-
function u(m,
|
|
1972
|
-
return Math.round(m /
|
|
1786
|
+
function u(m, y) {
|
|
1787
|
+
return Math.round(m / y) * y;
|
|
1973
1788
|
}
|
|
1974
|
-
function
|
|
1975
|
-
if (!
|
|
1976
|
-
switch (
|
|
1789
|
+
function h(m, y, g) {
|
|
1790
|
+
if (!a) return { x: m, y };
|
|
1791
|
+
switch (g) {
|
|
1977
1792
|
case "x":
|
|
1978
|
-
return { x: m, y:
|
|
1793
|
+
return { x: m, y: a.originalY };
|
|
1979
1794
|
case "y":
|
|
1980
|
-
return { x:
|
|
1795
|
+
return { x: a.originalX, y };
|
|
1981
1796
|
case "none":
|
|
1982
|
-
return { x:
|
|
1797
|
+
return { x: a.originalX, y: a.originalY };
|
|
1983
1798
|
default:
|
|
1984
|
-
return { x: m, y
|
|
1799
|
+
return { x: m, y };
|
|
1985
1800
|
}
|
|
1986
1801
|
}
|
|
1987
|
-
function
|
|
1988
|
-
let
|
|
1989
|
-
if (e.snapToGrid && (
|
|
1990
|
-
const
|
|
1991
|
-
if (typeof
|
|
1992
|
-
return { x:
|
|
1993
|
-
if (!
|
|
1994
|
-
return { x:
|
|
1995
|
-
|
|
1802
|
+
function v(m, y) {
|
|
1803
|
+
let g = m, f = y;
|
|
1804
|
+
if (e.snapToGrid && (g = u(m, e.snapIntervalX), f = u(y, e.snapIntervalY)), a && e.validator) {
|
|
1805
|
+
const A = { ...a, currentX: g, currentY: f }, w = e.validator(A);
|
|
1806
|
+
if (typeof w == "boolean")
|
|
1807
|
+
return { x: g, y: f, valid: w };
|
|
1808
|
+
if (!w.valid)
|
|
1809
|
+
return { x: g, y: f, valid: !1 };
|
|
1810
|
+
w.snapX !== void 0 && (g = w.snapX), w.snapY !== void 0 && (f = w.snapY);
|
|
1996
1811
|
}
|
|
1997
|
-
return { x:
|
|
1812
|
+
return { x: g, y: f, valid: !0 };
|
|
1998
1813
|
}
|
|
1999
|
-
function
|
|
2000
|
-
var
|
|
1814
|
+
function d(m, y, g, f) {
|
|
1815
|
+
var F, S, D;
|
|
2001
1816
|
if (!r) return;
|
|
2002
|
-
const
|
|
2003
|
-
if (!
|
|
2004
|
-
const
|
|
2005
|
-
!
|
|
1817
|
+
const A = (S = (F = r.chart).getSeries) == null ? void 0 : S.call(F, m);
|
|
1818
|
+
if (!A) return;
|
|
1819
|
+
const w = A.getData();
|
|
1820
|
+
!w || !w.x || !w.y || (w.x[y] = g, w.y[y] = f, (D = A.invalidateBuffers) == null || D.call(A), r.requestRender());
|
|
2006
1821
|
}
|
|
2007
|
-
function
|
|
2008
|
-
return
|
|
2009
|
-
seriesId:
|
|
2010
|
-
index:
|
|
2011
|
-
oldX:
|
|
2012
|
-
oldY:
|
|
2013
|
-
newX:
|
|
2014
|
-
newY:
|
|
2015
|
-
deltaX:
|
|
2016
|
-
deltaY:
|
|
1822
|
+
function p() {
|
|
1823
|
+
return a ? {
|
|
1824
|
+
seriesId: a.seriesId,
|
|
1825
|
+
index: a.index,
|
|
1826
|
+
oldX: a.originalX,
|
|
1827
|
+
oldY: a.originalY,
|
|
1828
|
+
newX: a.currentX,
|
|
1829
|
+
newY: a.currentY,
|
|
1830
|
+
deltaX: a.currentX - a.originalX,
|
|
1831
|
+
deltaY: a.currentY - a.originalY
|
|
2017
1832
|
} : null;
|
|
2018
1833
|
}
|
|
2019
|
-
function
|
|
2020
|
-
if (!n || !
|
|
2021
|
-
const { render:
|
|
1834
|
+
function x(m) {
|
|
1835
|
+
if (!n || !a || !e.showPreview) return;
|
|
1836
|
+
const { render: y, coords: g } = m, { ctx2d: f } = y;
|
|
2022
1837
|
if (!f) return;
|
|
2023
1838
|
f.save();
|
|
2024
|
-
const
|
|
2025
|
-
f.strokeStyle = e.previewStyle.color || "#ffffff", f.lineWidth = e.previewStyle.width || 2, f.globalAlpha = e.previewStyle.opacity || 0.5, f.setLineDash(e.previewStyle.dash || [5, 5]), f.beginPath(), f.moveTo(
|
|
1839
|
+
const A = g.dataToPixelX(a.originalX), w = g.dataToPixelY(a.originalY), F = g.dataToPixelX(a.currentX), S = g.dataToPixelY(a.currentY);
|
|
1840
|
+
f.strokeStyle = e.previewStyle.color || "#ffffff", f.lineWidth = e.previewStyle.width || 2, f.globalAlpha = e.previewStyle.opacity || 0.5, f.setLineDash(e.previewStyle.dash || [5, 5]), f.beginPath(), f.moveTo(A, w), f.lineTo(F, S), f.stroke(), f.globalAlpha = 1, f.fillStyle = e.highlightColor, f.setLineDash([]), f.beginPath(), f.arc(F, S, 6, 0, Math.PI * 2), f.fill(), f.strokeStyle = "#000000", f.lineWidth = 1, f.stroke(), f.restore();
|
|
2026
1841
|
}
|
|
2027
1842
|
const b = {
|
|
2028
1843
|
enable() {
|
|
2029
1844
|
e.enabled = !0;
|
|
2030
1845
|
},
|
|
2031
1846
|
disable() {
|
|
2032
|
-
e.enabled = !1, n && (
|
|
1847
|
+
e.enabled = !1, n && (a = null, n = !1, s = !1, r == null || r.requestRender());
|
|
2033
1848
|
},
|
|
2034
1849
|
isEnabled() {
|
|
2035
1850
|
return e.enabled;
|
|
@@ -2038,279 +1853,279 @@ function Kr(t = {}) {
|
|
|
2038
1853
|
e.editableSeries = m;
|
|
2039
1854
|
},
|
|
2040
1855
|
getDraggedPoint() {
|
|
2041
|
-
return
|
|
1856
|
+
return a;
|
|
2042
1857
|
},
|
|
2043
1858
|
cancelDrag() {
|
|
2044
|
-
n &&
|
|
1859
|
+
n && a && (a = null, n = !1, s = !1, r == null || r.requestRender());
|
|
2045
1860
|
},
|
|
2046
1861
|
updateConfig(m) {
|
|
2047
1862
|
Object.assign(e, m);
|
|
2048
1863
|
}
|
|
2049
1864
|
};
|
|
2050
1865
|
return {
|
|
2051
|
-
manifest:
|
|
1866
|
+
manifest: Ar,
|
|
2052
1867
|
onInit(m) {
|
|
2053
1868
|
r = m, r.chart.dragEdit = b;
|
|
2054
1869
|
},
|
|
2055
1870
|
onDestroy(m) {
|
|
2056
1871
|
delete m.chart.dragEdit, r = null;
|
|
2057
1872
|
},
|
|
2058
|
-
onInteraction(m,
|
|
1873
|
+
onInteraction(m, y) {
|
|
2059
1874
|
if (e.enabled) {
|
|
2060
|
-
if (
|
|
2061
|
-
const
|
|
2062
|
-
|
|
2063
|
-
} else if (
|
|
2064
|
-
if (!
|
|
1875
|
+
if (y.type === "mousedown") {
|
|
1876
|
+
const g = l(y.pixelX, y.pixelY);
|
|
1877
|
+
g && (a = g, o = y.pixelX, i = y.pixelY, s = !1, n = !1, y.preventDefault());
|
|
1878
|
+
} else if (y.type === "mousemove") {
|
|
1879
|
+
if (!a) return;
|
|
2065
1880
|
if (!n) {
|
|
2066
|
-
const
|
|
2067
|
-
if (Math.sqrt(
|
|
2068
|
-
n = !0,
|
|
2069
|
-
const
|
|
2070
|
-
|
|
1881
|
+
const S = y.pixelX - o, D = y.pixelY - i;
|
|
1882
|
+
if (Math.sqrt(S * S + D * D) > e.dragThreshold) {
|
|
1883
|
+
n = !0, s = !0;
|
|
1884
|
+
const I = p();
|
|
1885
|
+
I && e.onDragStart(I);
|
|
2071
1886
|
} else
|
|
2072
1887
|
return;
|
|
2073
1888
|
}
|
|
2074
|
-
n &&
|
|
2075
|
-
let { x:
|
|
2076
|
-
({ x:
|
|
2077
|
-
const { x:
|
|
2078
|
-
if (
|
|
2079
|
-
|
|
2080
|
-
const
|
|
2081
|
-
|
|
1889
|
+
n && y.preventDefault();
|
|
1890
|
+
let { x: g, y: f } = c(y.pixelX, y.pixelY);
|
|
1891
|
+
({ x: g, y: f } = h(g, f, e.constraint));
|
|
1892
|
+
const { x: A, y: w, valid: F } = v(g, f);
|
|
1893
|
+
if (F) {
|
|
1894
|
+
a.currentX = A, a.currentY = w;
|
|
1895
|
+
const S = p();
|
|
1896
|
+
S && e.onDrag(S), r == null || r.requestRender();
|
|
2082
1897
|
}
|
|
2083
|
-
} else if (
|
|
2084
|
-
if (!
|
|
2085
|
-
if (n &&
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
1898
|
+
} else if (y.type === "mouseup") {
|
|
1899
|
+
if (!a) return;
|
|
1900
|
+
if (n && s) {
|
|
1901
|
+
d(
|
|
1902
|
+
a.seriesId,
|
|
1903
|
+
a.index,
|
|
1904
|
+
a.currentX,
|
|
1905
|
+
a.currentY
|
|
2091
1906
|
);
|
|
2092
|
-
const
|
|
2093
|
-
|
|
1907
|
+
const g = p();
|
|
1908
|
+
g && e.onDragEnd(g), y.preventDefault();
|
|
2094
1909
|
}
|
|
2095
|
-
|
|
1910
|
+
a = null, n = !1, s = !1, r == null || r.requestRender();
|
|
2096
1911
|
}
|
|
2097
1912
|
}
|
|
2098
1913
|
},
|
|
2099
1914
|
onRenderOverlay(m) {
|
|
2100
|
-
|
|
1915
|
+
x(m);
|
|
2101
1916
|
},
|
|
2102
1917
|
api: b
|
|
2103
1918
|
};
|
|
2104
1919
|
}
|
|
2105
|
-
function
|
|
1920
|
+
function jr(t) {
|
|
2106
1921
|
return t;
|
|
2107
1922
|
}
|
|
2108
|
-
function
|
|
1923
|
+
function Jr(t, e) {
|
|
2109
1924
|
return (r) => ({
|
|
2110
1925
|
...e(r),
|
|
2111
1926
|
manifest: t
|
|
2112
1927
|
});
|
|
2113
1928
|
}
|
|
2114
|
-
|
|
1929
|
+
Te();
|
|
2115
1930
|
export {
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
1931
|
+
Fn as AnimationEngine,
|
|
1932
|
+
Si as AnnotationManager,
|
|
1933
|
+
hi as BackpressureManager,
|
|
1934
|
+
is as BaseBufferStore,
|
|
1935
|
+
ss as BaseTextureStore,
|
|
1936
|
+
qr as BuiltinPlugins,
|
|
1937
|
+
ti as ChartGroup,
|
|
2123
1938
|
Dn as ChartInitQueue,
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
1939
|
+
gi as CircularBuffer,
|
|
1940
|
+
Xo as ClipboardManager,
|
|
1941
|
+
fr as CrosshairPlugin,
|
|
1942
|
+
ue as DARK_THEME,
|
|
1943
|
+
En as DEFAULT_ANIMATION_CONFIG,
|
|
1944
|
+
Lo as DEFAULT_KEY_BINDINGS,
|
|
1945
|
+
Rn as DEFAULT_LAYOUT,
|
|
2131
1946
|
In as DEFAULT_THEME,
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
1947
|
+
xr as DataLoggerPlugin,
|
|
1948
|
+
Ho as DebugOverlay,
|
|
1949
|
+
wr as DirectionIndicatorPlugin,
|
|
1950
|
+
Ln as ELECTROCHEM_THEME,
|
|
1951
|
+
on as EventEmitter,
|
|
1952
|
+
ls as GpuBenchmark,
|
|
1953
|
+
cs as GpuCompute,
|
|
1954
|
+
us as GpuRenderer,
|
|
1955
|
+
vr as GridHighlightPlugin,
|
|
1956
|
+
ko as KeyBindingManager,
|
|
1957
|
+
kn as LIGHT_THEME,
|
|
1958
|
+
bo as LOCALE_DE_DE,
|
|
1959
|
+
xo as LOCALE_EN_US,
|
|
1960
|
+
Po as LOCALE_ES_ES,
|
|
1961
|
+
wo as LOCALE_FR_FR,
|
|
1962
|
+
Ao as LOCALE_JA_JP,
|
|
1963
|
+
So as LOCALE_PT_BR,
|
|
1964
|
+
To as LOCALE_ZH_CN,
|
|
1965
|
+
K as LinearScale,
|
|
1966
|
+
Ko as LoadingIndicator,
|
|
2152
1967
|
Bn as LogScale,
|
|
2153
1968
|
_n as MIDNIGHT_THEME,
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
1969
|
+
Se as NativeWebGLRenderer,
|
|
1970
|
+
ut as OverlayRenderer,
|
|
1971
|
+
ds as PipelineCache,
|
|
1972
|
+
Gs as Plugin3D,
|
|
1973
|
+
Sa as PluginAnalysis,
|
|
1974
|
+
Ti as PluginAnnotations,
|
|
1975
|
+
js as PluginAnomalyDetection,
|
|
1976
|
+
ml as PluginBrokenAxis,
|
|
1977
|
+
fl as PluginCaching,
|
|
1978
|
+
Wo as PluginClipboard,
|
|
1979
|
+
qs as PluginContextMenu,
|
|
1980
|
+
Ns as PluginDataExport,
|
|
1981
|
+
ll as PluginDataTransform,
|
|
1982
|
+
zo as PluginDebug,
|
|
2168
1983
|
Kr as PluginDragEdit,
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
1984
|
+
en as PluginDrawingTools,
|
|
1985
|
+
Sl as PluginForecasting,
|
|
1986
|
+
fs as PluginGpu,
|
|
1987
|
+
Co as PluginI18n,
|
|
1988
|
+
Vs as PluginKeyboard,
|
|
1989
|
+
ul as PluginLaTeX,
|
|
1990
|
+
gl as PluginLazyLoad,
|
|
1991
|
+
jo as PluginLoading,
|
|
1992
|
+
Qs as PluginMLIntegration,
|
|
2178
1993
|
Yn as PluginManagerImpl,
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
1994
|
+
xl as PluginOffscreen,
|
|
1995
|
+
el as PluginPatternRecognition,
|
|
1996
|
+
wl as PluginROI,
|
|
2182
1997
|
al as PluginRadar,
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
1998
|
+
rl as PluginRegression,
|
|
1999
|
+
tn as PluginReplay,
|
|
2000
|
+
il as PluginSnapshot,
|
|
2001
|
+
pi as PluginStreaming,
|
|
2002
|
+
Hs as PluginSync,
|
|
2003
|
+
ii as PluginThemeEditor,
|
|
2189
2004
|
_i as PluginTools,
|
|
2190
|
-
|
|
2191
|
-
|
|
2005
|
+
vl as PluginVideoRecorder,
|
|
2006
|
+
la as PluginVirtualization,
|
|
2192
2007
|
Xn as SERIALIZATION_VERSION,
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2008
|
+
fn as STACKED_DEFAULT_MIN_PANE_RATIO,
|
|
2009
|
+
hn as STACKED_MAX_PANES,
|
|
2010
|
+
io as SciChart,
|
|
2011
|
+
so as SciPlot,
|
|
2197
2012
|
Wn as Series,
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2013
|
+
hs as SeriesAdapter,
|
|
2014
|
+
lo as StackedPlot,
|
|
2015
|
+
Gn as StateHistory,
|
|
2016
|
+
gr as StatsPlugin,
|
|
2017
|
+
si as THEME_PRESETS,
|
|
2203
2018
|
Yi as TOOLTIP_THEMES,
|
|
2204
|
-
|
|
2019
|
+
li as ThemeEditor,
|
|
2205
2020
|
Xi as TooltipManager,
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2021
|
+
co as VeloPlot,
|
|
2022
|
+
mr as WatermarkPlugin,
|
|
2023
|
+
gs as WebGLBackend,
|
|
2024
|
+
ps as WebGPUBackend,
|
|
2025
|
+
Ce as WebGPURenderer,
|
|
2026
|
+
Pa as WorkerPool,
|
|
2212
2027
|
qe as addIndicatorToChart,
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2028
|
+
bs as adx,
|
|
2029
|
+
Ta as analyzeComplexSpectrum,
|
|
2030
|
+
Ca as analyzeSpectrum,
|
|
2031
|
+
le as applyBusinessDayX,
|
|
2032
|
+
xs as aroon,
|
|
2033
|
+
Ma as arraysToComplex,
|
|
2034
|
+
zr as assertPerformance,
|
|
2220
2035
|
Ps as atr,
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2036
|
+
Fa as autoCorrelation,
|
|
2037
|
+
Da as bandPassFilter,
|
|
2038
|
+
Ea as bandStopFilter,
|
|
2039
|
+
rn as barsToOhlc,
|
|
2040
|
+
rr as benchmarkCanvasGrid,
|
|
2041
|
+
Vr as benchmarkRender,
|
|
2042
|
+
nr as benchmarkWebGLGrid,
|
|
2043
|
+
Ra as blackmanWindow,
|
|
2044
|
+
ws as bollingerBands,
|
|
2045
|
+
gn as bollingerBandsAsync,
|
|
2046
|
+
pn as buildIndicatorPane,
|
|
2047
|
+
mn as buildIndicatorPaneFromPreset,
|
|
2048
|
+
Ke as buildIndicatorSeries,
|
|
2049
|
+
Nt as buildPositionLineAnnotation,
|
|
2050
|
+
sn as businessDaySpanMs,
|
|
2051
|
+
Ia as butterworth,
|
|
2052
|
+
es as calculateR2,
|
|
2053
|
+
Oi as calculateStats,
|
|
2054
|
+
ca as calculateTargetPoints,
|
|
2055
|
+
Mi as checkPluginCompatibility,
|
|
2056
|
+
Rr as compareGridBackends,
|
|
2057
|
+
Lr as compareScenarioToBaseline,
|
|
2058
|
+
Hr as compareSnapshots,
|
|
2059
|
+
La as complexToArrays,
|
|
2060
|
+
On as compressString,
|
|
2061
|
+
$e as computeHeikinAshi,
|
|
2062
|
+
yn as computeIndicatorFromSeries,
|
|
2063
|
+
vn as computeIndicatorPreset,
|
|
2064
|
+
mi as connectStreamToChart,
|
|
2065
|
+
Go as copyToClipboard,
|
|
2066
|
+
yi as createBackpressureManager,
|
|
2067
|
+
Vn as createChart,
|
|
2068
|
+
ri as createChartGroup,
|
|
2069
|
+
Jr as createConfigurablePlugin,
|
|
2070
|
+
No as createDebugOverlay,
|
|
2071
|
+
ms as createGpuRenderer,
|
|
2072
|
+
bn as createIndicatorSeries,
|
|
2073
|
+
Bo as createKeyBinding,
|
|
2074
|
+
Jo as createLoadingIndicator,
|
|
2075
|
+
Mo as createLocaleFormatter,
|
|
2076
|
+
vi as createLosslessBackpressure,
|
|
2077
|
+
ni as createMasterSlave,
|
|
2078
|
+
bi as createMessageParser,
|
|
2079
|
+
nn as createMockDatafeed,
|
|
2080
|
+
xi as createMockStream,
|
|
2081
|
+
Se as createNativeRenderer,
|
|
2082
|
+
jr as createPlugin,
|
|
2083
|
+
$n as createPluginContext,
|
|
2269
2084
|
Pi as createRealtimeBackpressure,
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2085
|
+
Fi as createRenderer,
|
|
2086
|
+
Hn as createScale,
|
|
2087
|
+
$r as createSnapshot,
|
|
2088
|
+
xn as createStackedChart,
|
|
2089
|
+
zn as createTheme,
|
|
2090
|
+
ci as createThemeEditor,
|
|
2091
|
+
wi as createWebSocketStream,
|
|
2092
|
+
ka as crossCorrelation,
|
|
2093
|
+
As as cumsum,
|
|
2094
|
+
ts as cumulativeIntegral,
|
|
2095
|
+
Nn as decodeFloat32Array,
|
|
2096
|
+
Un as decompressString,
|
|
2282
2097
|
Di as defineAndRegister,
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2098
|
+
G as definePlugin,
|
|
2099
|
+
Ss as dema,
|
|
2100
|
+
rs as derivative,
|
|
2101
|
+
ua as destroyDownsamplePool,
|
|
2287
2102
|
Pn as destroyIndicatorPool,
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2103
|
+
Ba as detectAnomalies,
|
|
2104
|
+
Vi as detectCycles,
|
|
2105
|
+
wn as detectIndicatorMarkers,
|
|
2106
|
+
$i as detectPeaks,
|
|
2107
|
+
_a as dominantFrequency,
|
|
2108
|
+
da as downsampleAsync,
|
|
2109
|
+
Hi as downsampleLTTB,
|
|
2110
|
+
qn as easings,
|
|
2111
|
+
Ts as ema,
|
|
2112
|
+
An as emaAsync,
|
|
2113
|
+
Uo as enableDebugMode,
|
|
2299
2114
|
Kn as encodeFloat32Array,
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2115
|
+
kr as evaluateRendererCompare,
|
|
2116
|
+
Ya as exponentialMovingAverage,
|
|
2117
|
+
Xa as fft,
|
|
2118
|
+
Wa as fftFromComplexInput,
|
|
2119
|
+
ln as formatBusinessDayTick,
|
|
2120
|
+
Oo as formatData,
|
|
2121
|
+
zi as formatScientific,
|
|
2122
|
+
Ni as formatValue,
|
|
2123
|
+
Ui as formatWithPrefix,
|
|
2124
|
+
Ga as gaussianSmooth,
|
|
2125
|
+
Gr as generateCVData,
|
|
2126
|
+
Oa as generateContours,
|
|
2127
|
+
qi as generateCycleColors,
|
|
2128
|
+
Or as generateNyquistData,
|
|
2314
2129
|
Wr as generateRandomData,
|
|
2315
2130
|
Yr as generateSawtoothWave,
|
|
2316
2131
|
Br as generateSineWave,
|
|
@@ -2318,95 +2133,95 @@ export {
|
|
|
2318
2133
|
Xr as generateTriangleWave,
|
|
2319
2134
|
Ir as getBaseline,
|
|
2320
2135
|
Ki as getBestPrefix,
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2136
|
+
jn as getChartInitQueue,
|
|
2137
|
+
Vo as getClipboardManager,
|
|
2138
|
+
fa as getDownsamplePoolSize,
|
|
2139
|
+
Fo as getGlobalLocale,
|
|
2140
|
+
Do as getLocale,
|
|
2141
|
+
Ei as getPluginRegistry,
|
|
2142
|
+
Va as getPositiveFrequencies,
|
|
2143
|
+
ui as getPresetNames,
|
|
2144
|
+
di as getPresetTheme,
|
|
2145
|
+
Jn as getSharedAnimationEngine,
|
|
2146
|
+
Qn as getThemeByName,
|
|
2332
2147
|
Wi as getTooltipThemeForChartTheme,
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2148
|
+
$a as hammingWindow,
|
|
2149
|
+
Ha as hanningWindow,
|
|
2150
|
+
za as highPassFilter,
|
|
2151
|
+
Na as ifft,
|
|
2152
|
+
Ua as ifftComplex,
|
|
2153
|
+
qa as ifftFromArrays,
|
|
2154
|
+
ns as integrate,
|
|
2155
|
+
Ae as interleaveData,
|
|
2156
|
+
cn as isBusinessDay,
|
|
2157
|
+
se as isBusinessDayScaleActive,
|
|
2158
|
+
Ka as joinSegments,
|
|
2344
2159
|
ai as linkCharts,
|
|
2345
|
-
|
|
2160
|
+
Ri as listPluginsByCategory,
|
|
2346
2161
|
Ii as loadPlugin,
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2162
|
+
ja as lowPassFilter,
|
|
2163
|
+
ha as lowerBoundX,
|
|
2164
|
+
ga as lttbDownsample,
|
|
2165
|
+
Cs as macd,
|
|
2166
|
+
Sn as macdAsync,
|
|
2167
|
+
un as mapToBusinessDayScale,
|
|
2168
|
+
Ja as medianFilter,
|
|
2169
|
+
Zn as mergeAnimationConfig,
|
|
2170
|
+
ea as mergeLayoutOptions,
|
|
2171
|
+
pa as minMaxDownsample,
|
|
2172
|
+
Ms as momentum,
|
|
2173
|
+
ji as movingAverage,
|
|
2174
|
+
Qa as nextPowerOf2,
|
|
2175
|
+
wa as nextTaskId,
|
|
2176
|
+
Fs as normalize,
|
|
2362
2177
|
Ds as obv,
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2178
|
+
ma as ohlcDownsampleAsync,
|
|
2179
|
+
ya as ohlcMinMaxDownsample,
|
|
2180
|
+
U as parseColor,
|
|
2181
|
+
ys as parseColorToRGBA,
|
|
2182
|
+
_o as parseShortcut,
|
|
2183
|
+
Es as percentChange,
|
|
2184
|
+
Za as powerSpectrum,
|
|
2185
|
+
ta as queueChartInit,
|
|
2186
|
+
Eo as registerLocale,
|
|
2187
|
+
Li as registerPlugin,
|
|
2188
|
+
ra as resetChartQueue,
|
|
2189
|
+
Rs as roc,
|
|
2375
2190
|
Is as rsi,
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2191
|
+
Tn as rsiAsync,
|
|
2192
|
+
eo as savitzkyGolay,
|
|
2193
|
+
Ro as setGlobalLocale,
|
|
2194
|
+
Qo as showLoading,
|
|
2195
|
+
Zo as showProgress,
|
|
2196
|
+
to as simpsonsIntegration,
|
|
2197
|
+
ro as singleFrequencyFilter,
|
|
2198
|
+
va as sliceSeriesToViewport,
|
|
2199
|
+
Ls as sma,
|
|
2200
|
+
Cn as smaAsync,
|
|
2386
2201
|
as as solveLinearSystem,
|
|
2387
|
-
|
|
2388
|
-
|
|
2202
|
+
ks as standardDeviation,
|
|
2203
|
+
na as stateToUrlHash,
|
|
2389
2204
|
Bs as stochastic,
|
|
2390
|
-
|
|
2391
|
-
|
|
2205
|
+
Ji as subtractBaseline,
|
|
2206
|
+
no as tTest,
|
|
2392
2207
|
_s as tema,
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2208
|
+
ao as trapezoidalIntegration,
|
|
2209
|
+
ba as upperBoundX,
|
|
2210
|
+
aa as urlHashToState,
|
|
2211
|
+
uo as useChartGroup,
|
|
2212
|
+
fo as useChartSync,
|
|
2213
|
+
ho as useIndicator,
|
|
2214
|
+
go as useSciChart,
|
|
2215
|
+
po as useSciPlot,
|
|
2216
|
+
mo as useStackedPlot,
|
|
2217
|
+
yo as useVeloPlot,
|
|
2218
|
+
oa as validateChartState,
|
|
2219
|
+
Qi as validateData,
|
|
2220
|
+
ki as validateManifest,
|
|
2406
2221
|
Ys as vwap,
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2222
|
+
Ur as waitFor,
|
|
2223
|
+
ia as waitForAnimations,
|
|
2224
|
+
Nr as waitForFrames,
|
|
2410
2225
|
Xs as wma
|
|
2411
2226
|
};
|
|
2412
2227
|
//# sourceMappingURL=velo-plot.full.js.map
|