zengeld-canvas 0.1.6 → 0.1.9
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 +49 -23
- package/package.json +1 -1
- package/zengeld_canvas_wasm.d.ts +1068 -1
- package/zengeld_canvas_wasm.js +2587 -67
- package/zengeld_canvas_wasm_bg.wasm +0 -0
package/zengeld_canvas_wasm.js
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
+
function addToExternrefTable0(obj) {
|
|
4
|
+
const idx = wasm.__externref_table_alloc();
|
|
5
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
6
|
+
return idx;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
10
|
+
ptr = ptr >>> 0;
|
|
11
|
+
const mem = getDataViewMemory0();
|
|
12
|
+
const result = [];
|
|
13
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
14
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
15
|
+
}
|
|
16
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let cachedDataViewMemory0 = null;
|
|
21
|
+
function getDataViewMemory0() {
|
|
22
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
23
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
24
|
+
}
|
|
25
|
+
return cachedDataViewMemory0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
29
|
+
function getFloat64ArrayMemory0() {
|
|
30
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
31
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
32
|
+
}
|
|
33
|
+
return cachedFloat64ArrayMemory0;
|
|
34
|
+
}
|
|
35
|
+
|
|
3
36
|
function getStringFromWasm0(ptr, len) {
|
|
4
37
|
ptr = ptr >>> 0;
|
|
5
38
|
return decodeText(ptr, len);
|
|
@@ -13,6 +46,64 @@ function getUint8ArrayMemory0() {
|
|
|
13
46
|
return cachedUint8ArrayMemory0;
|
|
14
47
|
}
|
|
15
48
|
|
|
49
|
+
function isLikeNone(x) {
|
|
50
|
+
return x === undefined || x === null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
54
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
55
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
56
|
+
WASM_VECTOR_LEN = arg.length;
|
|
57
|
+
return ptr;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
61
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
62
|
+
for (let i = 0; i < array.length; i++) {
|
|
63
|
+
const add = addToExternrefTable0(array[i]);
|
|
64
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
65
|
+
}
|
|
66
|
+
WASM_VECTOR_LEN = array.length;
|
|
67
|
+
return ptr;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
71
|
+
if (realloc === undefined) {
|
|
72
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
73
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
74
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
75
|
+
WASM_VECTOR_LEN = buf.length;
|
|
76
|
+
return ptr;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let len = arg.length;
|
|
80
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
81
|
+
|
|
82
|
+
const mem = getUint8ArrayMemory0();
|
|
83
|
+
|
|
84
|
+
let offset = 0;
|
|
85
|
+
|
|
86
|
+
for (; offset < len; offset++) {
|
|
87
|
+
const code = arg.charCodeAt(offset);
|
|
88
|
+
if (code > 0x7F) break;
|
|
89
|
+
mem[ptr + offset] = code;
|
|
90
|
+
}
|
|
91
|
+
if (offset !== len) {
|
|
92
|
+
if (offset !== 0) {
|
|
93
|
+
arg = arg.slice(offset);
|
|
94
|
+
}
|
|
95
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
96
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
97
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
98
|
+
|
|
99
|
+
offset += ret.written;
|
|
100
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
WASM_VECTOR_LEN = offset;
|
|
104
|
+
return ptr;
|
|
105
|
+
}
|
|
106
|
+
|
|
16
107
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
17
108
|
cachedTextDecoder.decode();
|
|
18
109
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
@@ -27,6 +118,25 @@ function decodeText(ptr, len) {
|
|
|
27
118
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
28
119
|
}
|
|
29
120
|
|
|
121
|
+
const cachedTextEncoder = new TextEncoder();
|
|
122
|
+
|
|
123
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
124
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
125
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
126
|
+
view.set(buf);
|
|
127
|
+
return {
|
|
128
|
+
read: arg.length,
|
|
129
|
+
written: buf.length
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let WASM_VECTOR_LEN = 0;
|
|
135
|
+
|
|
136
|
+
const ChartFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
137
|
+
? { register: () => {}, unregister: () => {} }
|
|
138
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_chart_free(ptr >>> 0, 1));
|
|
139
|
+
|
|
30
140
|
const JsBarFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
31
141
|
? { register: () => {}, unregister: () => {} }
|
|
32
142
|
: new FinalizationRegistry(ptr => wasm.__wbg_jsbar_free(ptr >>> 0, 1));
|
|
@@ -35,119 +145,2221 @@ const JsChartConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
35
145
|
? { register: () => {}, unregister: () => {} }
|
|
36
146
|
: new FinalizationRegistry(ptr => wasm.__wbg_jschartconfig_free(ptr >>> 0, 1));
|
|
37
147
|
|
|
148
|
+
const JsRuntimeThemeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
149
|
+
? { register: () => {}, unregister: () => {} }
|
|
150
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jsruntimetheme_free(ptr >>> 0, 1));
|
|
151
|
+
|
|
38
152
|
const JsThemeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
39
153
|
? { register: () => {}, unregister: () => {} }
|
|
40
154
|
: new FinalizationRegistry(ptr => wasm.__wbg_jstheme_free(ptr >>> 0, 1));
|
|
41
155
|
|
|
156
|
+
const JsUIThemeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
157
|
+
? { register: () => {}, unregister: () => {} }
|
|
158
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jsuitheme_free(ptr >>> 0, 1));
|
|
159
|
+
|
|
42
160
|
const JsViewportFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
43
161
|
? { register: () => {}, unregister: () => {} }
|
|
44
162
|
: new FinalizationRegistry(ptr => wasm.__wbg_jsviewport_free(ptr >>> 0, 1));
|
|
45
163
|
|
|
46
164
|
/**
|
|
47
|
-
*
|
|
165
|
+
* High-level chart builder for creating financial charts.
|
|
48
166
|
*/
|
|
49
|
-
export class
|
|
167
|
+
export class Chart {
|
|
50
168
|
__destroy_into_raw() {
|
|
51
169
|
const ptr = this.__wbg_ptr;
|
|
52
170
|
this.__wbg_ptr = 0;
|
|
53
|
-
|
|
171
|
+
ChartFinalization.unregister(this);
|
|
54
172
|
return ptr;
|
|
55
173
|
}
|
|
56
174
|
free() {
|
|
57
175
|
const ptr = this.__destroy_into_raw();
|
|
58
|
-
wasm.
|
|
176
|
+
wasm.__wbg_chart_free(ptr, 0);
|
|
59
177
|
}
|
|
60
178
|
/**
|
|
61
|
-
*
|
|
179
|
+
* Arrow down
|
|
180
|
+
* @param {number} x
|
|
181
|
+
* @param {number} y
|
|
62
182
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return ret !== 0;
|
|
183
|
+
arrowDown(x, y) {
|
|
184
|
+
wasm.chart_arrowDown(this.__wbg_ptr, x, y);
|
|
66
185
|
}
|
|
67
186
|
/**
|
|
68
|
-
*
|
|
187
|
+
* Arrow line
|
|
188
|
+
* @param {number} x1
|
|
189
|
+
* @param {number} y1
|
|
190
|
+
* @param {number} x2
|
|
191
|
+
* @param {number} y2
|
|
69
192
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return ret;
|
|
193
|
+
arrowLine(x1, y1, x2, y2) {
|
|
194
|
+
wasm.chart_arrowLine(this.__wbg_ptr, x1, y1, x2, y2);
|
|
73
195
|
}
|
|
74
196
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @param {number}
|
|
77
|
-
* @param {number}
|
|
78
|
-
* @param {
|
|
79
|
-
* @param {number} close
|
|
80
|
-
* @param {number} volume
|
|
197
|
+
* Buy signal
|
|
198
|
+
* @param {number} bar_index
|
|
199
|
+
* @param {number} price
|
|
200
|
+
* @param {string | null} [label]
|
|
81
201
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return this;
|
|
202
|
+
buySignal(bar_index, price, label) {
|
|
203
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
204
|
+
var len0 = WASM_VECTOR_LEN;
|
|
205
|
+
wasm.chart_buySignal(this.__wbg_ptr, bar_index, price, ptr0, len0);
|
|
87
206
|
}
|
|
88
207
|
/**
|
|
89
|
-
*
|
|
208
|
+
* Choppiness Index
|
|
209
|
+
* @param {number} period
|
|
90
210
|
*/
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return ret;
|
|
211
|
+
choppiness(period) {
|
|
212
|
+
wasm.chart_choppiness(this.__wbg_ptr, period);
|
|
94
213
|
}
|
|
95
214
|
/**
|
|
96
|
-
*
|
|
215
|
+
* Cross line at position
|
|
216
|
+
* @param {number} x
|
|
217
|
+
* @param {number} y
|
|
97
218
|
*/
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return ret;
|
|
219
|
+
crossLine(x, y) {
|
|
220
|
+
wasm.chart_crossLine(this.__wbg_ptr, x, y);
|
|
101
221
|
}
|
|
102
222
|
/**
|
|
103
|
-
*
|
|
223
|
+
* Apply dark theme
|
|
104
224
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return ret;
|
|
225
|
+
darkTheme() {
|
|
226
|
+
wasm.chart_darkTheme(this.__wbg_ptr);
|
|
108
227
|
}
|
|
109
228
|
/**
|
|
110
|
-
*
|
|
229
|
+
* Date range
|
|
230
|
+
* @param {number} x1
|
|
231
|
+
* @param {number} y1
|
|
232
|
+
* @param {number} x2
|
|
233
|
+
* @param {number} y2
|
|
111
234
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return ret;
|
|
235
|
+
dateRange(x1, y1, x2, y2) {
|
|
236
|
+
wasm.chart_dateRange(this.__wbg_ptr, x1, y1, x2, y2);
|
|
115
237
|
}
|
|
116
238
|
/**
|
|
117
|
-
*
|
|
239
|
+
* Fibonacci spiral
|
|
240
|
+
* @param {number} x1
|
|
241
|
+
* @param {number} y1
|
|
242
|
+
* @param {number} x2
|
|
243
|
+
* @param {number} y2
|
|
118
244
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return ret;
|
|
245
|
+
fibSpiral(x1, y1, x2, y2) {
|
|
246
|
+
wasm.chart_fibSpiral(this.__wbg_ptr, x1, y1, x2, y2);
|
|
122
247
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*/
|
|
129
|
-
export class JsChartConfig {
|
|
130
|
-
__destroy_into_raw() {
|
|
131
|
-
const ptr = this.__wbg_ptr;
|
|
132
|
-
this.__wbg_ptr = 0;
|
|
133
|
-
JsChartConfigFinalization.unregister(this);
|
|
134
|
-
return ptr;
|
|
248
|
+
/**
|
|
249
|
+
* Mass Index
|
|
250
|
+
*/
|
|
251
|
+
massIndex() {
|
|
252
|
+
wasm.chart_massIndex(this.__wbg_ptr);
|
|
135
253
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Price note
|
|
256
|
+
* @param {number} x
|
|
257
|
+
* @param {number} y
|
|
258
|
+
* @param {string} content
|
|
259
|
+
*/
|
|
260
|
+
priceNote(x, y, content) {
|
|
261
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
262
|
+
const len0 = WASM_VECTOR_LEN;
|
|
263
|
+
wasm.chart_priceNote(this.__wbg_ptr, x, y, ptr0, len0);
|
|
139
264
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
265
|
+
/**
|
|
266
|
+
* Projection
|
|
267
|
+
* @param {number} x1
|
|
268
|
+
* @param {number} y1
|
|
269
|
+
* @param {number} x2
|
|
270
|
+
* @param {number} y2
|
|
271
|
+
*/
|
|
272
|
+
projection(x1, y1, x2, y2) {
|
|
273
|
+
wasm.chart_projection(this.__wbg_ptr, x1, y1, x2, y2);
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Render chart to SVG string
|
|
277
|
+
* @returns {string}
|
|
278
|
+
*/
|
|
279
|
+
renderSvg() {
|
|
280
|
+
let deferred1_0;
|
|
281
|
+
let deferred1_1;
|
|
282
|
+
try {
|
|
283
|
+
const ret = wasm.chart_renderSvg(this.__wbg_ptr);
|
|
284
|
+
deferred1_0 = ret[0];
|
|
285
|
+
deferred1_1 = ret[1];
|
|
286
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
287
|
+
} finally {
|
|
288
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Set up/down colors
|
|
293
|
+
* @param {string} up
|
|
294
|
+
* @param {string} down
|
|
295
|
+
*/
|
|
296
|
+
setColors(up, down) {
|
|
297
|
+
const ptr0 = passStringToWasm0(up, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
298
|
+
const len0 = WASM_VECTOR_LEN;
|
|
299
|
+
const ptr1 = passStringToWasm0(down, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
300
|
+
const len1 = WASM_VECTOR_LEN;
|
|
301
|
+
wasm.chart_setColors(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Stochastic Oscillator
|
|
305
|
+
* @param {number} k
|
|
306
|
+
* @param {number} d
|
|
307
|
+
*/
|
|
308
|
+
stochastic(k, d) {
|
|
309
|
+
wasm.chart_stochastic(this.__wbg_ptr, k, d);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Supertrend
|
|
313
|
+
* @param {number} period
|
|
314
|
+
* @param {number} multiplier
|
|
315
|
+
*/
|
|
316
|
+
supertrend(period, multiplier) {
|
|
317
|
+
wasm.chart_supertrend(this.__wbg_ptr, period, multiplier);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Trend line between two points
|
|
321
|
+
* @param {number} start_x
|
|
322
|
+
* @param {number} start_y
|
|
323
|
+
* @param {number} end_x
|
|
324
|
+
* @param {number} end_y
|
|
325
|
+
*/
|
|
326
|
+
trendLine(start_x, start_y, end_x, end_y) {
|
|
327
|
+
wasm.chart_trendLine(this.__wbg_ptr, start_x, start_y, end_x, end_y);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Williams %R
|
|
331
|
+
* @param {number} period
|
|
332
|
+
*/
|
|
333
|
+
williamsR(period) {
|
|
334
|
+
wasm.chart_williamsR(this.__wbg_ptr, period);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Custom overlay with pre-calculated values
|
|
338
|
+
* @param {string} name
|
|
339
|
+
* @param {Float64Array} values
|
|
340
|
+
* @param {string} color
|
|
341
|
+
*/
|
|
342
|
+
addOverlay(name, values, color) {
|
|
343
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
344
|
+
const len0 = WASM_VECTOR_LEN;
|
|
345
|
+
const ptr1 = passArrayF64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
346
|
+
const len1 = WASM_VECTOR_LEN;
|
|
347
|
+
const ptr2 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
348
|
+
const len2 = WASM_VECTOR_LEN;
|
|
349
|
+
wasm.chart_addOverlay(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Connors RSI
|
|
353
|
+
*/
|
|
354
|
+
connorsRsi() {
|
|
355
|
+
wasm.chart_connorsRsi(this.__wbg_ptr);
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Cycle lines
|
|
359
|
+
* @param {number} x1
|
|
360
|
+
* @param {number} y1
|
|
361
|
+
* @param {number} x2
|
|
362
|
+
* @param {number} y2
|
|
363
|
+
*/
|
|
364
|
+
cycleLines(x1, y1, x2, y2) {
|
|
365
|
+
wasm.chart_cycleLines(this.__wbg_ptr, x1, y1, x2, y2);
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Exit signal
|
|
369
|
+
* @param {number} bar_index
|
|
370
|
+
* @param {number} price
|
|
371
|
+
* @param {string | null} [label]
|
|
372
|
+
*/
|
|
373
|
+
exitSignal(bar_index, price, label) {
|
|
374
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
375
|
+
var len0 = WASM_VECTOR_LEN;
|
|
376
|
+
wasm.chart_exitSignal(this.__wbg_ptr, bar_index, price, ptr0, len0);
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Fibonacci channel
|
|
380
|
+
* @param {number} x1
|
|
381
|
+
* @param {number} y1
|
|
382
|
+
* @param {number} x2
|
|
383
|
+
* @param {number} y2
|
|
384
|
+
* @param {number} x3
|
|
385
|
+
* @param {number} y3
|
|
386
|
+
*/
|
|
387
|
+
fibChannel(x1, y1, x2, y2, x3, y3) {
|
|
388
|
+
wasm.chart_fibChannel(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Fibonacci circles
|
|
392
|
+
* @param {number} x1
|
|
393
|
+
* @param {number} y1
|
|
394
|
+
* @param {number} x2
|
|
395
|
+
* @param {number} y2
|
|
396
|
+
*/
|
|
397
|
+
fibCircles(x1, y1, x2, y2) {
|
|
398
|
+
wasm.chart_fibCircles(this.__wbg_ptr, x1, y1, x2, y2);
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Force Index
|
|
402
|
+
* @param {number} period
|
|
403
|
+
*/
|
|
404
|
+
forceIndex(period) {
|
|
405
|
+
wasm.chart_forceIndex(this.__wbg_ptr, period);
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Gann Square
|
|
409
|
+
* @param {number} x1
|
|
410
|
+
* @param {number} y1
|
|
411
|
+
* @param {number} x2
|
|
412
|
+
* @param {number} y2
|
|
413
|
+
*/
|
|
414
|
+
gannSquare(x1, y1, x2, y2) {
|
|
415
|
+
wasm.chart_gannSquare(this.__wbg_ptr, x1, y1, x2, y2);
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Highlighter
|
|
419
|
+
* @param {Float64Array} points
|
|
420
|
+
*/
|
|
421
|
+
highlighter(points) {
|
|
422
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
423
|
+
const len0 = WASM_VECTOR_LEN;
|
|
424
|
+
wasm.chart_highlighter(this.__wbg_ptr, ptr0, len0);
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Apply light theme
|
|
428
|
+
*/
|
|
429
|
+
lightTheme() {
|
|
430
|
+
wasm.chart_lightTheme(this.__wbg_ptr);
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Price label
|
|
434
|
+
* @param {number} x
|
|
435
|
+
* @param {number} y
|
|
436
|
+
*/
|
|
437
|
+
priceLabel(x, y) {
|
|
438
|
+
wasm.chart_priceLabel(this.__wbg_ptr, x, y);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Price range
|
|
442
|
+
* @param {number} x1
|
|
443
|
+
* @param {number} y1
|
|
444
|
+
* @param {number} x2
|
|
445
|
+
* @param {number} y2
|
|
446
|
+
*/
|
|
447
|
+
priceRange(x1, y1, x2, y2) {
|
|
448
|
+
wasm.chart_priceRange(this.__wbg_ptr, x1, y1, x2, y2);
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Sell signal
|
|
452
|
+
* @param {number} bar_index
|
|
453
|
+
* @param {number} price
|
|
454
|
+
* @param {string | null} [label]
|
|
455
|
+
*/
|
|
456
|
+
sellSignal(bar_index, price, label) {
|
|
457
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
458
|
+
var len0 = WASM_VECTOR_LEN;
|
|
459
|
+
wasm.chart_sellSignal(this.__wbg_ptr, bar_index, price, ptr0, len0);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* SMI Ergodic
|
|
463
|
+
*/
|
|
464
|
+
smiErgodic() {
|
|
465
|
+
wasm.chart_smiErgodic(this.__wbg_ptr);
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Time cycles
|
|
469
|
+
* @param {number} x1
|
|
470
|
+
* @param {number} y1
|
|
471
|
+
* @param {number} x2
|
|
472
|
+
* @param {number} y2
|
|
473
|
+
*/
|
|
474
|
+
timeCycles(x1, y1, x2, y2) {
|
|
475
|
+
wasm.chart_timeCycles(this.__wbg_ptr, x1, y1, x2, y2);
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Trend angle
|
|
479
|
+
* @param {number} x1
|
|
480
|
+
* @param {number} y1
|
|
481
|
+
* @param {number} x2
|
|
482
|
+
* @param {number} y2
|
|
483
|
+
*/
|
|
484
|
+
trendAngle(x1, y1, x2, y2) {
|
|
485
|
+
wasm.chart_trendAngle(this.__wbg_ptr, x1, y1, x2, y2);
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Ulcer Index
|
|
489
|
+
* @param {number} period
|
|
490
|
+
*/
|
|
491
|
+
ulcerIndex(period) {
|
|
492
|
+
wasm.chart_ulcerIndex(this.__wbg_ptr, period);
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* ABCD Pattern
|
|
496
|
+
* @param {Float64Array} points
|
|
497
|
+
*/
|
|
498
|
+
abcdPattern(points) {
|
|
499
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
500
|
+
const len0 = WASM_VECTOR_LEN;
|
|
501
|
+
wasm.chart_abcdPattern(this.__wbg_ptr, ptr0, len0);
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Arrow marker
|
|
505
|
+
* @param {number} x1
|
|
506
|
+
* @param {number} y1
|
|
507
|
+
* @param {number} x2
|
|
508
|
+
* @param {number} y2
|
|
509
|
+
*/
|
|
510
|
+
arrowMarker(x1, y1, x2, y2) {
|
|
511
|
+
wasm.chart_arrowMarker(this.__wbg_ptr, x1, y1, x2, y2);
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Bars pattern
|
|
515
|
+
* @param {number} x1
|
|
516
|
+
* @param {number} y1
|
|
517
|
+
* @param {number} x2
|
|
518
|
+
* @param {number} y2
|
|
519
|
+
*/
|
|
520
|
+
barsPattern(x1, y1, x2, y2) {
|
|
521
|
+
wasm.chart_barsPattern(this.__wbg_ptr, x1, y1, x2, y2);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Candlestick chart (default)
|
|
525
|
+
*/
|
|
526
|
+
candlesticks() {
|
|
527
|
+
wasm.chart_candlesticks(this.__wbg_ptr);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Double curve
|
|
531
|
+
* @param {Float64Array} points
|
|
532
|
+
*/
|
|
533
|
+
doubleCurve(points) {
|
|
534
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
535
|
+
const len0 = WASM_VECTOR_LEN;
|
|
536
|
+
wasm.chart_doubleCurve(this.__wbg_ptr, ptr0, len0);
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Entry signal
|
|
540
|
+
* @param {number} bar_index
|
|
541
|
+
* @param {number} price
|
|
542
|
+
* @param {string | null} [label]
|
|
543
|
+
*/
|
|
544
|
+
entrySignal(bar_index, price, label) {
|
|
545
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
546
|
+
var len0 = WASM_VECTOR_LEN;
|
|
547
|
+
wasm.chart_entrySignal(this.__wbg_ptr, bar_index, price, ptr0, len0);
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* MACD with default settings (12, 26, 9)
|
|
551
|
+
*/
|
|
552
|
+
macdDefault() {
|
|
553
|
+
wasm.chart_macdDefault(this.__wbg_ptr);
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Pivot Points
|
|
557
|
+
*/
|
|
558
|
+
pivotPoints() {
|
|
559
|
+
wasm.chart_pivotPoints(this.__wbg_ptr);
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Three Drives
|
|
563
|
+
* @param {Float64Array} points
|
|
564
|
+
*/
|
|
565
|
+
threeDrives(points) {
|
|
566
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
567
|
+
const len0 = WASM_VECTOR_LEN;
|
|
568
|
+
wasm.chart_threeDrives(this.__wbg_ptr, ptr0, len0);
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Anchored text
|
|
572
|
+
* @param {number} x1
|
|
573
|
+
* @param {number} y1
|
|
574
|
+
* @param {number} x2
|
|
575
|
+
* @param {number} y2
|
|
576
|
+
* @param {string} content
|
|
577
|
+
*/
|
|
578
|
+
anchoredText(x1, y1, x2, y2, content) {
|
|
579
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
580
|
+
const len0 = WASM_VECTOR_LEN;
|
|
581
|
+
wasm.chart_anchoredText(this.__wbg_ptr, x1, y1, x2, y2, ptr0, len0);
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Anchored VWAP
|
|
585
|
+
* @param {number} x
|
|
586
|
+
* @param {number} y
|
|
587
|
+
*/
|
|
588
|
+
anchoredVwap(x, y) {
|
|
589
|
+
wasm.chart_anchoredVwap(this.__wbg_ptr, x, y);
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Coppock Curve
|
|
593
|
+
*/
|
|
594
|
+
coppockCurve() {
|
|
595
|
+
wasm.chart_coppockCurve(this.__wbg_ptr);
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Custom signal
|
|
599
|
+
* @param {number} bar_index
|
|
600
|
+
* @param {number} price
|
|
601
|
+
* @param {string} label
|
|
602
|
+
*/
|
|
603
|
+
customSignal(bar_index, price, label) {
|
|
604
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
605
|
+
const len0 = WASM_VECTOR_LEN;
|
|
606
|
+
wasm.chart_customSignal(this.__wbg_ptr, bar_index, price, ptr0, len0);
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Extended line (infinite in both directions)
|
|
610
|
+
* @param {number} x1
|
|
611
|
+
* @param {number} y1
|
|
612
|
+
* @param {number} x2
|
|
613
|
+
* @param {number} y2
|
|
614
|
+
*/
|
|
615
|
+
extendedLine(x1, y1, x2, y2) {
|
|
616
|
+
wasm.chart_extendedLine(this.__wbg_ptr, x1, y1, x2, y2);
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Fibonacci extension
|
|
620
|
+
* @param {number} x1
|
|
621
|
+
* @param {number} y1
|
|
622
|
+
* @param {number} x2
|
|
623
|
+
* @param {number} y2
|
|
624
|
+
* @param {number} x3
|
|
625
|
+
* @param {number} y3
|
|
626
|
+
*/
|
|
627
|
+
fibExtension(x1, y1, x2, y2, x3, y3) {
|
|
628
|
+
wasm.chart_fibExtension(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Long position
|
|
632
|
+
* @param {number} ex
|
|
633
|
+
* @param {number} ey
|
|
634
|
+
* @param {number} tpx
|
|
635
|
+
* @param {number} tpy
|
|
636
|
+
* @param {number} slx
|
|
637
|
+
* @param {number} sly
|
|
638
|
+
*/
|
|
639
|
+
longPosition(ex, ey, tpx, tpy, slx, sly) {
|
|
640
|
+
wasm.chart_longPosition(this.__wbg_ptr, ex, ey, tpx, tpy, slx, sly);
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Price Channel
|
|
644
|
+
* @param {number} period
|
|
645
|
+
*/
|
|
646
|
+
priceChannel(period) {
|
|
647
|
+
wasm.chart_priceChannel(this.__wbg_ptr, period);
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Vertical line at bar index
|
|
651
|
+
* @param {number} bar_index
|
|
652
|
+
*/
|
|
653
|
+
verticalLine(bar_index) {
|
|
654
|
+
wasm.chart_verticalLine(this.__wbg_ptr, bar_index);
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* XABCD Pattern
|
|
658
|
+
* @param {Float64Array} points
|
|
659
|
+
*/
|
|
660
|
+
xabcdPattern(points) {
|
|
661
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
662
|
+
const len0 = WASM_VECTOR_LEN;
|
|
663
|
+
wasm.chart_xabcdPattern(this.__wbg_ptr, ptr0, len0);
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Cypher Pattern
|
|
667
|
+
* @param {Float64Array} points
|
|
668
|
+
*/
|
|
669
|
+
cypherPattern(points) {
|
|
670
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
671
|
+
const len0 = WASM_VECTOR_LEN;
|
|
672
|
+
wasm.chart_cypherPattern(this.__wbg_ptr, ptr0, len0);
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Fibonacci time zones
|
|
676
|
+
* @param {number} x1
|
|
677
|
+
* @param {number} y1
|
|
678
|
+
* @param {number} x2
|
|
679
|
+
* @param {number} y2
|
|
680
|
+
*/
|
|
681
|
+
fibTimeZones(x1, y1, x2, y2) {
|
|
682
|
+
wasm.chart_fibTimeZones(this.__wbg_ptr, x1, y1, x2, y2);
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Fibonacci trend time
|
|
686
|
+
* @param {number} x1
|
|
687
|
+
* @param {number} y1
|
|
688
|
+
* @param {number} x2
|
|
689
|
+
* @param {number} y2
|
|
690
|
+
* @param {number} x3
|
|
691
|
+
* @param {number} y3
|
|
692
|
+
*/
|
|
693
|
+
fibTrendTime(x1, y1, x2, y2, x3, y3) {
|
|
694
|
+
wasm.chart_fibTrendTime(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Head and Shoulders
|
|
698
|
+
* @param {Float64Array} points
|
|
699
|
+
*/
|
|
700
|
+
headShoulders(points) {
|
|
701
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
702
|
+
const len0 = WASM_VECTOR_LEN;
|
|
703
|
+
wasm.chart_headShoulders(this.__wbg_ptr, ptr0, len0);
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Horizontal ray
|
|
707
|
+
* @param {number} x1
|
|
708
|
+
* @param {number} y1
|
|
709
|
+
* @param {number} x2
|
|
710
|
+
* @param {number} y2
|
|
711
|
+
*/
|
|
712
|
+
horizontalRay(x1, y1, x2, y2) {
|
|
713
|
+
wasm.chart_horizontalRay(this.__wbg_ptr, x1, y1, x2, y2);
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Set background color
|
|
717
|
+
* @param {string} color
|
|
718
|
+
*/
|
|
719
|
+
setBackground(color) {
|
|
720
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
721
|
+
const len0 = WASM_VECTOR_LEN;
|
|
722
|
+
wasm.chart_setBackground(this.__wbg_ptr, ptr0, len0);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Short position
|
|
726
|
+
* @param {number} ex
|
|
727
|
+
* @param {number} ey
|
|
728
|
+
* @param {number} tpx
|
|
729
|
+
* @param {number} tpy
|
|
730
|
+
* @param {number} slx
|
|
731
|
+
* @param {number} sly
|
|
732
|
+
*/
|
|
733
|
+
shortPosition(ex, ey, tpx, tpy, slx, sly) {
|
|
734
|
+
wasm.chart_shortPosition(this.__wbg_ptr, ex, ey, tpx, tpy, slx, sly);
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Elliott Impulse Wave
|
|
738
|
+
* @param {Float64Array} points
|
|
739
|
+
*/
|
|
740
|
+
elliottImpulse(points) {
|
|
741
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
742
|
+
const len0 = WASM_VECTOR_LEN;
|
|
743
|
+
wasm.chart_elliottImpulse(this.__wbg_ptr, ptr0, len0);
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Fibonacci retracement
|
|
747
|
+
* @param {number} x1
|
|
748
|
+
* @param {number} y1
|
|
749
|
+
* @param {number} x2
|
|
750
|
+
* @param {number} y2
|
|
751
|
+
*/
|
|
752
|
+
fibRetracement(x1, y1, x2, y2) {
|
|
753
|
+
wasm.chart_fibRetracement(this.__wbg_ptr, x1, y1, x2, y2);
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Flat top/bottom channel
|
|
757
|
+
* @param {number} x1
|
|
758
|
+
* @param {number} y1
|
|
759
|
+
* @param {number} x2
|
|
760
|
+
* @param {number} y2
|
|
761
|
+
* @param {number} x3
|
|
762
|
+
* @param {number} y3
|
|
763
|
+
*/
|
|
764
|
+
flatTopBottom(x1, y1, x2, y2, x3, y3) {
|
|
765
|
+
wasm.chart_flatTopBottom(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Horizontal line at price level
|
|
769
|
+
* @param {number} price
|
|
770
|
+
*/
|
|
771
|
+
horizontalLine(price) {
|
|
772
|
+
wasm.chart_horizontalLine(this.__wbg_ptr, price);
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Modified Schiff Pitchfork
|
|
776
|
+
* @param {number} x1
|
|
777
|
+
* @param {number} y1
|
|
778
|
+
* @param {number} x2
|
|
779
|
+
* @param {number} y2
|
|
780
|
+
* @param {number} x3
|
|
781
|
+
* @param {number} y3
|
|
782
|
+
*/
|
|
783
|
+
modifiedSchiff(x1, y1, x2, y2, x3, y3) {
|
|
784
|
+
wasm.chart_modifiedSchiff(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Aroon Oscillator
|
|
788
|
+
* @param {number} period
|
|
789
|
+
*/
|
|
790
|
+
aroonOscillator(period) {
|
|
791
|
+
wasm.chart_aroonOscillator(this.__wbg_ptr, period);
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* Balance of Power
|
|
795
|
+
*/
|
|
796
|
+
balanceOfPower() {
|
|
797
|
+
wasm.chart_balanceOfPower(this.__wbg_ptr);
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Bollinger Bands with filled cloud
|
|
801
|
+
* @param {number} period
|
|
802
|
+
*/
|
|
803
|
+
bollingerFilled(period) {
|
|
804
|
+
wasm.chart_bollingerFilled(this.__wbg_ptr, period);
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Disjoint channel
|
|
808
|
+
* @param {Float64Array} points
|
|
809
|
+
*/
|
|
810
|
+
disjointChannel(points) {
|
|
811
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
812
|
+
const len0 = WASM_VECTOR_LEN;
|
|
813
|
+
wasm.chart_disjointChannel(this.__wbg_ptr, ptr0, len0);
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Elliott Triangle
|
|
817
|
+
* @param {Float64Array} points
|
|
818
|
+
*/
|
|
819
|
+
elliottTriangle(points) {
|
|
820
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
821
|
+
const len0 = WASM_VECTOR_LEN;
|
|
822
|
+
wasm.chart_elliottTriangle(this.__wbg_ptr, ptr0, len0);
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* Fisher Transform
|
|
826
|
+
* @param {number} period
|
|
827
|
+
*/
|
|
828
|
+
fisherTransform(period) {
|
|
829
|
+
wasm.chart_fisherTransform(this.__wbg_ptr, period);
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Inside Pitchfork
|
|
833
|
+
* @param {number} x1
|
|
834
|
+
* @param {number} y1
|
|
835
|
+
* @param {number} x2
|
|
836
|
+
* @param {number} y2
|
|
837
|
+
* @param {number} x3
|
|
838
|
+
* @param {number} y3
|
|
839
|
+
*/
|
|
840
|
+
insidePitchfork(x1, y1, x2, y2, x3, y3) {
|
|
841
|
+
wasm.chart_insidePitchfork(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Parallel channel
|
|
845
|
+
* @param {number} x1
|
|
846
|
+
* @param {number} y1
|
|
847
|
+
* @param {number} x2
|
|
848
|
+
* @param {number} y2
|
|
849
|
+
* @param {number} x3
|
|
850
|
+
* @param {number} y3
|
|
851
|
+
*/
|
|
852
|
+
parallelChannel(x1, y1, x2, y2, x3, y3) {
|
|
853
|
+
wasm.chart_parallelChannel(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Price and date range
|
|
857
|
+
* @param {number} x1
|
|
858
|
+
* @param {number} y1
|
|
859
|
+
* @param {number} x2
|
|
860
|
+
* @param {number} y2
|
|
861
|
+
*/
|
|
862
|
+
priceDateRange(x1, y1, x2, y2) {
|
|
863
|
+
wasm.chart_priceDateRange(this.__wbg_ptr, x1, y1, x2, y2);
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* Price projection
|
|
867
|
+
* @param {number} x1
|
|
868
|
+
* @param {number} y1
|
|
869
|
+
* @param {number} x2
|
|
870
|
+
* @param {number} y2
|
|
871
|
+
* @param {number} x3
|
|
872
|
+
* @param {number} y3
|
|
873
|
+
*/
|
|
874
|
+
priceProjection(x1, y1, x2, y2, x3, y3) {
|
|
875
|
+
wasm.chart_priceProjection(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Regression trend channel
|
|
879
|
+
* @param {number} x1
|
|
880
|
+
* @param {number} y1
|
|
881
|
+
* @param {number} x2
|
|
882
|
+
* @param {number} y2
|
|
883
|
+
*/
|
|
884
|
+
regressionTrend(x1, y1, x2, y2) {
|
|
885
|
+
wasm.chart_regressionTrend(this.__wbg_ptr, x1, y1, x2, y2);
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Schiff Pitchfork
|
|
889
|
+
* @param {number} x1
|
|
890
|
+
* @param {number} y1
|
|
891
|
+
* @param {number} x2
|
|
892
|
+
* @param {number} y2
|
|
893
|
+
* @param {number} x3
|
|
894
|
+
* @param {number} y3
|
|
895
|
+
*/
|
|
896
|
+
schiffPitchfork(x1, y1, x2, y2, x3, y3) {
|
|
897
|
+
wasm.chart_schiffPitchfork(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Stop loss signal
|
|
901
|
+
* @param {number} bar_index
|
|
902
|
+
* @param {number} price
|
|
903
|
+
* @param {string | null} [label]
|
|
904
|
+
*/
|
|
905
|
+
stopLossSignal(bar_index, price, label) {
|
|
906
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
907
|
+
var len0 = WASM_VECTOR_LEN;
|
|
908
|
+
wasm.chart_stopLossSignal(this.__wbg_ptr, bar_index, price, ptr0, len0);
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Triangle Pattern
|
|
912
|
+
* @param {number} x1
|
|
913
|
+
* @param {number} y1
|
|
914
|
+
* @param {number} x2
|
|
915
|
+
* @param {number} y2
|
|
916
|
+
* @param {number} x3
|
|
917
|
+
* @param {number} y3
|
|
918
|
+
*/
|
|
919
|
+
trianglePattern(x1, y1, x2, y2, x3, y3) {
|
|
920
|
+
wasm.chart_trianglePattern(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Chande Kroll Stop
|
|
924
|
+
*/
|
|
925
|
+
chandeKrollStop() {
|
|
926
|
+
wasm.chart_chandeKrollStop(this.__wbg_ptr);
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Gann Square Fixed
|
|
930
|
+
* @param {number} x1
|
|
931
|
+
* @param {number} y1
|
|
932
|
+
* @param {number} x2
|
|
933
|
+
* @param {number} y2
|
|
934
|
+
*/
|
|
935
|
+
gannSquareFixed(x1, y1, x2, y2) {
|
|
936
|
+
wasm.chart_gannSquareFixed(this.__wbg_ptr, x1, y1, x2, y2);
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Linear Regression
|
|
940
|
+
* @param {number} period
|
|
941
|
+
* @param {string} color
|
|
942
|
+
*/
|
|
943
|
+
linearRegression(period, color) {
|
|
944
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
945
|
+
const len0 = WASM_VECTOR_LEN;
|
|
946
|
+
wasm.chart_linearRegression(this.__wbg_ptr, period, ptr0, len0);
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Rotated rectangle
|
|
950
|
+
* @param {number} x1
|
|
951
|
+
* @param {number} y1
|
|
952
|
+
* @param {number} x2
|
|
953
|
+
* @param {number} y2
|
|
954
|
+
* @param {number} x3
|
|
955
|
+
* @param {number} y3
|
|
956
|
+
*/
|
|
957
|
+
rotatedRectangle(x1, y1, x2, y2, x3, y3) {
|
|
958
|
+
wasm.chart_rotatedRectangle(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Awesome Oscillator
|
|
962
|
+
*/
|
|
963
|
+
awesomeOscillator() {
|
|
964
|
+
wasm.chart_awesomeOscillator(this.__wbg_ptr);
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
967
|
+
* Chaikin Oscillator
|
|
968
|
+
*/
|
|
969
|
+
chaikinOscillator() {
|
|
970
|
+
wasm.chart_chaikinOscillator(this.__wbg_ptr);
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* Elliott Correction Wave
|
|
974
|
+
* @param {Float64Array} points
|
|
975
|
+
*/
|
|
976
|
+
elliottCorrection(points) {
|
|
977
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
978
|
+
const len0 = WASM_VECTOR_LEN;
|
|
979
|
+
wasm.chart_elliottCorrection(this.__wbg_ptr, ptr0, len0);
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Schaff Trend Cycle
|
|
983
|
+
*/
|
|
984
|
+
schaffTrendCycle() {
|
|
985
|
+
wasm.chart_schaffTrendCycle(this.__wbg_ptr);
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Take profit signal
|
|
989
|
+
* @param {number} bar_index
|
|
990
|
+
* @param {number} price
|
|
991
|
+
* @param {string | null} [label]
|
|
992
|
+
*/
|
|
993
|
+
takeProfitSignal(bar_index, price, label) {
|
|
994
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
995
|
+
var len0 = WASM_VECTOR_LEN;
|
|
996
|
+
wasm.chart_takeProfitSignal(this.__wbg_ptr, bar_index, price, ptr0, len0);
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Ultimate Oscillator
|
|
1000
|
+
*/
|
|
1001
|
+
ultimateOscillator() {
|
|
1002
|
+
wasm.chart_ultimateOscillator(this.__wbg_ptr);
|
|
1003
|
+
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Elliott Double Combo
|
|
1006
|
+
* @param {Float64Array} points
|
|
1007
|
+
*/
|
|
1008
|
+
elliottDoubleCombo(points) {
|
|
1009
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
1010
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1011
|
+
wasm.chart_elliottDoubleCombo(this.__wbg_ptr, ptr0, len0);
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Elliott Triple Combo
|
|
1015
|
+
* @param {Float64Array} points
|
|
1016
|
+
*/
|
|
1017
|
+
elliottTripleCombo(points) {
|
|
1018
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
1019
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1020
|
+
wasm.chart_elliottTripleCombo(this.__wbg_ptr, ptr0, len0);
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Fibonacci speed/resistance
|
|
1024
|
+
* @param {number} x1
|
|
1025
|
+
* @param {number} y1
|
|
1026
|
+
* @param {number} x2
|
|
1027
|
+
* @param {number} y2
|
|
1028
|
+
*/
|
|
1029
|
+
fibSpeedResistance(x1, y1, x2, y2) {
|
|
1030
|
+
wasm.chart_fibSpeedResistance(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Fixed volume profile
|
|
1034
|
+
* @param {number} x1
|
|
1035
|
+
* @param {number} y1
|
|
1036
|
+
* @param {number} x2
|
|
1037
|
+
* @param {number} y2
|
|
1038
|
+
*/
|
|
1039
|
+
fixedVolumeProfile(x1, y1, x2, y2) {
|
|
1040
|
+
wasm.chart_fixedVolumeProfile(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Historical Volatility
|
|
1044
|
+
* @param {number} period
|
|
1045
|
+
*/
|
|
1046
|
+
historicalVolatility(period) {
|
|
1047
|
+
wasm.chart_historicalVolatility(this.__wbg_ptr, period);
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Accelerator Oscillator
|
|
1051
|
+
*/
|
|
1052
|
+
acceleratorOscillator() {
|
|
1053
|
+
wasm.chart_acceleratorOscillator(this.__wbg_ptr);
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Anchored volume profile
|
|
1057
|
+
* @param {number} x1
|
|
1058
|
+
* @param {number} y1
|
|
1059
|
+
* @param {number} x2
|
|
1060
|
+
* @param {number} y2
|
|
1061
|
+
*/
|
|
1062
|
+
anchoredVolumeProfile(x1, y1, x2, y2) {
|
|
1063
|
+
wasm.chart_anchoredVolumeProfile(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Linear Regression Slope
|
|
1067
|
+
* @param {number} period
|
|
1068
|
+
*/
|
|
1069
|
+
linearRegressionSlope(period) {
|
|
1070
|
+
wasm.chart_linearRegressionSlope(this.__wbg_ptr, period);
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Average Directional Index
|
|
1074
|
+
* @param {number} period
|
|
1075
|
+
*/
|
|
1076
|
+
adx(period) {
|
|
1077
|
+
wasm.chart_adx(this.__wbg_ptr, period);
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Arc
|
|
1081
|
+
* @param {number} x1
|
|
1082
|
+
* @param {number} y1
|
|
1083
|
+
* @param {number} x2
|
|
1084
|
+
* @param {number} y2
|
|
1085
|
+
* @param {number} x3
|
|
1086
|
+
* @param {number} y3
|
|
1087
|
+
*/
|
|
1088
|
+
arc(x1, y1, x2, y2, x3, y3) {
|
|
1089
|
+
wasm.chart_arc(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Average True Range
|
|
1093
|
+
* @param {number} period
|
|
1094
|
+
*/
|
|
1095
|
+
atr(period) {
|
|
1096
|
+
wasm.chart_atr(this.__wbg_ptr, period);
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Commodity Channel Index
|
|
1100
|
+
* @param {number} period
|
|
1101
|
+
*/
|
|
1102
|
+
cci(period) {
|
|
1103
|
+
wasm.chart_cci(this.__wbg_ptr, period);
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Chaikin Money Flow
|
|
1107
|
+
* @param {number} period
|
|
1108
|
+
*/
|
|
1109
|
+
cmf(period) {
|
|
1110
|
+
wasm.chart_cmf(this.__wbg_ptr, period);
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Chande Momentum Oscillator
|
|
1114
|
+
* @param {number} period
|
|
1115
|
+
*/
|
|
1116
|
+
cmo(period) {
|
|
1117
|
+
wasm.chart_cmo(this.__wbg_ptr, period);
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* Detrended Price Oscillator
|
|
1121
|
+
* @param {number} period
|
|
1122
|
+
*/
|
|
1123
|
+
dpo(period) {
|
|
1124
|
+
wasm.chart_dpo(this.__wbg_ptr, period);
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* Exponential Moving Average
|
|
1128
|
+
* @param {number} period
|
|
1129
|
+
* @param {string} color
|
|
1130
|
+
*/
|
|
1131
|
+
ema(period, color) {
|
|
1132
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1133
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1134
|
+
wasm.chart_ema(this.__wbg_ptr, period, ptr0, len0);
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Ease of Movement
|
|
1138
|
+
* @param {number} period
|
|
1139
|
+
*/
|
|
1140
|
+
eom(period) {
|
|
1141
|
+
wasm.chart_eom(this.__wbg_ptr, period);
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* Hull Moving Average
|
|
1145
|
+
* @param {number} period
|
|
1146
|
+
* @param {string} color
|
|
1147
|
+
*/
|
|
1148
|
+
hma(period, color) {
|
|
1149
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1150
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1151
|
+
wasm.chart_hma(this.__wbg_ptr, period, ptr0, len0);
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Know Sure Thing
|
|
1155
|
+
*/
|
|
1156
|
+
kst() {
|
|
1157
|
+
wasm.chart_kst(this.__wbg_ptr);
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Money Flow Index
|
|
1161
|
+
* @param {number} period
|
|
1162
|
+
*/
|
|
1163
|
+
mfi(period) {
|
|
1164
|
+
wasm.chart_mfi(this.__wbg_ptr, period);
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Create a new chart with specified dimensions.
|
|
1168
|
+
* @param {number} width
|
|
1169
|
+
* @param {number} height
|
|
1170
|
+
*/
|
|
1171
|
+
constructor(width, height) {
|
|
1172
|
+
const ret = wasm.chart_new(width, height);
|
|
1173
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1174
|
+
ChartFinalization.register(this, this.__wbg_ptr, this);
|
|
1175
|
+
return this;
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Negative Volume Index
|
|
1179
|
+
*/
|
|
1180
|
+
nvi() {
|
|
1181
|
+
wasm.chart_nvi(this.__wbg_ptr);
|
|
1182
|
+
}
|
|
1183
|
+
/**
|
|
1184
|
+
* On Balance Volume
|
|
1185
|
+
*/
|
|
1186
|
+
obv() {
|
|
1187
|
+
wasm.chart_obv(this.__wbg_ptr);
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Pretty Good Oscillator
|
|
1191
|
+
* @param {number} period
|
|
1192
|
+
*/
|
|
1193
|
+
pgo(period) {
|
|
1194
|
+
wasm.chart_pgo(this.__wbg_ptr, period);
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Positive Volume Index
|
|
1198
|
+
*/
|
|
1199
|
+
pvi() {
|
|
1200
|
+
wasm.chart_pvi(this.__wbg_ptr);
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Ray from p1 through p2
|
|
1204
|
+
* @param {number} x1
|
|
1205
|
+
* @param {number} y1
|
|
1206
|
+
* @param {number} x2
|
|
1207
|
+
* @param {number} y2
|
|
1208
|
+
*/
|
|
1209
|
+
ray(x1, y1, x2, y2) {
|
|
1210
|
+
wasm.chart_ray(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Rate of Change
|
|
1214
|
+
* @param {number} period
|
|
1215
|
+
*/
|
|
1216
|
+
roc(period) {
|
|
1217
|
+
wasm.chart_roc(this.__wbg_ptr, period);
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* Relative Strength Index
|
|
1221
|
+
* @param {number} period
|
|
1222
|
+
*/
|
|
1223
|
+
rsi(period) {
|
|
1224
|
+
wasm.chart_rsi(this.__wbg_ptr, period);
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Relative Vigor Index
|
|
1228
|
+
* @param {number} period
|
|
1229
|
+
*/
|
|
1230
|
+
rvi(period) {
|
|
1231
|
+
wasm.chart_rvi(this.__wbg_ptr, period);
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Simple Moving Average
|
|
1235
|
+
* @param {number} period
|
|
1236
|
+
* @param {string} color
|
|
1237
|
+
*/
|
|
1238
|
+
sma(period, color) {
|
|
1239
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1240
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1241
|
+
wasm.chart_sma(this.__wbg_ptr, period, ptr0, len0);
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* True Strength Index
|
|
1245
|
+
* @param {number} r
|
|
1246
|
+
* @param {number} s
|
|
1247
|
+
*/
|
|
1248
|
+
tsi(r, s) {
|
|
1249
|
+
wasm.chart_tsi(this.__wbg_ptr, r, s);
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Volume Price Trend
|
|
1253
|
+
*/
|
|
1254
|
+
vpt() {
|
|
1255
|
+
wasm.chart_vpt(this.__wbg_ptr);
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Weighted Moving Average
|
|
1259
|
+
* @param {number} period
|
|
1260
|
+
* @param {string} color
|
|
1261
|
+
*/
|
|
1262
|
+
wma(period, color) {
|
|
1263
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1264
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1265
|
+
wasm.chart_wma(this.__wbg_ptr, period, ptr0, len0);
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* Area chart (filled)
|
|
1269
|
+
*/
|
|
1270
|
+
area() {
|
|
1271
|
+
wasm.chart_area(this.__wbg_ptr);
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Double Exponential Moving Average
|
|
1275
|
+
* @param {number} period
|
|
1276
|
+
* @param {string} color
|
|
1277
|
+
*/
|
|
1278
|
+
dema(period, color) {
|
|
1279
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1280
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1281
|
+
wasm.chart_dema(this.__wbg_ptr, period, ptr0, len0);
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Flag
|
|
1285
|
+
* @param {number} x
|
|
1286
|
+
* @param {number} y
|
|
1287
|
+
*/
|
|
1288
|
+
flag(x, y) {
|
|
1289
|
+
wasm.chart_flag(this.__wbg_ptr, x, y);
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Kaufman Adaptive Moving Average
|
|
1293
|
+
* @param {number} period
|
|
1294
|
+
* @param {string} color
|
|
1295
|
+
*/
|
|
1296
|
+
kama(period, color) {
|
|
1297
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1298
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1299
|
+
wasm.chart_kama(this.__wbg_ptr, period, ptr0, len0);
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* Line chart (close prices)
|
|
1303
|
+
*/
|
|
1304
|
+
line() {
|
|
1305
|
+
wasm.chart_line(this.__wbg_ptr);
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* MACD
|
|
1309
|
+
* @param {number} fast
|
|
1310
|
+
* @param {number} slow
|
|
1311
|
+
* @param {number} signal
|
|
1312
|
+
*/
|
|
1313
|
+
macd(fast, slow, signal) {
|
|
1314
|
+
wasm.chart_macd(this.__wbg_ptr, fast, slow, signal);
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Note
|
|
1318
|
+
* @param {number} x
|
|
1319
|
+
* @param {number} y
|
|
1320
|
+
* @param {string} content
|
|
1321
|
+
*/
|
|
1322
|
+
note(x, y, content) {
|
|
1323
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1324
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1325
|
+
wasm.chart_note(this.__wbg_ptr, x, y, ptr0, len0);
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Path (closed polygon)
|
|
1329
|
+
* @param {Float64Array} points
|
|
1330
|
+
*/
|
|
1331
|
+
path(points) {
|
|
1332
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
1333
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1334
|
+
wasm.chart_path(this.__wbg_ptr, ptr0, len0);
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Parabolic SAR
|
|
1338
|
+
*/
|
|
1339
|
+
psar() {
|
|
1340
|
+
wasm.chart_psar(this.__wbg_ptr);
|
|
1341
|
+
}
|
|
1342
|
+
/**
|
|
1343
|
+
* Sign
|
|
1344
|
+
* @param {number} x
|
|
1345
|
+
* @param {number} y
|
|
1346
|
+
*/
|
|
1347
|
+
sign(x, y) {
|
|
1348
|
+
wasm.chart_sign(this.__wbg_ptr, x, y);
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* Triple Exponential Moving Average
|
|
1352
|
+
* @param {number} period
|
|
1353
|
+
* @param {string} color
|
|
1354
|
+
*/
|
|
1355
|
+
tema(period, color) {
|
|
1356
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1357
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1358
|
+
wasm.chart_tema(this.__wbg_ptr, period, ptr0, len0);
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Text annotation
|
|
1362
|
+
* @param {number} x
|
|
1363
|
+
* @param {number} y
|
|
1364
|
+
* @param {string} content
|
|
1365
|
+
*/
|
|
1366
|
+
text(x, y, content) {
|
|
1367
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1368
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1369
|
+
wasm.chart_text(this.__wbg_ptr, x, y, ptr0, len0);
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* TRIX
|
|
1373
|
+
* @param {number} period
|
|
1374
|
+
*/
|
|
1375
|
+
trix(period) {
|
|
1376
|
+
wasm.chart_trix(this.__wbg_ptr, period);
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* VWAP
|
|
1380
|
+
*/
|
|
1381
|
+
vwap() {
|
|
1382
|
+
wasm.chart_vwap(this.__wbg_ptr);
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Aroon
|
|
1386
|
+
* @param {number} period
|
|
1387
|
+
*/
|
|
1388
|
+
aroon(period) {
|
|
1389
|
+
wasm.chart_aroon(this.__wbg_ptr, period);
|
|
1390
|
+
}
|
|
1391
|
+
/**
|
|
1392
|
+
* Brush
|
|
1393
|
+
* @param {Float64Array} points
|
|
1394
|
+
*/
|
|
1395
|
+
brush(points) {
|
|
1396
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
1397
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1398
|
+
wasm.chart_brush(this.__wbg_ptr, ptr0, len0);
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Curve
|
|
1402
|
+
* @param {Float64Array} points
|
|
1403
|
+
*/
|
|
1404
|
+
curve(points) {
|
|
1405
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
1406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1407
|
+
wasm.chart_curve(this.__wbg_ptr, ptr0, len0);
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Table
|
|
1411
|
+
* @param {number} x
|
|
1412
|
+
* @param {number} y
|
|
1413
|
+
*/
|
|
1414
|
+
table(x, y) {
|
|
1415
|
+
wasm.chart_table(this.__wbg_ptr, x, y);
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Triangular Moving Average
|
|
1419
|
+
* @param {number} period
|
|
1420
|
+
* @param {string} color
|
|
1421
|
+
*/
|
|
1422
|
+
trima(period, color) {
|
|
1423
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1424
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1425
|
+
wasm.chart_trima(this.__wbg_ptr, period, ptr0, len0);
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Zero Lag EMA
|
|
1429
|
+
* @param {number} period
|
|
1430
|
+
* @param {string} color
|
|
1431
|
+
*/
|
|
1432
|
+
zlema(period, color) {
|
|
1433
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1434
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1435
|
+
wasm.chart_zlema(this.__wbg_ptr, period, ptr0, len0);
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Circle
|
|
1439
|
+
* @param {number} cx
|
|
1440
|
+
* @param {number} cy
|
|
1441
|
+
* @param {number} ex
|
|
1442
|
+
* @param {number} ey
|
|
1443
|
+
*/
|
|
1444
|
+
circle(cx, cy, ex, ey) {
|
|
1445
|
+
wasm.chart_circle(this.__wbg_ptr, cx, cy, ex, ey);
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* QStick
|
|
1449
|
+
* @param {number} period
|
|
1450
|
+
*/
|
|
1451
|
+
qstick(period) {
|
|
1452
|
+
wasm.chart_qstick(this.__wbg_ptr, period);
|
|
1453
|
+
}
|
|
1454
|
+
/**
|
|
1455
|
+
* Standard Deviation
|
|
1456
|
+
* @param {number} period
|
|
1457
|
+
*/
|
|
1458
|
+
stddev(period) {
|
|
1459
|
+
wasm.chart_stddev(this.__wbg_ptr, period);
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Volume (subpane)
|
|
1463
|
+
*/
|
|
1464
|
+
volume() {
|
|
1465
|
+
wasm.chart_volume(this.__wbg_ptr);
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Vortex Indicator
|
|
1469
|
+
* @param {number} period
|
|
1470
|
+
*/
|
|
1471
|
+
vortex(period) {
|
|
1472
|
+
wasm.chart_vortex(this.__wbg_ptr, period);
|
|
1473
|
+
}
|
|
1474
|
+
/**
|
|
1475
|
+
* ZigZag
|
|
1476
|
+
* @param {number} deviation
|
|
1477
|
+
*/
|
|
1478
|
+
zigzag(deviation) {
|
|
1479
|
+
wasm.chart_zigzag(this.__wbg_ptr, deviation);
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* Accumulation/Distribution Line
|
|
1483
|
+
*/
|
|
1484
|
+
adLine() {
|
|
1485
|
+
wasm.chart_adLine(this.__wbg_ptr);
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Callout
|
|
1489
|
+
* @param {number} x
|
|
1490
|
+
* @param {number} y
|
|
1491
|
+
* @param {string} content
|
|
1492
|
+
*/
|
|
1493
|
+
callout(x, y, content) {
|
|
1494
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1495
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1496
|
+
wasm.chart_callout(this.__wbg_ptr, x, y, ptr0, len0);
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Comment
|
|
1500
|
+
* @param {number} x
|
|
1501
|
+
* @param {number} y
|
|
1502
|
+
* @param {string} content
|
|
1503
|
+
*/
|
|
1504
|
+
comment(x, y, content) {
|
|
1505
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1506
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1507
|
+
wasm.chart_comment(this.__wbg_ptr, x, y, ptr0, len0);
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Ellipse
|
|
1511
|
+
* @param {number} cx
|
|
1512
|
+
* @param {number} cy
|
|
1513
|
+
* @param {number} ex
|
|
1514
|
+
* @param {number} ey
|
|
1515
|
+
*/
|
|
1516
|
+
ellipse(cx, cy, ex, ey) {
|
|
1517
|
+
wasm.chart_ellipse(this.__wbg_ptr, cx, cy, ex, ey);
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Fibonacci fan
|
|
1521
|
+
* @param {number} x1
|
|
1522
|
+
* @param {number} y1
|
|
1523
|
+
* @param {number} x2
|
|
1524
|
+
* @param {number} y2
|
|
1525
|
+
*/
|
|
1526
|
+
fibFan(x1, y1, x2, y2) {
|
|
1527
|
+
wasm.chart_fibFan(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* Keltner Channel
|
|
1531
|
+
* @param {number} period
|
|
1532
|
+
*/
|
|
1533
|
+
keltner(period) {
|
|
1534
|
+
wasm.chart_keltner(this.__wbg_ptr, period);
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* Set device pixel ratio for high-DPI displays
|
|
1538
|
+
* @param {number} dpr
|
|
1539
|
+
*/
|
|
1540
|
+
setDpr(dpr) {
|
|
1541
|
+
wasm.chart_setDpr(this.__wbg_ptr, dpr);
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Arrow up
|
|
1545
|
+
* @param {number} x
|
|
1546
|
+
* @param {number} y
|
|
1547
|
+
*/
|
|
1548
|
+
arrowUp(x, y) {
|
|
1549
|
+
wasm.chart_arrowUp(this.__wbg_ptr, x, y);
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* Donchian Channel
|
|
1553
|
+
* @param {number} period
|
|
1554
|
+
*/
|
|
1555
|
+
donchian(period) {
|
|
1556
|
+
wasm.chart_donchian(this.__wbg_ptr, period);
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* Fibonacci arcs
|
|
1560
|
+
* @param {number} x1
|
|
1561
|
+
* @param {number} y1
|
|
1562
|
+
* @param {number} x2
|
|
1563
|
+
* @param {number} y2
|
|
1564
|
+
*/
|
|
1565
|
+
fibArcs(x1, y1, x2, y2) {
|
|
1566
|
+
wasm.chart_fibArcs(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* Forecast
|
|
1570
|
+
* @param {number} x1
|
|
1571
|
+
* @param {number} y1
|
|
1572
|
+
* @param {number} x2
|
|
1573
|
+
* @param {number} y2
|
|
1574
|
+
*/
|
|
1575
|
+
forecast(x1, y1, x2, y2) {
|
|
1576
|
+
wasm.chart_forecast(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Gann Box
|
|
1580
|
+
* @param {number} x1
|
|
1581
|
+
* @param {number} y1
|
|
1582
|
+
* @param {number} x2
|
|
1583
|
+
* @param {number} y2
|
|
1584
|
+
*/
|
|
1585
|
+
gannBox(x1, y1, x2, y2) {
|
|
1586
|
+
wasm.chart_gannBox(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1587
|
+
}
|
|
1588
|
+
/**
|
|
1589
|
+
* Gann Fan
|
|
1590
|
+
* @param {number} x1
|
|
1591
|
+
* @param {number} y1
|
|
1592
|
+
* @param {number} x2
|
|
1593
|
+
* @param {number} y2
|
|
1594
|
+
*/
|
|
1595
|
+
gannFan(x1, y1, x2, y2) {
|
|
1596
|
+
wasm.chart_gannFan(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Ichimoku Cloud
|
|
1600
|
+
*/
|
|
1601
|
+
ichimoku() {
|
|
1602
|
+
wasm.chart_ichimoku(this.__wbg_ptr);
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* McGinley Dynamic
|
|
1606
|
+
* @param {number} period
|
|
1607
|
+
* @param {string} color
|
|
1608
|
+
*/
|
|
1609
|
+
mcginley(period, color) {
|
|
1610
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1611
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1612
|
+
wasm.chart_mcginley(this.__wbg_ptr, period, ptr0, len0);
|
|
1613
|
+
}
|
|
1614
|
+
/**
|
|
1615
|
+
* Momentum
|
|
1616
|
+
* @param {number} period
|
|
1617
|
+
*/
|
|
1618
|
+
momentum(period) {
|
|
1619
|
+
wasm.chart_momentum(this.__wbg_ptr, period);
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* Polyline
|
|
1623
|
+
* @param {Float64Array} points
|
|
1624
|
+
*/
|
|
1625
|
+
polyline(points) {
|
|
1626
|
+
const ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
1627
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1628
|
+
wasm.chart_polyline(this.__wbg_ptr, ptr0, len0);
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Set OHLCV bar data
|
|
1632
|
+
* @param {JsBar[]} bars
|
|
1633
|
+
*/
|
|
1634
|
+
setBars(bars) {
|
|
1635
|
+
const ptr0 = passArrayJsValueToWasm0(bars, wasm.__wbindgen_malloc);
|
|
1636
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1637
|
+
wasm.chart_setBars(this.__wbg_ptr, ptr0, len0);
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Enable/disable grid
|
|
1641
|
+
* @param {boolean} show
|
|
1642
|
+
*/
|
|
1643
|
+
setGrid(show) {
|
|
1644
|
+
wasm.chart_setGrid(this.__wbg_ptr, show);
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* Signpost
|
|
1648
|
+
* @param {number} x
|
|
1649
|
+
* @param {number} y
|
|
1650
|
+
* @param {string} content
|
|
1651
|
+
*/
|
|
1652
|
+
signpost(x, y, content) {
|
|
1653
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1654
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1655
|
+
wasm.chart_signpost(this.__wbg_ptr, x, y, ptr0, len0);
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Triangle
|
|
1659
|
+
* @param {number} x1
|
|
1660
|
+
* @param {number} y1
|
|
1661
|
+
* @param {number} x2
|
|
1662
|
+
* @param {number} y2
|
|
1663
|
+
* @param {number} x3
|
|
1664
|
+
* @param {number} y3
|
|
1665
|
+
*/
|
|
1666
|
+
triangle(x1, y1, x2, y2, x3, y3) {
|
|
1667
|
+
wasm.chart_triangle(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
1668
|
+
}
|
|
1669
|
+
/**
|
|
1670
|
+
* ATR Bands
|
|
1671
|
+
* @param {number} period
|
|
1672
|
+
* @param {number} multiplier
|
|
1673
|
+
*/
|
|
1674
|
+
atrBands(period, multiplier) {
|
|
1675
|
+
wasm.chart_atrBands(this.__wbg_ptr, period, multiplier);
|
|
1676
|
+
}
|
|
1677
|
+
/**
|
|
1678
|
+
* Bollinger Bands
|
|
1679
|
+
* @param {number} period
|
|
1680
|
+
* @param {number} multiplier
|
|
1681
|
+
*/
|
|
1682
|
+
bollinger(period, multiplier) {
|
|
1683
|
+
wasm.chart_bollinger(this.__wbg_ptr, period, multiplier);
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Elder Ray
|
|
1687
|
+
* @param {number} period
|
|
1688
|
+
*/
|
|
1689
|
+
elderRay(period) {
|
|
1690
|
+
wasm.chart_elderRay(this.__wbg_ptr, period);
|
|
1691
|
+
}
|
|
1692
|
+
/**
|
|
1693
|
+
* Envelopes
|
|
1694
|
+
* @param {number} period
|
|
1695
|
+
* @param {number} percent
|
|
1696
|
+
*/
|
|
1697
|
+
envelopes(period, percent) {
|
|
1698
|
+
wasm.chart_envelopes(this.__wbg_ptr, period, percent);
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* Fibonacci wedge
|
|
1702
|
+
* @param {number} x1
|
|
1703
|
+
* @param {number} y1
|
|
1704
|
+
* @param {number} x2
|
|
1705
|
+
* @param {number} y2
|
|
1706
|
+
*/
|
|
1707
|
+
fibWedge(x1, y1, x2, y2) {
|
|
1708
|
+
wasm.chart_fibWedge(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Info line with measurements
|
|
1712
|
+
* @param {number} x1
|
|
1713
|
+
* @param {number} y1
|
|
1714
|
+
* @param {number} x2
|
|
1715
|
+
* @param {number} y2
|
|
1716
|
+
*/
|
|
1717
|
+
infoLine(x1, y1, x2, y2) {
|
|
1718
|
+
wasm.chart_infoLine(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Pitchfork
|
|
1722
|
+
* @param {number} x1
|
|
1723
|
+
* @param {number} y1
|
|
1724
|
+
* @param {number} x2
|
|
1725
|
+
* @param {number} y2
|
|
1726
|
+
* @param {number} x3
|
|
1727
|
+
* @param {number} y3
|
|
1728
|
+
*/
|
|
1729
|
+
pitchfork(x1, y1, x2, y2, x3, y3) {
|
|
1730
|
+
wasm.chart_pitchfork(this.__wbg_ptr, x1, y1, x2, y2, x3, y3);
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Rectangle
|
|
1734
|
+
* @param {number} x1
|
|
1735
|
+
* @param {number} y1
|
|
1736
|
+
* @param {number} x2
|
|
1737
|
+
* @param {number} y2
|
|
1738
|
+
*/
|
|
1739
|
+
rectangle(x1, y1, x2, y2) {
|
|
1740
|
+
wasm.chart_rectangle(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* Sine wave
|
|
1744
|
+
* @param {number} x1
|
|
1745
|
+
* @param {number} y1
|
|
1746
|
+
* @param {number} x2
|
|
1747
|
+
* @param {number} y2
|
|
1748
|
+
*/
|
|
1749
|
+
sineWave(x1, y1, x2, y2) {
|
|
1750
|
+
wasm.chart_sineWave(this.__wbg_ptr, x1, y1, x2, y2);
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Stochastic RSI
|
|
1754
|
+
* @param {number} period
|
|
1755
|
+
*/
|
|
1756
|
+
stochRsi(period) {
|
|
1757
|
+
wasm.chart_stochRsi(this.__wbg_ptr, period);
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
if (Symbol.dispose) Chart.prototype[Symbol.dispose] = Chart.prototype.free;
|
|
1761
|
+
|
|
1762
|
+
/**
|
|
1763
|
+
* A single OHLCV bar representing one time period of price data.
|
|
1764
|
+
*/
|
|
1765
|
+
export class JsBar {
|
|
1766
|
+
static __unwrap(jsValue) {
|
|
1767
|
+
if (!(jsValue instanceof JsBar)) {
|
|
1768
|
+
return 0;
|
|
1769
|
+
}
|
|
1770
|
+
return jsValue.__destroy_into_raw();
|
|
1771
|
+
}
|
|
1772
|
+
__destroy_into_raw() {
|
|
1773
|
+
const ptr = this.__wbg_ptr;
|
|
1774
|
+
this.__wbg_ptr = 0;
|
|
1775
|
+
JsBarFinalization.unregister(this);
|
|
1776
|
+
return ptr;
|
|
1777
|
+
}
|
|
1778
|
+
free() {
|
|
1779
|
+
const ptr = this.__destroy_into_raw();
|
|
1780
|
+
wasm.__wbg_jsbar_free(ptr, 0);
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* @returns {boolean}
|
|
1784
|
+
*/
|
|
1785
|
+
isBullish() {
|
|
1786
|
+
const ret = wasm.jsbar_isBullish(this.__wbg_ptr);
|
|
1787
|
+
return ret !== 0;
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* @returns {number}
|
|
1791
|
+
*/
|
|
1792
|
+
get low() {
|
|
1793
|
+
const ret = wasm.jsbar_low(this.__wbg_ptr);
|
|
1794
|
+
return ret;
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Create a new OHLCV bar.
|
|
1798
|
+
* @param {bigint} timestamp
|
|
1799
|
+
* @param {number} open
|
|
1800
|
+
* @param {number} high
|
|
1801
|
+
* @param {number} low
|
|
1802
|
+
* @param {number} close
|
|
1803
|
+
* @param {number} volume
|
|
1804
|
+
*/
|
|
1805
|
+
constructor(timestamp, open, high, low, close, volume) {
|
|
1806
|
+
const ret = wasm.jsbar_new(timestamp, open, high, low, close, volume);
|
|
1807
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1808
|
+
JsBarFinalization.register(this, this.__wbg_ptr, this);
|
|
1809
|
+
return this;
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* @returns {number}
|
|
1813
|
+
*/
|
|
1814
|
+
get high() {
|
|
1815
|
+
const ret = wasm.jsbar_high(this.__wbg_ptr);
|
|
1816
|
+
return ret;
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* @returns {number}
|
|
1820
|
+
*/
|
|
1821
|
+
get open() {
|
|
1822
|
+
const ret = wasm.jsbar_open(this.__wbg_ptr);
|
|
1823
|
+
return ret;
|
|
1824
|
+
}
|
|
1825
|
+
/**
|
|
1826
|
+
* @returns {number}
|
|
1827
|
+
*/
|
|
1828
|
+
get close() {
|
|
1829
|
+
const ret = wasm.jsbar_close(this.__wbg_ptr);
|
|
1830
|
+
return ret;
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* @returns {number}
|
|
1834
|
+
*/
|
|
1835
|
+
get volume() {
|
|
1836
|
+
const ret = wasm.jsbar_volume(this.__wbg_ptr);
|
|
1837
|
+
return ret;
|
|
1838
|
+
}
|
|
1839
|
+
/**
|
|
1840
|
+
* @returns {bigint}
|
|
1841
|
+
*/
|
|
1842
|
+
get timestamp() {
|
|
1843
|
+
const ret = wasm.jsbar_timestamp(this.__wbg_ptr);
|
|
1844
|
+
return ret;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
if (Symbol.dispose) JsBar.prototype[Symbol.dispose] = JsBar.prototype.free;
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* Low-level chart configuration.
|
|
1851
|
+
*/
|
|
1852
|
+
export class JsChartConfig {
|
|
1853
|
+
__destroy_into_raw() {
|
|
1854
|
+
const ptr = this.__wbg_ptr;
|
|
1855
|
+
this.__wbg_ptr = 0;
|
|
1856
|
+
JsChartConfigFinalization.unregister(this);
|
|
1857
|
+
return ptr;
|
|
1858
|
+
}
|
|
1859
|
+
free() {
|
|
1860
|
+
const ptr = this.__destroy_into_raw();
|
|
1861
|
+
wasm.__wbg_jschartconfig_free(ptr, 0);
|
|
1862
|
+
}
|
|
1863
|
+
constructor() {
|
|
1864
|
+
const ret = wasm.jschartconfig_new();
|
|
1865
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1866
|
+
JsChartConfigFinalization.register(this, this.__wbg_ptr, this);
|
|
1867
|
+
return this;
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
if (Symbol.dispose) JsChartConfig.prototype[Symbol.dispose] = JsChartConfig.prototype.free;
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* Runtime-modifiable theme with JSON serialization support.
|
|
1874
|
+
* All colors are owned strings that can be modified.
|
|
1875
|
+
*/
|
|
1876
|
+
export class JsRuntimeTheme {
|
|
1877
|
+
static __wrap(ptr) {
|
|
1878
|
+
ptr = ptr >>> 0;
|
|
1879
|
+
const obj = Object.create(JsRuntimeTheme.prototype);
|
|
1880
|
+
obj.__wbg_ptr = ptr;
|
|
1881
|
+
JsRuntimeThemeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1882
|
+
return obj;
|
|
1883
|
+
}
|
|
1884
|
+
__destroy_into_raw() {
|
|
1885
|
+
const ptr = this.__wbg_ptr;
|
|
1886
|
+
this.__wbg_ptr = 0;
|
|
1887
|
+
JsRuntimeThemeFinalization.unregister(this);
|
|
1888
|
+
return ptr;
|
|
1889
|
+
}
|
|
1890
|
+
free() {
|
|
1891
|
+
const ptr = this.__destroy_into_raw();
|
|
1892
|
+
wasm.__wbg_jsruntimetheme_free(ptr, 0);
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* @returns {string}
|
|
1896
|
+
*/
|
|
1897
|
+
get background() {
|
|
1898
|
+
let deferred1_0;
|
|
1899
|
+
let deferred1_1;
|
|
1900
|
+
try {
|
|
1901
|
+
const ret = wasm.jsruntimetheme_background(this.__wbg_ptr);
|
|
1902
|
+
deferred1_0 = ret[0];
|
|
1903
|
+
deferred1_1 = ret[1];
|
|
1904
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1905
|
+
} finally {
|
|
1906
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* @returns {string}
|
|
1911
|
+
*/
|
|
1912
|
+
get lineColor() {
|
|
1913
|
+
let deferred1_0;
|
|
1914
|
+
let deferred1_1;
|
|
1915
|
+
try {
|
|
1916
|
+
const ret = wasm.jsruntimetheme_lineColor(this.__wbg_ptr);
|
|
1917
|
+
deferred1_0 = ret[0];
|
|
1918
|
+
deferred1_1 = ret[1];
|
|
1919
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1920
|
+
} finally {
|
|
1921
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* @returns {string}
|
|
1926
|
+
*/
|
|
1927
|
+
get scaleText() {
|
|
1928
|
+
let deferred1_0;
|
|
1929
|
+
let deferred1_1;
|
|
1930
|
+
try {
|
|
1931
|
+
const ret = wasm.jsruntimetheme_scaleText(this.__wbg_ptr);
|
|
1932
|
+
deferred1_0 = ret[0];
|
|
1933
|
+
deferred1_1 = ret[1];
|
|
1934
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1935
|
+
} finally {
|
|
1936
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* @param {string} color
|
|
1941
|
+
*/
|
|
1942
|
+
set accent(color) {
|
|
1943
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1944
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1945
|
+
wasm.jsruntimetheme_set_accent(this.__wbg_ptr, ptr0, len0);
|
|
1946
|
+
}
|
|
1947
|
+
/**
|
|
1948
|
+
* @param {string} color
|
|
1949
|
+
*/
|
|
1950
|
+
set danger(color) {
|
|
1951
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1952
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1953
|
+
wasm.jsruntimetheme_set_danger(this.__wbg_ptr, ptr0, len0);
|
|
1954
|
+
}
|
|
1955
|
+
/**
|
|
1956
|
+
* @returns {string}
|
|
1957
|
+
*/
|
|
1958
|
+
get toolbarBg() {
|
|
1959
|
+
let deferred1_0;
|
|
1960
|
+
let deferred1_1;
|
|
1961
|
+
try {
|
|
1962
|
+
const ret = wasm.jsruntimetheme_toolbarBg(this.__wbg_ptr);
|
|
1963
|
+
deferred1_0 = ret[0];
|
|
1964
|
+
deferred1_1 = ret[1];
|
|
1965
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1966
|
+
} finally {
|
|
1967
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
/**
|
|
1971
|
+
* Create from preset name: "dark", "light", "high_contrast", "cyberpunk"
|
|
1972
|
+
* @param {string} name
|
|
1973
|
+
* @returns {JsRuntimeTheme}
|
|
1974
|
+
*/
|
|
1975
|
+
static fromPreset(name) {
|
|
1976
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1977
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1978
|
+
const ret = wasm.jsruntimetheme_fromPreset(ptr0, len0);
|
|
1979
|
+
return JsRuntimeTheme.__wrap(ret);
|
|
1980
|
+
}
|
|
1981
|
+
/**
|
|
1982
|
+
* @param {string} color
|
|
1983
|
+
*/
|
|
1984
|
+
set maFast(color) {
|
|
1985
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1986
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1987
|
+
wasm.jsruntimetheme_set_maFast(this.__wbg_ptr, ptr0, len0);
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* @param {string} color
|
|
1991
|
+
*/
|
|
1992
|
+
set maSlow(color) {
|
|
1993
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1994
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1995
|
+
wasm.jsruntimetheme_set_maSlow(this.__wbg_ptr, ptr0, len0);
|
|
1996
|
+
}
|
|
1997
|
+
/**
|
|
1998
|
+
* @param {string} color
|
|
1999
|
+
*/
|
|
2000
|
+
set success(color) {
|
|
2001
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2002
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2003
|
+
wasm.jsruntimetheme_set_success(this.__wbg_ptr, ptr0, len0);
|
|
2004
|
+
}
|
|
2005
|
+
/**
|
|
2006
|
+
* @param {string} color
|
|
2007
|
+
*/
|
|
2008
|
+
set scaleBg(color) {
|
|
2009
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2010
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2011
|
+
wasm.jsruntimetheme_set_scaleBg(this.__wbg_ptr, ptr0, len0);
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* @returns {string}
|
|
2015
|
+
*/
|
|
2016
|
+
get textPrimary() {
|
|
2017
|
+
let deferred1_0;
|
|
2018
|
+
let deferred1_1;
|
|
2019
|
+
try {
|
|
2020
|
+
const ret = wasm.jsruntimetheme_textPrimary(this.__wbg_ptr);
|
|
2021
|
+
deferred1_0 = ret[0];
|
|
2022
|
+
deferred1_1 = ret[1];
|
|
2023
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2024
|
+
} finally {
|
|
2025
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
/**
|
|
2029
|
+
* Create high contrast theme
|
|
2030
|
+
* @returns {JsRuntimeTheme}
|
|
2031
|
+
*/
|
|
2032
|
+
static highContrast() {
|
|
2033
|
+
const ret = wasm.jsruntimetheme_highContrast();
|
|
2034
|
+
return JsRuntimeTheme.__wrap(ret);
|
|
2035
|
+
}
|
|
2036
|
+
/**
|
|
2037
|
+
* @param {string} color
|
|
2038
|
+
*/
|
|
2039
|
+
set gridLine(color) {
|
|
2040
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2041
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2042
|
+
wasm.jsruntimetheme_set_gridLine(this.__wbg_ptr, ptr0, len0);
|
|
2043
|
+
}
|
|
2044
|
+
/**
|
|
2045
|
+
* @returns {string}
|
|
2046
|
+
*/
|
|
2047
|
+
get candleUpBody() {
|
|
2048
|
+
let deferred1_0;
|
|
2049
|
+
let deferred1_1;
|
|
2050
|
+
try {
|
|
2051
|
+
const ret = wasm.jsruntimetheme_candleUpBody(this.__wbg_ptr);
|
|
2052
|
+
deferred1_0 = ret[0];
|
|
2053
|
+
deferred1_1 = ret[1];
|
|
2054
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2055
|
+
} finally {
|
|
2056
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* @returns {string}
|
|
2061
|
+
*/
|
|
2062
|
+
get crosshairLine() {
|
|
2063
|
+
let deferred1_0;
|
|
2064
|
+
let deferred1_1;
|
|
2065
|
+
try {
|
|
2066
|
+
const ret = wasm.jsruntimetheme_crosshairLine(this.__wbg_ptr);
|
|
2067
|
+
deferred1_0 = ret[0];
|
|
2068
|
+
deferred1_1 = ret[1];
|
|
2069
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2070
|
+
} finally {
|
|
2071
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
/**
|
|
2075
|
+
* @param {string} color
|
|
2076
|
+
*/
|
|
2077
|
+
set background(color) {
|
|
2078
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2079
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2080
|
+
wasm.jsruntimetheme_set_background(this.__wbg_ptr, ptr0, len0);
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* @param {string} color
|
|
2084
|
+
*/
|
|
2085
|
+
set lineColor(color) {
|
|
2086
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2087
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2088
|
+
wasm.jsruntimetheme_set_lineColor(this.__wbg_ptr, ptr0, len0);
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* @param {string} color
|
|
2092
|
+
*/
|
|
2093
|
+
set scaleText(color) {
|
|
2094
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2095
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2096
|
+
wasm.jsruntimetheme_set_scaleText(this.__wbg_ptr, ptr0, len0);
|
|
2097
|
+
}
|
|
2098
|
+
/**
|
|
2099
|
+
* @param {string} color
|
|
2100
|
+
*/
|
|
2101
|
+
set toolbarBg(color) {
|
|
2102
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2103
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2104
|
+
wasm.jsruntimetheme_set_toolbarBg(this.__wbg_ptr, ptr0, len0);
|
|
2105
|
+
}
|
|
2106
|
+
/**
|
|
2107
|
+
* Serialize to pretty JSON string
|
|
2108
|
+
* @returns {string}
|
|
2109
|
+
*/
|
|
2110
|
+
toJsonPretty() {
|
|
2111
|
+
let deferred1_0;
|
|
2112
|
+
let deferred1_1;
|
|
2113
|
+
try {
|
|
2114
|
+
const ret = wasm.jsruntimetheme_toJsonPretty(this.__wbg_ptr);
|
|
2115
|
+
deferred1_0 = ret[0];
|
|
2116
|
+
deferred1_1 = ret[1];
|
|
2117
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2118
|
+
} finally {
|
|
2119
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
/**
|
|
2123
|
+
* @returns {string}
|
|
2124
|
+
*/
|
|
2125
|
+
get candleDownBody() {
|
|
2126
|
+
let deferred1_0;
|
|
2127
|
+
let deferred1_1;
|
|
2128
|
+
try {
|
|
2129
|
+
const ret = wasm.jsruntimetheme_candleDownBody(this.__wbg_ptr);
|
|
2130
|
+
deferred1_0 = ret[0];
|
|
2131
|
+
deferred1_1 = ret[1];
|
|
2132
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2133
|
+
} finally {
|
|
2134
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
/**
|
|
2138
|
+
* @param {string} color
|
|
2139
|
+
*/
|
|
2140
|
+
set textPrimary(color) {
|
|
2141
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2142
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2143
|
+
wasm.jsruntimetheme_set_textPrimary(this.__wbg_ptr, ptr0, len0);
|
|
2144
|
+
}
|
|
2145
|
+
/**
|
|
2146
|
+
* @param {string} color
|
|
2147
|
+
*/
|
|
2148
|
+
set candleUpBody(color) {
|
|
2149
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2150
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2151
|
+
wasm.jsruntimetheme_set_candleUpBody(this.__wbg_ptr, ptr0, len0);
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* @param {string} color
|
|
2155
|
+
*/
|
|
2156
|
+
set crosshairLine(color) {
|
|
2157
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2158
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2159
|
+
wasm.jsruntimetheme_set_crosshairLine(this.__wbg_ptr, ptr0, len0);
|
|
2160
|
+
}
|
|
2161
|
+
/**
|
|
2162
|
+
* @param {string} color
|
|
2163
|
+
*/
|
|
2164
|
+
set candleDownBody(color) {
|
|
2165
|
+
const ptr0 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2166
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2167
|
+
wasm.jsruntimetheme_set_candleDownBody(this.__wbg_ptr, ptr0, len0);
|
|
2168
|
+
}
|
|
2169
|
+
/**
|
|
2170
|
+
* Create dark theme
|
|
2171
|
+
* @returns {JsRuntimeTheme}
|
|
2172
|
+
*/
|
|
2173
|
+
static dark() {
|
|
2174
|
+
const ret = wasm.jsruntimetheme_dark();
|
|
2175
|
+
return JsRuntimeTheme.__wrap(ret);
|
|
2176
|
+
}
|
|
2177
|
+
/**
|
|
2178
|
+
* @returns {string}
|
|
2179
|
+
*/
|
|
2180
|
+
get name() {
|
|
2181
|
+
let deferred1_0;
|
|
2182
|
+
let deferred1_1;
|
|
2183
|
+
try {
|
|
2184
|
+
const ret = wasm.jsruntimetheme_name(this.__wbg_ptr);
|
|
2185
|
+
deferred1_0 = ret[0];
|
|
2186
|
+
deferred1_1 = ret[1];
|
|
2187
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2188
|
+
} finally {
|
|
2189
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
/**
|
|
2193
|
+
* Create light theme
|
|
2194
|
+
* @returns {JsRuntimeTheme}
|
|
2195
|
+
*/
|
|
2196
|
+
static light() {
|
|
2197
|
+
const ret = wasm.jsruntimetheme_light();
|
|
2198
|
+
return JsRuntimeTheme.__wrap(ret);
|
|
2199
|
+
}
|
|
2200
|
+
/**
|
|
2201
|
+
* @returns {string}
|
|
2202
|
+
*/
|
|
2203
|
+
get accent() {
|
|
2204
|
+
let deferred1_0;
|
|
2205
|
+
let deferred1_1;
|
|
2206
|
+
try {
|
|
2207
|
+
const ret = wasm.jsruntimetheme_accent(this.__wbg_ptr);
|
|
2208
|
+
deferred1_0 = ret[0];
|
|
2209
|
+
deferred1_1 = ret[1];
|
|
2210
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2211
|
+
} finally {
|
|
2212
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
/**
|
|
2216
|
+
* @returns {string}
|
|
2217
|
+
*/
|
|
2218
|
+
get danger() {
|
|
2219
|
+
let deferred1_0;
|
|
2220
|
+
let deferred1_1;
|
|
2221
|
+
try {
|
|
2222
|
+
const ret = wasm.jsruntimetheme_danger(this.__wbg_ptr);
|
|
2223
|
+
deferred1_0 = ret[0];
|
|
2224
|
+
deferred1_1 = ret[1];
|
|
2225
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2226
|
+
} finally {
|
|
2227
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
* @returns {string}
|
|
2232
|
+
*/
|
|
2233
|
+
get maFast() {
|
|
2234
|
+
let deferred1_0;
|
|
2235
|
+
let deferred1_1;
|
|
2236
|
+
try {
|
|
2237
|
+
const ret = wasm.jsruntimetheme_maFast(this.__wbg_ptr);
|
|
2238
|
+
deferred1_0 = ret[0];
|
|
2239
|
+
deferred1_1 = ret[1];
|
|
2240
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2241
|
+
} finally {
|
|
2242
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
/**
|
|
2246
|
+
* @returns {string}
|
|
2247
|
+
*/
|
|
2248
|
+
get maSlow() {
|
|
2249
|
+
let deferred1_0;
|
|
2250
|
+
let deferred1_1;
|
|
2251
|
+
try {
|
|
2252
|
+
const ret = wasm.jsruntimetheme_maSlow(this.__wbg_ptr);
|
|
2253
|
+
deferred1_0 = ret[0];
|
|
2254
|
+
deferred1_1 = ret[1];
|
|
2255
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2256
|
+
} finally {
|
|
2257
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Get available preset names
|
|
2262
|
+
* @returns {string[]}
|
|
2263
|
+
*/
|
|
2264
|
+
static presets() {
|
|
2265
|
+
const ret = wasm.jsruntimetheme_presets();
|
|
2266
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2267
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2268
|
+
return v1;
|
|
2269
|
+
}
|
|
2270
|
+
/**
|
|
2271
|
+
* @returns {string}
|
|
2272
|
+
*/
|
|
2273
|
+
get success() {
|
|
2274
|
+
let deferred1_0;
|
|
2275
|
+
let deferred1_1;
|
|
2276
|
+
try {
|
|
2277
|
+
const ret = wasm.jsruntimetheme_success(this.__wbg_ptr);
|
|
2278
|
+
deferred1_0 = ret[0];
|
|
2279
|
+
deferred1_1 = ret[1];
|
|
2280
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2281
|
+
} finally {
|
|
2282
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
/**
|
|
2286
|
+
* Serialize to JSON string
|
|
2287
|
+
* @returns {string}
|
|
2288
|
+
*/
|
|
2289
|
+
toJson() {
|
|
2290
|
+
let deferred1_0;
|
|
2291
|
+
let deferred1_1;
|
|
2292
|
+
try {
|
|
2293
|
+
const ret = wasm.jsruntimetheme_toJson(this.__wbg_ptr);
|
|
2294
|
+
deferred1_0 = ret[0];
|
|
2295
|
+
deferred1_1 = ret[1];
|
|
2296
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2297
|
+
} finally {
|
|
2298
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
/**
|
|
2302
|
+
* @returns {string}
|
|
2303
|
+
*/
|
|
2304
|
+
get scaleBg() {
|
|
2305
|
+
let deferred1_0;
|
|
2306
|
+
let deferred1_1;
|
|
2307
|
+
try {
|
|
2308
|
+
const ret = wasm.jsruntimetheme_scaleBg(this.__wbg_ptr);
|
|
2309
|
+
deferred1_0 = ret[0];
|
|
2310
|
+
deferred1_1 = ret[1];
|
|
2311
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2312
|
+
} finally {
|
|
2313
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* @param {string} name
|
|
2318
|
+
*/
|
|
2319
|
+
set name(name) {
|
|
2320
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2321
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2322
|
+
wasm.jsruntimetheme_set_name(this.__wbg_ptr, ptr0, len0);
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* Create cyberpunk theme
|
|
2326
|
+
* @returns {JsRuntimeTheme}
|
|
2327
|
+
*/
|
|
2328
|
+
static cyberpunk() {
|
|
2329
|
+
const ret = wasm.jsruntimetheme_cyberpunk();
|
|
2330
|
+
return JsRuntimeTheme.__wrap(ret);
|
|
2331
|
+
}
|
|
2332
|
+
/**
|
|
2333
|
+
* Deserialize from JSON string
|
|
2334
|
+
* @param {string} json
|
|
2335
|
+
* @returns {JsRuntimeTheme | undefined}
|
|
2336
|
+
*/
|
|
2337
|
+
static fromJson(json) {
|
|
2338
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2339
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2340
|
+
const ret = wasm.jsruntimetheme_fromJson(ptr0, len0);
|
|
2341
|
+
return ret === 0 ? undefined : JsRuntimeTheme.__wrap(ret);
|
|
2342
|
+
}
|
|
2343
|
+
/**
|
|
2344
|
+
* @returns {string}
|
|
2345
|
+
*/
|
|
2346
|
+
get gridLine() {
|
|
2347
|
+
let deferred1_0;
|
|
2348
|
+
let deferred1_1;
|
|
2349
|
+
try {
|
|
2350
|
+
const ret = wasm.jsruntimetheme_gridLine(this.__wbg_ptr);
|
|
2351
|
+
deferred1_0 = ret[0];
|
|
2352
|
+
deferred1_1 = ret[1];
|
|
2353
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2354
|
+
} finally {
|
|
2355
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2356
|
+
}
|
|
145
2357
|
}
|
|
146
2358
|
}
|
|
147
|
-
if (Symbol.dispose)
|
|
2359
|
+
if (Symbol.dispose) JsRuntimeTheme.prototype[Symbol.dispose] = JsRuntimeTheme.prototype.free;
|
|
148
2360
|
|
|
149
2361
|
/**
|
|
150
|
-
*
|
|
2362
|
+
* Legacy simple theme with basic color properties.
|
|
151
2363
|
*/
|
|
152
2364
|
export class JsTheme {
|
|
153
2365
|
static __wrap(ptr) {
|
|
@@ -260,7 +2472,304 @@ export class JsTheme {
|
|
|
260
2472
|
if (Symbol.dispose) JsTheme.prototype[Symbol.dispose] = JsTheme.prototype.free;
|
|
261
2473
|
|
|
262
2474
|
/**
|
|
263
|
-
*
|
|
2475
|
+
* Complete UI theme with all styling options (static, compile-time).
|
|
2476
|
+
* Use JsRuntimeTheme for modifiable themes.
|
|
2477
|
+
*/
|
|
2478
|
+
export class JsUITheme {
|
|
2479
|
+
static __wrap(ptr) {
|
|
2480
|
+
ptr = ptr >>> 0;
|
|
2481
|
+
const obj = Object.create(JsUITheme.prototype);
|
|
2482
|
+
obj.__wbg_ptr = ptr;
|
|
2483
|
+
JsUIThemeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2484
|
+
return obj;
|
|
2485
|
+
}
|
|
2486
|
+
__destroy_into_raw() {
|
|
2487
|
+
const ptr = this.__wbg_ptr;
|
|
2488
|
+
this.__wbg_ptr = 0;
|
|
2489
|
+
JsUIThemeFinalization.unregister(this);
|
|
2490
|
+
return ptr;
|
|
2491
|
+
}
|
|
2492
|
+
free() {
|
|
2493
|
+
const ptr = this.__destroy_into_raw();
|
|
2494
|
+
wasm.__wbg_jsuitheme_free(ptr, 0);
|
|
2495
|
+
}
|
|
2496
|
+
/**
|
|
2497
|
+
* @returns {string}
|
|
2498
|
+
*/
|
|
2499
|
+
get background() {
|
|
2500
|
+
let deferred1_0;
|
|
2501
|
+
let deferred1_1;
|
|
2502
|
+
try {
|
|
2503
|
+
const ret = wasm.jsuitheme_background(this.__wbg_ptr);
|
|
2504
|
+
deferred1_0 = ret[0];
|
|
2505
|
+
deferred1_1 = ret[1];
|
|
2506
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2507
|
+
} finally {
|
|
2508
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* @returns {string}
|
|
2513
|
+
*/
|
|
2514
|
+
get lineColor() {
|
|
2515
|
+
let deferred1_0;
|
|
2516
|
+
let deferred1_1;
|
|
2517
|
+
try {
|
|
2518
|
+
const ret = wasm.jsuitheme_lineColor(this.__wbg_ptr);
|
|
2519
|
+
deferred1_0 = ret[0];
|
|
2520
|
+
deferred1_1 = ret[1];
|
|
2521
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2522
|
+
} finally {
|
|
2523
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
/**
|
|
2527
|
+
* @returns {string}
|
|
2528
|
+
*/
|
|
2529
|
+
get scaleText() {
|
|
2530
|
+
let deferred1_0;
|
|
2531
|
+
let deferred1_1;
|
|
2532
|
+
try {
|
|
2533
|
+
const ret = wasm.jsuitheme_scaleText(this.__wbg_ptr);
|
|
2534
|
+
deferred1_0 = ret[0];
|
|
2535
|
+
deferred1_1 = ret[1];
|
|
2536
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2537
|
+
} finally {
|
|
2538
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
/**
|
|
2542
|
+
* @returns {string}
|
|
2543
|
+
*/
|
|
2544
|
+
get toolbarBg() {
|
|
2545
|
+
let deferred1_0;
|
|
2546
|
+
let deferred1_1;
|
|
2547
|
+
try {
|
|
2548
|
+
const ret = wasm.jsuitheme_toolbarBg(this.__wbg_ptr);
|
|
2549
|
+
deferred1_0 = ret[0];
|
|
2550
|
+
deferred1_1 = ret[1];
|
|
2551
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2552
|
+
} finally {
|
|
2553
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
/**
|
|
2557
|
+
* @returns {string}
|
|
2558
|
+
*/
|
|
2559
|
+
get textPrimary() {
|
|
2560
|
+
let deferred1_0;
|
|
2561
|
+
let deferred1_1;
|
|
2562
|
+
try {
|
|
2563
|
+
const ret = wasm.jsuitheme_textPrimary(this.__wbg_ptr);
|
|
2564
|
+
deferred1_0 = ret[0];
|
|
2565
|
+
deferred1_1 = ret[1];
|
|
2566
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2567
|
+
} finally {
|
|
2568
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
/**
|
|
2572
|
+
* Create high contrast theme (accessibility)
|
|
2573
|
+
* @returns {JsUITheme}
|
|
2574
|
+
*/
|
|
2575
|
+
static highContrast() {
|
|
2576
|
+
const ret = wasm.jsuitheme_highContrast();
|
|
2577
|
+
return JsUITheme.__wrap(ret);
|
|
2578
|
+
}
|
|
2579
|
+
/**
|
|
2580
|
+
* @returns {string}
|
|
2581
|
+
*/
|
|
2582
|
+
get candleUpBody() {
|
|
2583
|
+
let deferred1_0;
|
|
2584
|
+
let deferred1_1;
|
|
2585
|
+
try {
|
|
2586
|
+
const ret = wasm.jsuitheme_candleUpBody(this.__wbg_ptr);
|
|
2587
|
+
deferred1_0 = ret[0];
|
|
2588
|
+
deferred1_1 = ret[1];
|
|
2589
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2590
|
+
} finally {
|
|
2591
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
/**
|
|
2595
|
+
* @returns {string}
|
|
2596
|
+
*/
|
|
2597
|
+
get crosshairLine() {
|
|
2598
|
+
let deferred1_0;
|
|
2599
|
+
let deferred1_1;
|
|
2600
|
+
try {
|
|
2601
|
+
const ret = wasm.jsuitheme_crosshairLine(this.__wbg_ptr);
|
|
2602
|
+
deferred1_0 = ret[0];
|
|
2603
|
+
deferred1_1 = ret[1];
|
|
2604
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2605
|
+
} finally {
|
|
2606
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
/**
|
|
2610
|
+
* @returns {string}
|
|
2611
|
+
*/
|
|
2612
|
+
get candleDownBody() {
|
|
2613
|
+
let deferred1_0;
|
|
2614
|
+
let deferred1_1;
|
|
2615
|
+
try {
|
|
2616
|
+
const ret = wasm.jsuitheme_candleDownBody(this.__wbg_ptr);
|
|
2617
|
+
deferred1_0 = ret[0];
|
|
2618
|
+
deferred1_1 = ret[1];
|
|
2619
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2620
|
+
} finally {
|
|
2621
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
/**
|
|
2625
|
+
* Create dark theme (TradingView-like)
|
|
2626
|
+
* @returns {JsUITheme}
|
|
2627
|
+
*/
|
|
2628
|
+
static dark() {
|
|
2629
|
+
const ret = wasm.jsuitheme_dark();
|
|
2630
|
+
return JsUITheme.__wrap(ret);
|
|
2631
|
+
}
|
|
2632
|
+
/**
|
|
2633
|
+
* @returns {string}
|
|
2634
|
+
*/
|
|
2635
|
+
get name() {
|
|
2636
|
+
let deferred1_0;
|
|
2637
|
+
let deferred1_1;
|
|
2638
|
+
try {
|
|
2639
|
+
const ret = wasm.jsuitheme_name(this.__wbg_ptr);
|
|
2640
|
+
deferred1_0 = ret[0];
|
|
2641
|
+
deferred1_1 = ret[1];
|
|
2642
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2643
|
+
} finally {
|
|
2644
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Create light theme
|
|
2649
|
+
* @returns {JsUITheme}
|
|
2650
|
+
*/
|
|
2651
|
+
static light() {
|
|
2652
|
+
const ret = wasm.jsuitheme_light();
|
|
2653
|
+
return JsUITheme.__wrap(ret);
|
|
2654
|
+
}
|
|
2655
|
+
/**
|
|
2656
|
+
* @returns {string}
|
|
2657
|
+
*/
|
|
2658
|
+
get accent() {
|
|
2659
|
+
let deferred1_0;
|
|
2660
|
+
let deferred1_1;
|
|
2661
|
+
try {
|
|
2662
|
+
const ret = wasm.jsuitheme_accent(this.__wbg_ptr);
|
|
2663
|
+
deferred1_0 = ret[0];
|
|
2664
|
+
deferred1_1 = ret[1];
|
|
2665
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2666
|
+
} finally {
|
|
2667
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
/**
|
|
2671
|
+
* @returns {string}
|
|
2672
|
+
*/
|
|
2673
|
+
get danger() {
|
|
2674
|
+
let deferred1_0;
|
|
2675
|
+
let deferred1_1;
|
|
2676
|
+
try {
|
|
2677
|
+
const ret = wasm.jsuitheme_danger(this.__wbg_ptr);
|
|
2678
|
+
deferred1_0 = ret[0];
|
|
2679
|
+
deferred1_1 = ret[1];
|
|
2680
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2681
|
+
} finally {
|
|
2682
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
/**
|
|
2686
|
+
* @returns {string}
|
|
2687
|
+
*/
|
|
2688
|
+
get maFast() {
|
|
2689
|
+
let deferred1_0;
|
|
2690
|
+
let deferred1_1;
|
|
2691
|
+
try {
|
|
2692
|
+
const ret = wasm.jsuitheme_maFast(this.__wbg_ptr);
|
|
2693
|
+
deferred1_0 = ret[0];
|
|
2694
|
+
deferred1_1 = ret[1];
|
|
2695
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2696
|
+
} finally {
|
|
2697
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
/**
|
|
2701
|
+
* @returns {string}
|
|
2702
|
+
*/
|
|
2703
|
+
get maSlow() {
|
|
2704
|
+
let deferred1_0;
|
|
2705
|
+
let deferred1_1;
|
|
2706
|
+
try {
|
|
2707
|
+
const ret = wasm.jsuitheme_maSlow(this.__wbg_ptr);
|
|
2708
|
+
deferred1_0 = ret[0];
|
|
2709
|
+
deferred1_1 = ret[1];
|
|
2710
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2711
|
+
} finally {
|
|
2712
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2716
|
+
* @returns {string}
|
|
2717
|
+
*/
|
|
2718
|
+
get success() {
|
|
2719
|
+
let deferred1_0;
|
|
2720
|
+
let deferred1_1;
|
|
2721
|
+
try {
|
|
2722
|
+
const ret = wasm.jsuitheme_success(this.__wbg_ptr);
|
|
2723
|
+
deferred1_0 = ret[0];
|
|
2724
|
+
deferred1_1 = ret[1];
|
|
2725
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2726
|
+
} finally {
|
|
2727
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
/**
|
|
2731
|
+
* @returns {string}
|
|
2732
|
+
*/
|
|
2733
|
+
get scaleBg() {
|
|
2734
|
+
let deferred1_0;
|
|
2735
|
+
let deferred1_1;
|
|
2736
|
+
try {
|
|
2737
|
+
const ret = wasm.jsuitheme_scaleBg(this.__wbg_ptr);
|
|
2738
|
+
deferred1_0 = ret[0];
|
|
2739
|
+
deferred1_1 = ret[1];
|
|
2740
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2741
|
+
} finally {
|
|
2742
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
/**
|
|
2746
|
+
* Create cyberpunk/neon theme
|
|
2747
|
+
* @returns {JsUITheme}
|
|
2748
|
+
*/
|
|
2749
|
+
static cyberpunk() {
|
|
2750
|
+
const ret = wasm.jsuitheme_cyberpunk();
|
|
2751
|
+
return JsUITheme.__wrap(ret);
|
|
2752
|
+
}
|
|
2753
|
+
/**
|
|
2754
|
+
* @returns {string}
|
|
2755
|
+
*/
|
|
2756
|
+
get gridLine() {
|
|
2757
|
+
let deferred1_0;
|
|
2758
|
+
let deferred1_1;
|
|
2759
|
+
try {
|
|
2760
|
+
const ret = wasm.jsuitheme_gridLine(this.__wbg_ptr);
|
|
2761
|
+
deferred1_0 = ret[0];
|
|
2762
|
+
deferred1_1 = ret[1];
|
|
2763
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2764
|
+
} finally {
|
|
2765
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
if (Symbol.dispose) JsUITheme.prototype[Symbol.dispose] = JsUITheme.prototype.free;
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* Chart viewport managing visible area and scrolling.
|
|
264
2773
|
*/
|
|
265
2774
|
export class JsViewport {
|
|
266
2775
|
__destroy_into_raw() {
|
|
@@ -327,7 +2836,7 @@ export class JsViewport {
|
|
|
327
2836
|
if (Symbol.dispose) JsViewport.prototype[Symbol.dispose] = JsViewport.prototype.free;
|
|
328
2837
|
|
|
329
2838
|
/**
|
|
330
|
-
* Get library version
|
|
2839
|
+
* Get library version.
|
|
331
2840
|
* @returns {string}
|
|
332
2841
|
*/
|
|
333
2842
|
export function version() {
|
|
@@ -381,6 +2890,15 @@ function __wbg_get_imports() {
|
|
|
381
2890
|
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
382
2891
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
383
2892
|
};
|
|
2893
|
+
imports.wbg.__wbg_jsbar_unwrap = function(arg0) {
|
|
2894
|
+
const ret = JsBar.__unwrap(arg0);
|
|
2895
|
+
return ret;
|
|
2896
|
+
};
|
|
2897
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
2898
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2899
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2900
|
+
return ret;
|
|
2901
|
+
};
|
|
384
2902
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
385
2903
|
const table = wasm.__wbindgen_externrefs;
|
|
386
2904
|
const offset = table.grow(4);
|
|
@@ -397,6 +2915,8 @@ function __wbg_get_imports() {
|
|
|
397
2915
|
function __wbg_finalize_init(instance, module) {
|
|
398
2916
|
wasm = instance.exports;
|
|
399
2917
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
2918
|
+
cachedDataViewMemory0 = null;
|
|
2919
|
+
cachedFloat64ArrayMemory0 = null;
|
|
400
2920
|
cachedUint8ArrayMemory0 = null;
|
|
401
2921
|
|
|
402
2922
|
|