@tradecanvas/chart 1.68.1 → 1.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/Chart.d.ts +20 -97
- package/dist/Chart.d.ts.map +1 -1
- package/dist/DataManager.d.ts +7 -0
- package/dist/DataManager.d.ts.map +1 -1
- package/dist/HistoryPager.d.ts.map +1 -1
- package/dist/{LayoutSession-EEUFJm3J.js → LayoutSession-Bcy79w0l.js} +1082 -873
- package/dist/LayoutSession-Bcy79w0l.js.map +1 -0
- package/dist/LayoutSession-D7S6GZgJ.cjs +2 -0
- package/dist/LayoutSession-D7S6GZgJ.cjs.map +1 -0
- package/dist/SeriesStore.d.ts +2 -0
- package/dist/SeriesStore.d.ts.map +1 -1
- package/dist/grid/ChartGrid.d.ts +5 -5
- package/dist/grid/ChartGrid.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -69
- package/dist/index.js.map +1 -1
- package/dist/model/DisplaySeries.d.ts +50 -0
- package/dist/model/DisplaySeries.d.ts.map +1 -0
- package/dist/model/DrawingPanes.d.ts +24 -0
- package/dist/model/DrawingPanes.d.ts.map +1 -0
- package/dist/model/IndicatorHistory.d.ts +52 -0
- package/dist/model/IndicatorHistory.d.ts.map +1 -0
- package/dist/model/IndicatorPanes.d.ts +76 -0
- package/dist/model/IndicatorPanes.d.ts.map +1 -0
- package/dist/model/IndicatorSetup.d.ts +34 -0
- package/dist/model/IndicatorSetup.d.ts.map +1 -0
- package/dist/model/PaneLayout.d.ts +55 -0
- package/dist/model/PaneLayout.d.ts.map +1 -0
- package/dist/model/PriceFit.d.ts +75 -0
- package/dist/model/PriceFit.d.ts.map +1 -0
- package/dist/model/SymbolRequests.d.ts +34 -0
- package/dist/model/SymbolRequests.d.ts.map +1 -0
- package/dist/widget/ChartWidget.d.ts +1 -1
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/ChartWidgetGrid.d.ts +2 -2
- package/dist/widget/ChartWidgetGrid.d.ts.map +1 -1
- package/dist/widget/index.cjs +22 -22
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +1774 -1761
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/types.d.ts +8 -1
- package/dist/widget/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/LayoutSession-DQLEWUw6.cjs +0 -2
- package/dist/LayoutSession-DQLEWUw6.cjs.map +0 -1
- package/dist/LayoutSession-EEUFJm3J.js.map +0 -1
- package/dist/PaneManager.d.ts +0 -19
- package/dist/PaneManager.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, c, g as l, h as u, i as ee, l as te, m as ne, n as re, o as ie, p as ae, r as oe, s as se, t as ce, u as le, v as ue, w as de, x as fe, y as pe } from "./LayoutSession-
|
|
1
|
+
import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, c, g as l, h as u, i as ee, l as te, m as ne, n as re, o as ie, p as ae, r as oe, s as se, t as ce, u as le, v as ue, w as de, x as fe, y as pe } from "./LayoutSession-Bcy79w0l.js";
|
|
2
2
|
import { CHART_STYLE_KEYS as me, DARK_PRICE_LIMITS as he, DARK_TERMINAL as ge, DARK_THEME as _e, DARK_THEME as ve, DEFAULT_DRAWING_STYLE as ye, DEFAULT_FONT_FAMILY as be, DEFAULT_RECONNECT as xe, DEFAULT_SIGNAL_STYLE as Se, DEFAULT_STREAM_CONFIG as Ce, DEFAULT_TIMEFRAME_FAVORITES as we, DEFAULT_TRADE_ZONE_STYLE as Te, DEFAULT_TRADING_CONFIG as Ee, HNX_SESSIONS as d, HOSE_SESSIONS as f, KRX_SESSIONS as p, KR_COLORS as m, LIGHT_PRICE_LIMITS as h, LIGHT_THEME as g, LIGHT_THEME as _, MARKET_CRYPTO as v, MARKET_HNX as y, MARKET_HOSE as b, MARKET_HOSE_ETF as x, MARKET_KRX as S, MARKET_NXT as C, MARKET_NYSE as w, MARKET_UPBIT_KRW as T, MARKET_UPCOM as E, MARKET_VN30F as D, MS_TIME_THRESHOLD as De, NXT_SESSIONS as Oe, PRICE_SOURCES as ke, SANS_FONT_FAMILY as Ae, TC_PALETTE as je, TC_SERIES_COLORS as Me, TIMEFRAMES_CRYPTO as Ne, TIMEFRAMES_FOREX as Pe, TIMEFRAMES_STOCK as Fe, UPCOM_SESSIONS as Ie, VN30F_SESSIONS as Le, VN_COLORS as Re, VOLUME_ALPHA as ze, barTimeUnit as Be, barsAreDaily as Ve, computePriceLimits as He, contrastRatio as Ue, createMarketTheme as We, createVNTheme as Ge, formatFraction as Ke, formatNumber as qe, formatVND as Je, formatVolumeLoc as Ye, fractionTick as Xe, getCurrentSession as Ze, getLocale as Qe, indicatorSource as $e, inkOn as et, isPriceSource as tt, isTimeFrame as nt, isValidTimeZone as rt, marketStatus as it, normalizeBar as at, normalizeBarTime as ot, offsetAt as st, parseIndicatorSource as ct, parseTimeframe as lt, pickBaseTimeframe as ut, priceFormatterFor as dt, priceStepAt as ft, rankSymbols as pt, readNews as mt, readQuote as ht, readableOn as gt, registerLocale as _t, resampleBars as vt, roundToPriceStep as yt, scaleMarketPrices as bt, setLocale as xt, sourcePrice as St, stepDecimals as Ct, symbolTimeZone as wt, t as Tt, tickBarCount as Et, timeframeBucketStart as Dt, timeframeBucketStart as Ot, timeframeToMs as kt, usesKoreanUnits as At, vn30fContracts as jt, vn30fLastTradingDay as Mt, volumeColor as Nt, wallToUtc as Pt, zoneOffsetMinutes as Ft } from "@tradecanvas/commons";
|
|
3
|
-
import { AlertManager as It, Animator as Lt, BarCountdown as Rt, BaseFinanceChart as O, BinanceAdapter as zt, BybitAdapter as Bt, CANDLE_PATTERNS as Vt, ChartLegend as Ht, ChartStateManager as Ut, CoinbaseAdapter as Wt, CompareRenderer as Gt, CrosshairTooltip as Kt, CurrentPriceLine as qt, DEFAULT_LEGEND_CONFIG as Jt, DEFAULT_MAX_WEBGL_CHARTS as Yt, DEFAULT_SESSION_HOURS as Xt, DataExporter as Zt, DrawingBase as Qt, Easing as $t, FinanceCrosshair as k, GROUP_HEADER as en, INDICATOR_CATEGORIES as tn, IndicatorBase as nn, IndicatorValueMap as rn, KEPT_BUCKETS as an, KeyboardHandler as on, KrakenAdapter as sn, MAX_ALERT_BARS as cn, MIN_ALERT_BARS as ln,
|
|
3
|
+
import { AlertManager as It, Animator as Lt, BarCountdown as Rt, BaseFinanceChart as O, BinanceAdapter as zt, BybitAdapter as Bt, CANDLE_PATTERNS as Vt, ChartLegend as Ht, ChartStateManager as Ut, CoinbaseAdapter as Wt, CompareRenderer as Gt, CrosshairTooltip as Kt, CurrentPriceLine as qt, DEFAULT_LEGEND_CONFIG as Jt, DEFAULT_MAX_WEBGL_CHARTS as Yt, DEFAULT_SESSION_HOURS as Xt, DataExporter as Zt, DrawingBase as Qt, Easing as $t, FinanceCrosshair as k, GROUP_HEADER as en, INDICATOR_CATEGORIES as tn, IndicatorBase as nn, IndicatorValueMap as rn, KEPT_BUCKETS as an, KeyboardHandler as on, KrakenAdapter as sn, MAX_ALERT_BARS as cn, MIN_ALERT_BARS as ln, ManualFeed as un, MockAdapter as dn, PaperExecutionAdapter as fn, PollingAdapter as pn, RANGE_PRESETS as mn, ReconnectManager as hn, ReplayController as gn, ReplayManager as _n, ResamplingAdapter as vn, ReshapeMemo as yn, Screenshot as bn, SessionBreaks as xn, SessionShading as Sn, SignalMarkerManager as A, StreamManager as Cn, TickAggregator as wn, TickBarAdapter as Tn, TickBarBuilder as En, TradeZoneManager as Dn, UndoRedoManager as On, UpbitAdapter as kn, VolumeRenderer as An, Watermark as jn, WebSocketAdapter as Mn, adapterFromFeed as Nn, axisTimes as Pn, barIndexToTime as Fn, barIndexToX as In, barIndexToX as j, canvasMeasure as Ln, computeBarLayout as Rn, computeCalendarLayout as zn, computeCounterClockLayout as Bn, computeDonutLayout as Vn, computeHistogramLayout as Hn, computeMatrixLayout as Un, computeScatterLayout as Wn, correlationMatrix as Gn, counterClockPhase as Kn, counterClockPhase as qn, counterClockPoints as Jn, counterClockPoints as Yn, detectCandlePatterns as Xn, feedFromAdapter as Zn, formatTooltipTime as Qn, histogramBins as $n, hitBar as M, hitDay as N, hitMatrixCell as P, hitSlice as F, indicatorCategory as er, isDataFeed as tr, isDataFeed as nr, isPriceLevelAlert as rr, layoutGroupedTreemap as ir, layoutSquarifiedTreemap as ar, layoutUniformGrid as or, lttbDownsample as sr, lttbVisibleIndices as cr, nearestCounterClockPoint as I, nearestPoint as L, niceScale as lr, priceToY as ur, priceToYMapper as dr, priceToYMapper as fr, rangePresetStart as pr, renderBarChart as mr, renderCalendar as hr, renderCounterClock as gr, renderDepthChart as _r, renderDonut as vr, renderEquityCurve as yr, renderGauge as br, renderHeatmap as xr, renderHistogram as Sr, renderMatrix as Cr, renderScatter as wr, renderSparkline as Tr, renderWaterfall as Er, servesTimeframe as Dr, setMaxWebGLCharts as Or, shownCount as kr, timeToX as Ar, timestampToBarIndex as jr, timestampToBarIndex as Mr, toHeikinAshi as Nr, toKagi as Pr, toLineBreak as Fr, toPointAndFigure as Ir, toRangeBars as Lr, toRenko as Rr, withResampling as zr, withTickBars as Br, xToBarIndex as Vr, xToBarIndex as R, xToTime as Hr, yToPrice as Ur, yToPrice as Wr } from "@tradecanvas/core";
|
|
4
4
|
//#region src/frameworks/syncIndicators.ts
|
|
5
|
-
function
|
|
5
|
+
function Gr(e) {
|
|
6
6
|
let { id: t, params: n = {}, position: r = null } = typeof e == "string" ? { id: e } : e;
|
|
7
7
|
return JSON.stringify([
|
|
8
8
|
t,
|
|
@@ -10,9 +10,9 @@ function Br(e) {
|
|
|
10
10
|
r
|
|
11
11
|
]);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Kr(e, t, n) {
|
|
14
14
|
let r = /* @__PURE__ */ new Map(), i = t.map((e) => {
|
|
15
|
-
let t =
|
|
15
|
+
let t = Gr(e), n = r.get(t) ?? 0;
|
|
16
16
|
return r.set(t, n + 1), {
|
|
17
17
|
spec: e,
|
|
18
18
|
key: `${t}#${n}`
|
|
@@ -27,7 +27,7 @@ function Vr(e, t, n) {
|
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/frameworks/feedBars.ts
|
|
30
|
-
var
|
|
30
|
+
var qr = 3, z = (e) => ({
|
|
31
31
|
time: e.time,
|
|
32
32
|
open: e.open,
|
|
33
33
|
high: e.high,
|
|
@@ -35,16 +35,16 @@ var Hr = 3, z = (e) => ({
|
|
|
35
35
|
close: e.close,
|
|
36
36
|
volume: e.volume
|
|
37
37
|
}), B = (e) => e.length > 0 ? e[e.length - 1] : null;
|
|
38
|
-
function
|
|
38
|
+
function Jr(e, n, r) {
|
|
39
39
|
for (let i = 0; i < r; i++) if (!t(e[i], n[i])) return !1;
|
|
40
40
|
return !0;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Yr(e, t) {
|
|
43
43
|
if (e.isReplayActive()) return !0;
|
|
44
44
|
let n = B(e.getData());
|
|
45
45
|
return t.inReplay ? n?.time === t.last?.time : n === t.shownBar ? n?.time === t.last?.time || !e.isExtendedHoursVisible() : !1;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Xr(e, r, i) {
|
|
48
48
|
let a = [];
|
|
49
49
|
for (let o = 0; o < r.length; o++) {
|
|
50
50
|
let s = e[i + o];
|
|
@@ -55,16 +55,16 @@ function Gr(e, r, i) {
|
|
|
55
55
|
}
|
|
56
56
|
return a;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Zr(e, t) {
|
|
59
59
|
if (t.length === 0) return !0;
|
|
60
60
|
if (!e.updateBar) return !1;
|
|
61
61
|
for (let n of t) if (!e.updateBar(n)) return !1;
|
|
62
62
|
return !0;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Qr(e) {
|
|
65
65
|
return e.slice(Math.max(1, e.length - 1 - 3), -1).map(z);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function $r(e, t) {
|
|
68
68
|
let r = [];
|
|
69
69
|
for (let i = t; i < e.length; i++) {
|
|
70
70
|
if (!n(e[i]) || !(e[i].time > e[i - 1].time)) return null;
|
|
@@ -72,42 +72,42 @@ function Jr(e, t) {
|
|
|
72
72
|
}
|
|
73
73
|
return r;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function ei(e, r, i) {
|
|
76
76
|
let a = i.length;
|
|
77
|
-
if (a === 0 || !i.last || !n(i.last) || r.length < a || !
|
|
77
|
+
if (a === 0 || !i.last || !n(i.last) || r.length < a || !Yr(e, i)) return !1;
|
|
78
78
|
let o = i.recent ?? [], s = a - 1 - o.length;
|
|
79
|
-
if (r !== i.source && (i.source.length !== a || !
|
|
79
|
+
if (r !== i.source && (i.source.length !== a || !Jr(i.source, r, s))) return !1;
|
|
80
80
|
let c = r[a - 1];
|
|
81
81
|
if (c.time !== i.last.time || !n(c)) return !1;
|
|
82
|
-
let l =
|
|
83
|
-
return !l || !u || !
|
|
82
|
+
let l = Xr(r, o, s), u = $r(r, a);
|
|
83
|
+
return !l || !u || !Zr(e, l) ? !1 : (t(c, i.last) || e.updateLastBar(z(c)), u.length === 1 ? e.appendBar(u[0]) : u.length > 1 && e.appendBars(u), !0);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
(!n || !
|
|
85
|
+
function ti(e, t, n) {
|
|
86
|
+
(!n || !ei(e, t, n)) && e.setData(t.map(z));
|
|
87
87
|
let r = t.length > 0 ? z(t[t.length - 1]) : null, i = e.isReplayActive();
|
|
88
88
|
return {
|
|
89
89
|
source: t,
|
|
90
90
|
length: t.length,
|
|
91
91
|
last: r,
|
|
92
|
-
recent:
|
|
92
|
+
recent: Qr(t),
|
|
93
93
|
shownBar: i ? null : B(e.getData()),
|
|
94
94
|
inReplay: i
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/plugins/overlayScale.ts
|
|
99
|
-
function
|
|
100
|
-
let { viewport: t, data: n } = e, r =
|
|
99
|
+
function ni(e) {
|
|
100
|
+
let { viewport: t, data: n } = e, r = fr(t), i = n.length - 1, a = Math.max(0, Math.floor(t.visibleRange.from)), o = Math.min(i, Math.ceil(t.visibleRange.to)), s = (e) => n.length > 0 ? Mr(e, n) : e;
|
|
101
101
|
return {
|
|
102
102
|
timeToX: (e) => j(s(e), t),
|
|
103
103
|
xToTime: (e) => {
|
|
104
104
|
let r = R(e, t);
|
|
105
|
-
return n.length > 0 ?
|
|
105
|
+
return n.length > 0 ? Fn(r, n) : r;
|
|
106
106
|
},
|
|
107
107
|
indexToX: (e) => j(e, t),
|
|
108
108
|
xToIndex: (e) => R(e, t),
|
|
109
109
|
priceToY: r,
|
|
110
|
-
yToPrice: (e) =>
|
|
110
|
+
yToPrice: (e) => Wr(e, t),
|
|
111
111
|
barWidth: t.barWidth,
|
|
112
112
|
visible: o < a ? {
|
|
113
113
|
from: 0,
|
|
@@ -153,7 +153,7 @@ var V = {
|
|
|
153
153
|
cols: 2,
|
|
154
154
|
rows: 3
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, ri = class {
|
|
157
157
|
root;
|
|
158
158
|
cells = [];
|
|
159
159
|
layout;
|
|
@@ -243,7 +243,7 @@ var V = {
|
|
|
243
243
|
async connectAll(e, t, n, r = 500) {
|
|
244
244
|
let i = [];
|
|
245
245
|
for (let a = 0; a < this.cells.length && a < t.length; a++) i.push(this.connectCell(a, {
|
|
246
|
-
|
|
246
|
+
...typeof e == "function" ? { adapter: e(t[a], a) } : nr(e) ? { feed: e } : { adapter: e },
|
|
247
247
|
symbol: t[a],
|
|
248
248
|
timeframe: n,
|
|
249
249
|
historyLimit: r
|
|
@@ -260,13 +260,13 @@ var V = {
|
|
|
260
260
|
this.cells = [], this.root.remove();
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
},
|
|
263
|
+
}, ii = class extends O {
|
|
264
264
|
options;
|
|
265
265
|
constructor(e, t) {
|
|
266
266
|
super(e, t.theme), this.options = t, this.requestRender();
|
|
267
267
|
}
|
|
268
268
|
renderChart(e, t, n, r) {
|
|
269
|
-
|
|
269
|
+
Tr(e, t, n, this.options, r);
|
|
270
270
|
}
|
|
271
271
|
update(e) {
|
|
272
272
|
this.options = {
|
|
@@ -280,7 +280,7 @@ var V = {
|
|
|
280
280
|
...e
|
|
281
281
|
}, this.requestRender();
|
|
282
282
|
}
|
|
283
|
-
},
|
|
283
|
+
}, ai = class extends O {
|
|
284
284
|
options;
|
|
285
285
|
crosshair = null;
|
|
286
286
|
constructor(e, t) {
|
|
@@ -288,7 +288,7 @@ var V = {
|
|
|
288
288
|
}
|
|
289
289
|
renderChart(e, t, n, r) {
|
|
290
290
|
let i = this.crosshair?.getPosition() ?? null;
|
|
291
|
-
|
|
291
|
+
_r(e, t, n, this.options, r, i);
|
|
292
292
|
}
|
|
293
293
|
update(e) {
|
|
294
294
|
this.options = {
|
|
@@ -313,7 +313,7 @@ var V = {
|
|
|
313
313
|
}
|
|
314
314
|
renderChart(e, t, n, r) {
|
|
315
315
|
let i = this.crosshair?.getPosition() ?? null;
|
|
316
|
-
|
|
316
|
+
yr(e, t, n, this.options, r, i);
|
|
317
317
|
}
|
|
318
318
|
update(e, t) {
|
|
319
319
|
this.options = {
|
|
@@ -360,7 +360,7 @@ var V = {
|
|
|
360
360
|
height: this.height
|
|
361
361
|
}, t = this.options.cellPadding ?? 2;
|
|
362
362
|
if (this.lastLayoutWidth = this.width, this.lastLayoutHeight = this.height, this.cachedGroups = [], this.options.grouped) {
|
|
363
|
-
let { groups: n, cells: r } =
|
|
363
|
+
let { groups: n, cells: r } = ir(this.currentData.map((e) => ({
|
|
364
364
|
id: e.id,
|
|
365
365
|
weight: e.weight ?? (Math.abs(e.value) || 1),
|
|
366
366
|
group: e.group,
|
|
@@ -372,8 +372,8 @@ var V = {
|
|
|
372
372
|
id: e.id,
|
|
373
373
|
weight: e.weight ?? (Math.abs(e.value) || 1)
|
|
374
374
|
}));
|
|
375
|
-
this.cachedRects =
|
|
376
|
-
} else this.cachedRects =
|
|
375
|
+
this.cachedRects = ar(n, e, t);
|
|
376
|
+
} else this.cachedRects = or(this.currentData.map((e) => ({ id: e.id })), e, t);
|
|
377
377
|
}
|
|
378
378
|
onCanvasClick(e, t) {
|
|
379
379
|
if (this.options.onCellClick) for (let n of this.cachedRects) {
|
|
@@ -388,7 +388,7 @@ var V = {
|
|
|
388
388
|
renderChart(e, t, n, r) {
|
|
389
389
|
(t !== this.lastLayoutWidth || n !== this.lastLayoutHeight) && this.recomputeLayout();
|
|
390
390
|
let i = this.crosshair?.getPosition() ?? null;
|
|
391
|
-
|
|
391
|
+
xr(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
|
|
392
392
|
}
|
|
393
393
|
update(e) {
|
|
394
394
|
this.currentData = e, this.options = {
|
|
@@ -405,7 +405,7 @@ var V = {
|
|
|
405
405
|
destroy() {
|
|
406
406
|
this.crosshair?.destroy(), this.handleClick && this.canvas.removeEventListener("click", this.handleClick), super.destroy();
|
|
407
407
|
}
|
|
408
|
-
},
|
|
408
|
+
}, oi = class extends O {
|
|
409
409
|
options;
|
|
410
410
|
crosshair = null;
|
|
411
411
|
constructor(e, t) {
|
|
@@ -413,7 +413,7 @@ var V = {
|
|
|
413
413
|
}
|
|
414
414
|
renderChart(e, t, n, r) {
|
|
415
415
|
let i = this.crosshair?.getPosition() ?? null;
|
|
416
|
-
|
|
416
|
+
Er(e, t, n, this.options, r, i);
|
|
417
417
|
}
|
|
418
418
|
update(e) {
|
|
419
419
|
this.options = {
|
|
@@ -430,12 +430,12 @@ var V = {
|
|
|
430
430
|
destroy() {
|
|
431
431
|
this.crosshair?.destroy(), super.destroy();
|
|
432
432
|
}
|
|
433
|
-
},
|
|
434
|
-
function
|
|
433
|
+
}, si = 500;
|
|
434
|
+
function ci(e) {
|
|
435
435
|
let t = 1 - e;
|
|
436
436
|
return 1 - t * t * t;
|
|
437
437
|
}
|
|
438
|
-
var
|
|
438
|
+
var li = class extends O {
|
|
439
439
|
options;
|
|
440
440
|
currentValue;
|
|
441
441
|
targetValue;
|
|
@@ -446,7 +446,7 @@ var ii = class extends O {
|
|
|
446
446
|
super(e, t.theme), this.options = t, this.currentValue = t.value, this.targetValue = t.value, this.requestRender();
|
|
447
447
|
}
|
|
448
448
|
renderChart(e, t, n, r) {
|
|
449
|
-
|
|
449
|
+
br(e, t, n, this.options, r, this.currentValue);
|
|
450
450
|
}
|
|
451
451
|
setValue(e) {
|
|
452
452
|
if (this.options.animate === !1) {
|
|
@@ -476,7 +476,7 @@ var ii = class extends O {
|
|
|
476
476
|
if (this.animationFrameId !== null) return;
|
|
477
477
|
let e = () => {
|
|
478
478
|
if (this.animationFrameId = null, this.animationStart === null) return;
|
|
479
|
-
let t = this.options.animationDuration ??
|
|
479
|
+
let t = this.options.animationDuration ?? si, n = performance.now() - this.animationStart, r = Math.min(1, n / Math.max(1, t)), i = ci(r);
|
|
480
480
|
this.currentValue = this.animationFrom + (this.targetValue - this.animationFrom) * i, this.requestRender(), r < 1 ? this.animationFrameId = requestAnimationFrame(e) : (this.currentValue = this.targetValue, this.animationStart = null);
|
|
481
481
|
};
|
|
482
482
|
this.animationFrameId = requestAnimationFrame(e);
|
|
@@ -506,7 +506,7 @@ var ii = class extends O {
|
|
|
506
506
|
}
|
|
507
507
|
renderChart(e, t, n, r) {
|
|
508
508
|
let i = this.options.crosshair === !1 ? null : this.crosshair.getPosition(), a = this.layoutFor;
|
|
509
|
-
(!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r,
|
|
509
|
+
(!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r, Ln(e, r)), this.layoutFor = {
|
|
510
510
|
options: this.options,
|
|
511
511
|
width: t,
|
|
512
512
|
height: n,
|
|
@@ -525,12 +525,12 @@ var ii = class extends O {
|
|
|
525
525
|
destroy() {
|
|
526
526
|
this.crosshair.destroy(), this.canvas.removeEventListener("click", this.onClick), this.canvas.removeEventListener("pointermove", this.onMove), super.destroy();
|
|
527
527
|
}
|
|
528
|
-
},
|
|
528
|
+
}, ui = class extends W {
|
|
529
529
|
compute(e, t, n, r) {
|
|
530
|
-
return
|
|
530
|
+
return Rn(this.options, e, t, n, r);
|
|
531
531
|
}
|
|
532
532
|
draw(e, t, n, r, i, a) {
|
|
533
|
-
|
|
533
|
+
mr(e, t, n, this.options, r, i, a);
|
|
534
534
|
}
|
|
535
535
|
describe() {
|
|
536
536
|
return `Bar chart of ${this.options.series.map((e) => e.name).join(", ")}, ${this.options.categories.length} categories`;
|
|
@@ -556,12 +556,12 @@ var ii = class extends O {
|
|
|
556
556
|
series: t
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
-
},
|
|
559
|
+
}, di = class extends W {
|
|
560
560
|
compute(e, t, n, r) {
|
|
561
|
-
return
|
|
561
|
+
return Vn(this.options, e, t, n, r);
|
|
562
562
|
}
|
|
563
563
|
draw(e, t, n, r, i, a) {
|
|
564
|
-
|
|
564
|
+
vr(e, t, n, this.options, r, i, a);
|
|
565
565
|
}
|
|
566
566
|
describe() {
|
|
567
567
|
let e = this.options.data.filter((e) => Number.isFinite(e.value) && e.value > 0).map((e) => e.label).join(", ");
|
|
@@ -580,12 +580,12 @@ var ii = class extends O {
|
|
|
580
580
|
update(e) {
|
|
581
581
|
this.setOptions({ data: e });
|
|
582
582
|
}
|
|
583
|
-
},
|
|
583
|
+
}, fi = class extends W {
|
|
584
584
|
compute(e, t, n, r) {
|
|
585
|
-
return
|
|
585
|
+
return Wn(this.options, e, t, n, r);
|
|
586
586
|
}
|
|
587
587
|
draw(e, t, n, r, i, a) {
|
|
588
|
-
|
|
588
|
+
wr(e, t, n, this.options, r, i, a);
|
|
589
589
|
}
|
|
590
590
|
describe() {
|
|
591
591
|
let e = this.options.series.reduce((e, t) => e + t.points.length, 0);
|
|
@@ -604,12 +604,12 @@ var ii = class extends O {
|
|
|
604
604
|
update(e) {
|
|
605
605
|
this.setOptions({ series: e });
|
|
606
606
|
}
|
|
607
|
-
},
|
|
607
|
+
}, pi = class extends W {
|
|
608
608
|
compute(e, t, n, r) {
|
|
609
|
-
return
|
|
609
|
+
return Hn(this.options, e, t, n, r);
|
|
610
610
|
}
|
|
611
611
|
draw(e, t, n, r, i, a) {
|
|
612
|
-
|
|
612
|
+
Sr(e, t, n, this.options, r, i, a);
|
|
613
613
|
}
|
|
614
614
|
describe() {
|
|
615
615
|
return `Histogram of ${this.options.values.length} values`;
|
|
@@ -624,12 +624,12 @@ var ii = class extends O {
|
|
|
624
624
|
update(e) {
|
|
625
625
|
this.setOptions({ values: e });
|
|
626
626
|
}
|
|
627
|
-
},
|
|
627
|
+
}, mi = class extends W {
|
|
628
628
|
compute(e, t, n, r) {
|
|
629
|
-
return
|
|
629
|
+
return zn(this.options, e, t, n, r);
|
|
630
630
|
}
|
|
631
631
|
draw(e, t, n, r, i, a) {
|
|
632
|
-
|
|
632
|
+
hr(e, t, n, this.options, r, i, a);
|
|
633
633
|
}
|
|
634
634
|
describe() {
|
|
635
635
|
let e = this.options.data.map((e) => e.date).filter((e) => /^\d{4}-\d{2}-\d{2}$/.test(e)).sort(), t = this.options.from ?? e[0], n = this.options.to ?? e[e.length - 1];
|
|
@@ -648,12 +648,12 @@ var ii = class extends O {
|
|
|
648
648
|
update(e) {
|
|
649
649
|
this.setOptions({ data: e });
|
|
650
650
|
}
|
|
651
|
-
}, G = 12,
|
|
651
|
+
}, G = 12, hi = class extends W {
|
|
652
652
|
compute(e, t, n, r) {
|
|
653
|
-
return
|
|
653
|
+
return Un(this.options, e, t, n, r);
|
|
654
654
|
}
|
|
655
655
|
draw(e, t, n, r, i, a) {
|
|
656
|
-
|
|
656
|
+
Cr(e, t, n, this.options, r, i, a);
|
|
657
657
|
}
|
|
658
658
|
describe() {
|
|
659
659
|
let { rows: e, columns: t } = this.options;
|
|
@@ -672,12 +672,12 @@ var ii = class extends O {
|
|
|
672
672
|
update(e) {
|
|
673
673
|
this.setOptions({ values: e });
|
|
674
674
|
}
|
|
675
|
-
},
|
|
675
|
+
}, gi = class extends W {
|
|
676
676
|
compute(e, t, n, r) {
|
|
677
|
-
return
|
|
677
|
+
return Bn(this.options, e, t, n, r);
|
|
678
678
|
}
|
|
679
679
|
draw(e, t, n, r, i, a) {
|
|
680
|
-
|
|
680
|
+
gr(e, t, n, this.options, r, i, a);
|
|
681
681
|
}
|
|
682
682
|
describe() {
|
|
683
683
|
return `Counter-clock chart of price against volume, ${this.options.period ?? 25}-bar averages`;
|
|
@@ -693,12 +693,12 @@ var ii = class extends O {
|
|
|
693
693
|
r && this.options.onPointClick?.(r.point);
|
|
694
694
|
}
|
|
695
695
|
getPhase() {
|
|
696
|
-
return
|
|
696
|
+
return qn(Yn(this.options.data, this.options.period ?? 25, kr(this.options)));
|
|
697
697
|
}
|
|
698
698
|
update(e) {
|
|
699
699
|
this.setOptions({ data: e });
|
|
700
700
|
}
|
|
701
|
-
},
|
|
701
|
+
}, _i = [
|
|
702
702
|
"Jan",
|
|
703
703
|
"Feb",
|
|
704
704
|
"Mar",
|
|
@@ -746,7 +746,7 @@ function J(e) {
|
|
|
746
746
|
let a = new Date(e.key), o = a.getUTCFullYear(), s = a.getUTCMonth();
|
|
747
747
|
r.push({
|
|
748
748
|
id: `${o}-${String(s + 1).padStart(2, "0")}`,
|
|
749
|
-
label:
|
|
749
|
+
label: _i[s],
|
|
750
750
|
group: String(o),
|
|
751
751
|
value: i
|
|
752
752
|
});
|
|
@@ -809,7 +809,7 @@ function Q(e) {
|
|
|
809
809
|
function $(e) {
|
|
810
810
|
return !e || e === "dark" ? ve : e === "light" ? _ : e;
|
|
811
811
|
}
|
|
812
|
-
var
|
|
812
|
+
var vi = class {
|
|
813
813
|
options;
|
|
814
814
|
theme;
|
|
815
815
|
root;
|
|
@@ -958,6 +958,6 @@ var pi = class {
|
|
|
958
958
|
}
|
|
959
959
|
};
|
|
960
960
|
//#endregion
|
|
961
|
-
export { It as AlertManager, Lt as Animator,
|
|
961
|
+
export { It as AlertManager, Lt as Animator, ui as BarChart, Rt as BarCountdown, zt as BinanceAdapter, Bt as BybitAdapter, Vt as CANDLE_PATTERNS, me as CHART_STYLE_KEYS, qr as CORRECTABLE_BARS, mi as CalendarChart, c as Chart, ri as ChartGrid, Ht as ChartLegend, Ut as ChartStateManager, Wt as CoinbaseAdapter, Gt as CompareRenderer, gi as CounterClockChart, Kt as CrosshairTooltip, qt as CurrentPriceLine, he as DARK_PRICE_LIMITS, ge as DARK_TERMINAL, _e as DARK_THEME, ye as DEFAULT_DRAWING_STYLE, be as DEFAULT_FONT_FAMILY, e as DEFAULT_HISTORY_PAGE_SIZE, Jt as DEFAULT_LEGEND_CONFIG, Yt as DEFAULT_MAX_WEBGL_CHARTS, xe as DEFAULT_RECONNECT, Xt as DEFAULT_SESSION_HOURS, Se as DEFAULT_SIGNAL_STYLE, Ce as DEFAULT_STREAM_CONFIG, we as DEFAULT_TIMEFRAME_FAVORITES, Te as DEFAULT_TRADE_ZONE_STYLE, Ee as DEFAULT_TRADING_CONFIG, Zt as DataExporter, i as DataManager, ai as DepthChart, di as DonutChart, ie as DragDropImporter, Qt as DrawingBase, te as EXCHANGE_TIMEZONE, le as EXCHANGE_TIME_ZONE, $t as Easing, H as EquityCurveChart, li as GaugeChart, de as HISTORY_RETRY_MS, d as HNX_SESSIONS, f as HOSE_SESSIONS, U as HeatmapChart, pi as HistogramChart, tn as INDICATOR_CATEGORIES, nn as IndicatorBase, rn as IndicatorValueMap, an as KEPT_BUCKETS, p as KRX_SESSIONS, m as KR_COLORS, on as KeyboardHandler, sn as KrakenAdapter, h as LIGHT_PRICE_LIMITS, g as LIGHT_THEME, fe as LayoutManager, ce as LayoutSession, v as MARKET_CRYPTO, y as MARKET_HNX, b as MARKET_HOSE, x as MARKET_HOSE_ETF, S as MARKET_KRX, C as MARKET_NXT, w as MARKET_NYSE, T as MARKET_UPBIT_KRW, E as MARKET_UPCOM, D as MARKET_VN30F, cn as MAX_ALERT_BARS, re as MAX_LAYOUT_NAME, ln as MIN_ALERT_BARS, De as MS_TIME_THRESHOLD, un as ManualFeed, hi as MatrixChart, dn as MockAdapter, Oe as NXT_SESSIONS, ue as PLUGIN_API_VERSION, ke as PRICE_SOURCES, fn as PaperExecutionAdapter, vi as PerformanceDashboard, ae as PluginManager, pn as PollingAdapter, mn as RANGE_PRESETS, hn as ReconnectManager, gn as ReplayController, _n as ReplayManager, vn as ResamplingAdapter, yn as ReshapeMemo, Ae as SANS_FONT_FAMILY, fi as ScatterChart, bn as Screenshot, xn as SessionBreaks, Sn as SessionShading, A as SignalMarkerManager, ii as SparklineChart, Cn as StreamManager, je as TC_PALETTE, Me as TC_SERIES_COLORS, Ne as TIMEFRAMES_CRYPTO, Pe as TIMEFRAMES_FOREX, Fe as TIMEFRAMES_STOCK, r as ThemeManager, wn as TickAggregator, Tn as TickBarAdapter, En as TickBarBuilder, Dn as TradeZoneManager, Ie as UPCOM_SESSIONS, On as UndoRedoManager, kn as UpbitAdapter, Le as VN30F_SESSIONS, Re as VN_COLORS, ze as VOLUME_ALPHA, An as VolumeRenderer, oi as WaterfallChart, jn as Watermark, Mn as WebSocketAdapter, Nn as adapterFromFeed, Pn as axisTimes, In as barIndexToX, Be as barTimeUnit, Ve as barsAreDaily, oe as cleanLayoutName, ne as clearGlobalPlugins, q as computeDrawdownCurve, J as computeMonthlyReturns, He as computePriceLimits, Ue as contrastRatio, Gn as correlationMatrix, Kn as counterClockPhase, Jn as counterClockPoints, We as createMarketTheme, Ge as createVNTheme, Xn as detectCandlePatterns, ti as feedBars, Zn as feedFromAdapter, Ke as formatFraction, qe as formatNumber, Qn as formatTooltipTime, Je as formatVND, Ye as formatVolumeLoc, Xe as fractionTick, Ze as getCurrentSession, u as getGlobalPlugins, Qe as getLocale, $n as histogramBins, er as indicatorCategory, $e as indicatorSource, et as inkOn, tr as isDataFeed, rr as isPriceLevelAlert, tt as isPriceSource, nt as isTimeFrame, rt as isValidTimeZone, ee as localStorageLayouts, sr as lttbDownsample, cr as lttbVisibleIndices, it as marketStatus, o as memoryLayouts, lr as niceScale, at as normalizeBar, ot as normalizeBarTime, st as offsetAt, ni as overlayScale, pe as overlaysForLayer, ct as parseIndicatorSource, se as parseOHLCV, lt as parseTimeframe, ut as pickBaseTimeframe, s as pluginKey, dt as priceFormatterFor, ft as priceStepAt, ur as priceToY, dr as priceToYMapper, pr as rangePresetStart, pt as rankSymbols, mt as readNews, ht as readQuote, gt as readableOn, _t as registerLocale, l as registerPlugin, vt as resampleBars, yt as roundToPriceStep, bt as scaleMarketPrices, Q as selectKeyStats, Dr as servesTimeframe, xt as setLocale, Or as setMaxWebGLCharts, St as sourcePrice, Ct as stepDecimals, wt as symbolTimeZone, Kr as syncIndicators, Tt as t, Et as tickBarCount, Ar as timeToX, Dt as timeframeBucketStart, kt as timeframeToMs, jr as timestampToBarIndex, K as toEquityPoints, Nr as toHeikinAshi, Pr as toKagi, Fr as toLineBreak, Ir as toPointAndFigure, Lr as toRangeBars, Rr as toRenko, a as unregisterPlugin, At as usesKoreanUnits, jt as vn30fContracts, Mt as vn30fLastTradingDay, Nt as volumeColor, Pt as wallToUtc, zr as withResampling, Br as withTickBars, Vr as xToBarIndex, Hr as xToTime, Ur as yToPrice, Ft as zoneOffsetMinutes };
|
|
962
962
|
|
|
963
963
|
//# sourceMappingURL=index.js.map
|