@kumo-charts/core 1.0.0-beta.6 → 1.0.0-beta.7
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/LICENSE +201 -201
- package/NOTICE +11 -11
- package/README.md +23 -23
- package/dist/{aggregator-CsTcgTRK.js → aggregator-DFCDVoFt.js} +3 -3
- package/dist/{alert-book-DNP68WX7.js → alert-book-KgUNJ1Pm.js} +5 -4
- package/dist/alert-engine.d.ts +5 -5
- package/dist/alert-engine.js +10 -10
- package/dist/{alerts-Bv5u4-99.js → alerts-sN1NVz-X.js} +19 -7
- package/dist/alerts.d.ts +1 -1
- package/dist/alerts.js +1 -1
- package/dist/all.d.ts +9 -9
- package/dist/all.js +9 -9
- package/dist/{api-BxS-GfYB.d.ts → api-BWC_Cce5.d.ts} +15 -1
- package/dist/{api-BlJUtij_.d.ts → api-DgviKlaI.d.ts} +1 -1
- package/dist/{bar-store-B_NkvUnA.js → bar-store-B4HFH1h6.js} +21 -3
- package/dist/{calendar-BkI9B9A5.js → calendar-xZYfA5bX.js} +4 -4
- package/dist/{chart-types-pzeZDEp9.js → chart-types-DtRsOwjT.js} +3 -3
- package/dist/chart-types.d.ts +1 -1
- package/dist/chart-types.js +1 -1
- package/dist/collection-RZyV3hnM.js +71 -0
- package/dist/{color-1Osbv2TE.js → color-AsBx5M66.js} +1 -1
- package/dist/{data-B75gRyuP.d.ts → data-RRHroFqK.d.ts} +34 -2
- package/dist/{drawings-DMRwbLsg.js → drawings-C-jyagJI.js} +137 -125
- package/dist/drawings.d.ts +3 -3
- package/dist/drawings.js +1 -1
- package/dist/{frame-Bt85Ejw7.js → frame-790ompHn.js} +5 -6
- package/dist/{index-Bfi0g81h.d.ts → index-B5nL4-fG.d.ts} +4 -2
- package/dist/{index-D12U6YKZ.d.ts → index-BMRUiN6F.d.ts} +2 -2
- package/dist/{index-SSXLg0b-.d.ts → index-Bgl-FJT3.d.ts} +3 -3
- package/dist/{index-BoRy0gWB.d.ts → index-Bp1gL2SV.d.ts} +1 -1
- package/dist/{index-DTrnOP7Q.d.ts → index-CsFnU-ko.d.ts} +1 -1
- package/dist/{index-BpyqTH6i.d.ts → index-D5fdjNJv.d.ts} +14 -2
- package/dist/{index-DvbA0QtQ.d.ts → index-cuDsywlB.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +280 -107
- package/dist/{indicator-store-CSNYNv-H.js → indicator-store-Cj8FkdLe.js} +11 -5
- package/dist/{indicators-7G1DqNSH.js → indicators-KKeZmC6g.js} +30 -9
- package/dist/indicators.d.ts +2 -2
- package/dist/indicators.js +2 -2
- package/dist/kumo-charts.iife.js +7 -7
- package/dist/{module-DxdViSuj.d.ts → module-ma1-rklb.d.ts} +2 -2
- package/dist/{modules-RlaXjRWe.js → modules-D_E0wmaT.js} +1 -1
- package/dist/{price-line-BPw9VyW3.js → price-line-Ctf8YIXI.js} +77 -89
- package/dist/{price-line-CdM5YNlZ.d.ts → price-line-exqgokHI.d.ts} +3 -1
- package/dist/{price-lines-CaLOO6qa.js → price-lines-C9xony-Z.js} +1 -1
- package/dist/{registry-f-A949ov.js → registry-DpycnxXe.js} +8 -4
- package/dist/{replay-_1IoxPdh.js → replay-BglWO-Se.js} +3 -3
- package/dist/replay.d.ts +1 -1
- package/dist/replay.js +1 -1
- package/dist/{series-store-Brd46VuC.js → series-store-DwvvS42F.js} +3 -3
- package/dist/{time-BN0L-hLy.js → time-QUqwrKFO.js} +1 -1
- package/dist/{trading-CjKK5irF.js → trading-BY4NVox9.js} +38 -17
- package/dist/trading.d.ts +1 -1
- package/dist/trading.js +1 -1
- package/dist/{transforms-CtdsqwVk.js → transforms-D07qL7UT.js} +3 -3
- package/dist/{types-Bgjeo6w6.js → types-CEVVGcR9.js} +6 -2
- package/dist/{types-uoxTaiGv.js → types-CgerhCJ3.js} +3 -1
- package/dist/{types-xV6t4aad.d.ts → types-CrxgaGh5.d.ts} +14 -2
- package/dist/{validate-YdhjgZ6g.js → validate-B_z8rO0I.js} +4 -1
- package/dist/{value-format-BieuAeNK.js → value-format-DwSqOZkc.js} +6 -6
- package/dist/{values-Cw8XKIVE.js → values-CIb5EJ5-.js} +18 -10
- package/dist/{values-CtBpceAo.js → values-Hk0_RbLE.js} +5 -5
- package/dist/{volume-profile-ZWM9N-I-.js → volume-profile-Ci-AGdvp.js} +5 -8
- package/dist/volume-profile.d.ts +1 -1
- package/dist/volume-profile.js +1 -1
- package/dist/{watermark-qCkQw950.js → watermark--TmdUE3C.js} +3 -3
- package/dist/watermark.d.ts +1 -1
- package/dist/watermark.js +1 -1
- package/package.json +1 -1
package/dist/all.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as checkFields } from "./validate-
|
|
2
|
-
import { Gt as indicators, r as allIndicators } from "./indicators-
|
|
3
|
-
import { i as allDrawings, nt as drawings } from "./drawings-
|
|
4
|
-
import { f as chartTypes, t as allChartTypes } from "./chart-types-
|
|
5
|
-
import { t as alerts } from "./alerts-
|
|
6
|
-
import { n as orders, t as markers } from "./trading-
|
|
7
|
-
import { t as replay } from "./replay-
|
|
8
|
-
import { n as volumeProfiles, t as fixedRangeVolumeProfile } from "./volume-profile-
|
|
9
|
-
import { t as watermark } from "./watermark
|
|
1
|
+
import { r as checkFields } from "./validate-B_z8rO0I.js";
|
|
2
|
+
import { Gt as indicators, r as allIndicators } from "./indicators-KKeZmC6g.js";
|
|
3
|
+
import { i as allDrawings, nt as drawings } from "./drawings-C-jyagJI.js";
|
|
4
|
+
import { f as chartTypes, t as allChartTypes } from "./chart-types-DtRsOwjT.js";
|
|
5
|
+
import { t as alerts } from "./alerts-sN1NVz-X.js";
|
|
6
|
+
import { n as orders, t as markers } from "./trading-BY4NVox9.js";
|
|
7
|
+
import { t as replay } from "./replay-BglWO-Se.js";
|
|
8
|
+
import { n as volumeProfiles, t as fixedRangeVolumeProfile } from "./volume-profile-Ci-AGdvp.js";
|
|
9
|
+
import { t as watermark } from "./watermark--TmdUE3C.js";
|
|
10
10
|
//#region src/all.ts
|
|
11
11
|
/**
|
|
12
12
|
* Every module of the library with everything in it: `createChart(container, { modules:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { En as Bar, St as Calendar, Ut as LineStyle, jn as PriceSource, vn as Interval, yn as IntervalInput } from "./data-RRHroFqK.js";
|
|
2
2
|
import { t as MarkerShape } from "./shapes-BeKfp99c.js";
|
|
3
3
|
//#region src/indicators/types.d.ts
|
|
4
4
|
/** One of the values a parameter takes, and its name. */
|
|
@@ -235,6 +235,12 @@ interface IndicatorContext {
|
|
|
235
235
|
* bars they are built from.
|
|
236
236
|
*/
|
|
237
237
|
readonly interval: Interval | null;
|
|
238
|
+
/**
|
|
239
|
+
* The symbol of the bars, where the page that made the chart says it: an indicator that reads
|
|
240
|
+
* data besides the bars, such as another source of the same symbol, needs to know it. `null`
|
|
241
|
+
* where the page does not say.
|
|
242
|
+
*/
|
|
243
|
+
readonly symbol?: string | null;
|
|
238
244
|
}
|
|
239
245
|
/** A window of the most recent bars, oldest first. */
|
|
240
246
|
interface BarWindow {
|
|
@@ -326,6 +332,11 @@ interface IndicatorInput {
|
|
|
326
332
|
*/
|
|
327
333
|
timeframe?: IntervalInput | null;
|
|
328
334
|
visible?: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Marks the latest value of each of its lines and histograms on the price axis, in their colors,
|
|
337
|
+
* as the latest price is. Default `false`.
|
|
338
|
+
*/
|
|
339
|
+
lastValueLabel?: boolean;
|
|
329
340
|
/** Color overrides keyed by output key. */
|
|
330
341
|
colors?: Record<string, string>;
|
|
331
342
|
/** How outputs are drawn, keyed by output key: shown or not, the width and style of lines. */
|
|
@@ -361,6 +372,7 @@ interface IndicatorPatch {
|
|
|
361
372
|
/** The timeframe it is computed in; `null` for the chart's bars. */
|
|
362
373
|
timeframe?: IntervalInput | null;
|
|
363
374
|
visible?: boolean;
|
|
375
|
+
lastValueLabel?: boolean;
|
|
364
376
|
scale?: string;
|
|
365
377
|
colors?: Record<string, string | null>;
|
|
366
378
|
styles?: Record<string, IndicatorOutputStyle | null>;
|
|
@@ -379,6 +391,8 @@ interface Indicator {
|
|
|
379
391
|
*/
|
|
380
392
|
readonly timeframe: string | null;
|
|
381
393
|
readonly visible: boolean;
|
|
394
|
+
/** Its latest values are marked on the price axis. */
|
|
395
|
+
readonly lastValueLabel: boolean;
|
|
382
396
|
readonly colors: Readonly<Record<string, string>>;
|
|
383
397
|
readonly styles: Readonly<Record<string, Readonly<IndicatorOutputStyle>>>;
|
|
384
398
|
/** The reference lines set in place of the type's, or `null` for the type's. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DrawingField, g as DrawingStyle, i as DrawingBounds, l as DrawingInput, n as Drawing, y as DrawingTypeDefinition } from "./types-
|
|
1
|
+
import { a as DrawingField, g as DrawingStyle, i as DrawingBounds, l as DrawingInput, n as Drawing, y as DrawingTypeDefinition } from "./types-CrxgaGh5.js";
|
|
2
2
|
//#region src/drawings/tool.d.ts
|
|
3
3
|
interface ToolOptions {
|
|
4
4
|
style?: Partial<DrawingStyle>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as toTime } from "./time-
|
|
1
|
+
import { m as fail, p as describeValue, s as checkObject } from "./validate-B_z8rO0I.js";
|
|
2
|
+
import { n as toTime } from "./time-QUqwrKFO.js";
|
|
3
3
|
//#region src/data/change-log.ts
|
|
4
4
|
/** Tail changes kept for readers that fell behind; one further behind reads everything again. */
|
|
5
5
|
const MAX_TAILS = 256;
|
|
@@ -139,6 +139,20 @@ function logicalIndex(bars, interval, time) {
|
|
|
139
139
|
const start = bars.time(index);
|
|
140
140
|
return index + (time - start) / (bars.time(index + 1) - start);
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Whole logical index of the bar whose period contains `time`: what a time is on the bars of a
|
|
144
|
+
* chart, whatever interval it was set on. A time of a smaller interval, such as a 15-minute bar
|
|
145
|
+
* seen on daily bars, stands on the daily bar it falls in, not between that bar and the next.
|
|
146
|
+
* Beyond the bars the periods go on with the interval. `NaN` as {@link logicalIndex} has it.
|
|
147
|
+
*/
|
|
148
|
+
function barIndex(bars, interval, time) {
|
|
149
|
+
if (interval === null) return bars.length === 1 && time === bars.time(0) ? 0 : NaN;
|
|
150
|
+
const last = bars.length - 1;
|
|
151
|
+
if (time < bars.time(0)) return Math.floor((time - bars.time(0)) / interval);
|
|
152
|
+
const after = bars.lowerBound(time);
|
|
153
|
+
const index = after < bars.length && bars.time(after) === time ? after : after - 1;
|
|
154
|
+
return index >= last ? last + Math.floor((time - bars.time(last)) / interval) : index;
|
|
155
|
+
}
|
|
142
156
|
/** Time at a continuous logical index, the inverse of {@link logicalIndex}. */
|
|
143
157
|
function logicalTime(bars, interval, logical) {
|
|
144
158
|
if (interval === null) return bars.length === 1 && logical === 0 ? bars.time(0) : NaN;
|
|
@@ -304,6 +318,10 @@ var BarStore = class {
|
|
|
304
318
|
logicalIndexOf(time) {
|
|
305
319
|
return logicalIndex(this, this.interval(), time);
|
|
306
320
|
}
|
|
321
|
+
/** Whole logical index of the bar whose period contains `time`; see {@link barIndex}. */
|
|
322
|
+
barIndexOf(time) {
|
|
323
|
+
return barIndex(this, this.interval(), time);
|
|
324
|
+
}
|
|
307
325
|
/** Time at a continuous logical index, the inverse of {@link logicalIndexOf}. */
|
|
308
326
|
timeOfLogicalIndex(logical) {
|
|
309
327
|
return logicalTime(this, this.interval(), logical);
|
|
@@ -459,4 +477,4 @@ var BarsReader = class {
|
|
|
459
477
|
}
|
|
460
478
|
};
|
|
461
479
|
//#endregion
|
|
462
|
-
export { priceOf as a,
|
|
480
|
+
export { priceOf as a, logicalTime as c, planTail as d, shiftStart as f, parseBars as i, typicalInterval as l, ChangeLog as m, BarsReader as n, barIndex as o, withRoom as p, parseBar as r, logicalIndex as s, BarStore as t, checkAscending as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { n as toTime, t as describeTime } from "./time-
|
|
3
|
-
import {
|
|
4
|
-
import { n as createDefaultOptions } from "./registry-
|
|
1
|
+
import { a as checkFunctionOrNull, d as fieldsOf, l as checkString, m as fail, o as checkNumber, p as describeValue, r as checkFields, t as checkArray, u as checkTimeZone } from "./validate-B_z8rO0I.js";
|
|
2
|
+
import { n as toTime, t as describeTime } from "./time-QUqwrKFO.js";
|
|
3
|
+
import { i as deepMerge } from "./types-CgerhCJ3.js";
|
|
4
|
+
import { n as createDefaultOptions } from "./registry-DpycnxXe.js";
|
|
5
5
|
//#region src/format/clock.ts
|
|
6
6
|
const HOUR_MS = 36e5;
|
|
7
7
|
/** Zones change their offsets at quarters of an hour, some within an hour of UTC. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as validateSeriesDefinition, n as validateTransformDefinition } from "./transforms-
|
|
1
|
+
import { c as checkOneOf, m as fail, n as checkBoolean, o as checkNumber, s as checkObject, t as checkArray } from "./validate-B_z8rO0I.js";
|
|
2
|
+
import { i as validateSeriesDefinition, n as validateTransformDefinition } from "./transforms-D07qL7UT.js";
|
|
3
3
|
import { s as snap, t as alignToDevice } from "./canvas-BFRISb50.js";
|
|
4
4
|
import { r as groupsOf, t as candleStyle } from "./bars-BMdpzGEx.js";
|
|
5
|
-
import { n as defineModule } from "./modules-
|
|
5
|
+
import { n as defineModule } from "./modules-D_E0wmaT.js";
|
|
6
6
|
/** The message of a transform built from trades by the average true range, which they lack. */
|
|
7
7
|
function tradesHaveNoRange(type, sizes) {
|
|
8
8
|
return `Trades have no true range to size the "${type}" transform by: give ${sizes}.`;
|
package/dist/chart-types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as pointFigure, c as tickBars, d as volumeCandles, f as PointFigureSource, g as chartTypes, h as ChartTypesModule, i as lineBreak, l as turnoverBars, m as ChartType, n as heikinAshi, o as rangeBars, p as RenkoSource, r as kagi, s as renko, t as allChartTypes, u as volumeBars } from "./index-
|
|
1
|
+
import { a as pointFigure, c as tickBars, d as volumeCandles, f as PointFigureSource, g as chartTypes, h as ChartTypesModule, i as lineBreak, l as turnoverBars, m as ChartType, n as heikinAshi, o as rangeBars, p as RenkoSource, r as kagi, s as renko, t as allChartTypes, u as volumeBars } from "./index-CsFnU-ko.js";
|
|
2
2
|
export { type ChartType, type ChartTypesModule, type PointFigureSource, type RenkoSource, allChartTypes, chartTypes, heikinAshi, kagi, lineBreak, pointFigure, rangeBars, renko, tickBars, turnoverBars, volumeBars, volumeCandles };
|
package/dist/chart-types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as allChartTypes, f as chartTypes, n as heikinAshi, r as kagi, i as lineBreak, a as pointFigure, o as rangeBars, s as renko, c as tickBars, l as turnoverBars, u as volumeBars, d as volumeCandles } from "./chart-types-
|
|
1
|
+
export { t as allChartTypes, f as chartTypes, n as heikinAshi, r as kagi, i as lineBreak, a as pointFigure, o as rangeBars, s as renko, c as tickBars, l as turnoverBars, u as volumeBars, d as volumeCandles } from "./chart-types-DtRsOwjT.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { l as checkString, m as fail, t as checkArray } from "./validate-B_z8rO0I.js";
|
|
2
|
+
//#region src/chart/api/collection.ts
|
|
3
|
+
/**
|
|
4
|
+
* What `inputs` bring in place of every object of a collection, by id in their order: each input
|
|
5
|
+
* parsed but for its id, and its id the one it gives, or the next of `prefix` after those of
|
|
6
|
+
* `ids`. Every input is checked before any is numbered, and an id given twice throws; `ids` notes
|
|
7
|
+
* the ids once they are all valid.
|
|
8
|
+
*/
|
|
9
|
+
function replacement(label, inputs, ids, prefix, parse) {
|
|
10
|
+
checkArray(label, inputs);
|
|
11
|
+
const parsed = inputs.map((input, index) => ({
|
|
12
|
+
input,
|
|
13
|
+
settings: parse(input, `${label}[${index}]`)
|
|
14
|
+
}));
|
|
15
|
+
const given = /* @__PURE__ */ new Set();
|
|
16
|
+
parsed.forEach(({ input }, index) => {
|
|
17
|
+
if (input.id !== void 0) {
|
|
18
|
+
const id = checkString(`${label}[${index}].id`, input.id);
|
|
19
|
+
if (given.has(id)) fail(`${label} contains the id "${id}" twice.`);
|
|
20
|
+
given.add(id);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
given.forEach((id) => {
|
|
24
|
+
ids.note(id);
|
|
25
|
+
});
|
|
26
|
+
const items = /* @__PURE__ */ new Map();
|
|
27
|
+
parsed.forEach(({ input, settings }) => {
|
|
28
|
+
const id = input.id ?? ids.next(prefix);
|
|
29
|
+
ids.note(id);
|
|
30
|
+
items.set(id, {
|
|
31
|
+
id,
|
|
32
|
+
...settings
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return items;
|
|
36
|
+
}
|
|
37
|
+
function collectionApi(core, collection) {
|
|
38
|
+
const mutate = (operation) => core.run(() => {
|
|
39
|
+
const result = operation();
|
|
40
|
+
core.objects.prune();
|
|
41
|
+
core.invalidateLayers("objects");
|
|
42
|
+
return result;
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
set: (inputs) => {
|
|
46
|
+
mutate(() => {
|
|
47
|
+
collection.set(inputs);
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
add: (input) => mutate(() => collection.add(input)),
|
|
51
|
+
update: (id, patch) => {
|
|
52
|
+
mutate(() => {
|
|
53
|
+
collection.update(id, patch);
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
remove: (id) => {
|
|
57
|
+
mutate(() => {
|
|
58
|
+
collection.remove(id);
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
clear: () => {
|
|
62
|
+
mutate(() => {
|
|
63
|
+
collection.set([]);
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
get: (id) => collection.get(id),
|
|
67
|
+
list: () => collection.list()
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { replacement as n, collectionApi as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as checkOneOf, d as fieldsOf, l as checkString, m as fail, n as checkBoolean, o as checkNumber, r as checkFields } from "./validate-B_z8rO0I.js";
|
|
2
2
|
//#region src/options/margins.ts
|
|
3
3
|
const MARGIN_FIELDS = fieldsOf({
|
|
4
4
|
top: true,
|
|
@@ -307,7 +307,21 @@ interface CrosshairOptions {
|
|
|
307
307
|
* it all the same.
|
|
308
308
|
*/
|
|
309
309
|
snapToBars: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* Lines of text under the crosshair's label on the right price axis, such as how far the price is from the latest:
|
|
312
|
+
* given the price at the pointer and the id of its pane, in the label's colors. None, or `null`, for the price alone.
|
|
313
|
+
* They go over the price where there is no room under it.
|
|
314
|
+
*/
|
|
315
|
+
priceLines: CrosshairPriceLines | null;
|
|
316
|
+
/**
|
|
317
|
+
* Keeps the crosshair's label on the right price axis clear of the labels there of the latest price and the latest
|
|
318
|
+
* values: where it would cover them it sits against them, above or below, on the side of the pointer, and stays
|
|
319
|
+
* there as the pointer moves over them. Otherwise it is at the pointer, over them.
|
|
320
|
+
*/
|
|
321
|
+
avoidLabels: boolean;
|
|
310
322
|
}
|
|
323
|
+
/** The lines under the crosshair's price label (`crosshair.priceLines`), of the price at the pointer in a pane. */
|
|
324
|
+
type CrosshairPriceLines = (price: number, paneId: string) => readonly string[];
|
|
311
325
|
/** Formats a time label. `kind` tells where the label is shown. */
|
|
312
326
|
type TimeFormatter = (time: number, context: TimeFormatContext) => string;
|
|
313
327
|
interface TimeFormatContext {
|
|
@@ -347,7 +361,22 @@ interface PriceScaleOptions {
|
|
|
347
361
|
formatter: PriceFormatter | null;
|
|
348
362
|
/** Minimum axis width in CSS pixels; the axis grows to fit its labels. */
|
|
349
363
|
minWidth: number;
|
|
364
|
+
/**
|
|
365
|
+
* Keeps the label of an order or an alert whose line lies above or below the plot at its top or
|
|
366
|
+
* bottom edge, with an arrow, where a click brings the line into view. Otherwise it is out of
|
|
367
|
+
* sight with its line.
|
|
368
|
+
*/
|
|
369
|
+
pinLabels: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Where a label of several lines on the price axis lies on its line, such as the latest price's with the countdown
|
|
372
|
+
* under it or the crosshair's with `crosshair.priceLines`: `middle`, the whole label centered on it; `firstLine`, its
|
|
373
|
+
* first line on it and the others under it.
|
|
374
|
+
*/
|
|
375
|
+
labelAnchor: LabelAnchor;
|
|
350
376
|
}
|
|
377
|
+
/** Where a label of several lines on the price axis lies on its line (`priceScale.labelAnchor`). */
|
|
378
|
+
declare const LABEL_ANCHORS: readonly ["middle", "firstLine"];
|
|
379
|
+
type LabelAnchor = (typeof LABEL_ANCHORS)[number];
|
|
351
380
|
interface TimeScaleOptions {
|
|
352
381
|
visible: boolean;
|
|
353
382
|
/** Axis height in CSS pixels. */
|
|
@@ -1437,7 +1466,10 @@ interface ChartBase<Options = unknown, Events = unknown, State = unknown> {
|
|
|
1437
1466
|
saveState(): ChartState & State;
|
|
1438
1467
|
/** Restores a saved layout atomically; an invalid state throws and changes nothing. */
|
|
1439
1468
|
loadState(state: ChartState): void;
|
|
1440
|
-
/**
|
|
1469
|
+
/**
|
|
1470
|
+
* Renders pending changes and returns a canvas with the whole chart; an empty one when the chart
|
|
1471
|
+
* has no size, as in a container that is hidden.
|
|
1472
|
+
*/
|
|
1441
1473
|
screenshot(): HTMLCanvasElement;
|
|
1442
1474
|
/**
|
|
1443
1475
|
* Removes the chart's element and releases every listener, observer and timer. Every other
|
|
@@ -1542,4 +1574,4 @@ interface DataApi {
|
|
|
1542
1574
|
toArray(): Bar[];
|
|
1543
1575
|
}
|
|
1544
1576
|
//#endregion
|
|
1545
|
-
export { Point as $,
|
|
1577
|
+
export { Point as $, Theme as $t, TimeScaleApi as A, PRICE_SOURCES as An, ChartTexts as At, OptionsChangeEvent as B, LegendButton as Bt, SavedScale as C, formatInterval as Cn, CalendarInput as Ct, PluginPaintContext as D, BarChange as Dn, CalendarBucket as Dt, PluginLayer as E, Bar as En, BarColorContext as Et, ChartPointerEvent as F, ValueSource as Fn, InteractionOptions as Ft, VisibleRangeChangeEvent as G, PaneOptions as Gt, SelectionChangeEvent as H, LegendOptions as Ht, CrosshairMoveEvent as I, TimeInput as In, LABEL_ANCHORS as It, PriceScaleApi as J, PriceFormatter as Jt, SeriesApi as K, PerformanceOptions as Kt, LegendButtonClickEvent as L, LINE_STYLES as Lt, ButtonClickEvent as M, TradeInput as Mn, CrosshairPriceLines as Mt, ChartArea as N, TradeSide as Nn, FontOptions as Nt, PluginPane as O, BarInput as On, CalendarOptions as Ot, ChartEventMap as P, ValuePointInput as Pn, GridOptions as Pt, ObjectKind as Q, TextOverrides as Qt, LoadMoreEvent as R, LabelAnchor as Rt, ChartState as S, checkTimeframe as Sn, Calendar as St, PluginHost as T, parseInterval as Tn, createCalendar as Tt, TimeRange as U, LineStyle as Ut, PaneResizeEvent as V, LegendItem as Vt, TypesChangeEvent as W, MainSeriesOptions as Wt, Selection as X, PriceScaleOptions as Xt, CrosshairState as Y, PriceScaleMode as Yt, ChartCommand as Z, ScaleMargins as Zt, ModulesEvents as _, SeriesType as _n, BarTransformState as _t, CreateChartOptions as a, BaselineStyle as an, ViewAlign as at, ModulesTypes as b, IntervalUnit as bn, SeriesPoints as bt, createChart as c, HighLowStyle as cn, Rect as ct, ModuleDefinition as d, LineMarkersStyle as dn, PaneInput as dt, TimeFormatContext as en, Series as et, ModuleOptions as f, LineSeriesStyle as fn, PriceRange as ft, ModulesApi as g, SeriesStyleOverrides as gn, BarTransformInput as gt, ModuleTypes as h, SeriesStyleMap as hn, BarTransformDefinition as ht, ChartBase as i, AreaStyle as in, LogicalRange as it, BarsChangeEvent as j, PriceSource as jn, CrosshairOptions as jt, TransformsApi as k, BarsView as kn, ChartOptions as kt, ChartModule as l, HlcAreaStyle as ln, SeparatorLayout as lt, ModuleStatePart as m, PointFigureStyle as mn, Unsubscribe as mt, DataSetOptions as n, TimeScaleOptions as nn, SeriesPatch as nt, CrosshairApi as o, CandleStyle as on, Layout as ot, ModuleOptionsOf as p, OhlcStyle as pn, DeepPartial as pt, PanesApi as q, PriceFormatContext as qt, Chart as r, TimeUnit as rn, SeriesPointInput as rt, PluginsApi as s, ColumnsStyle as sn, PaneLayout as st, DataApi as t, TimeFormatter as tn, SeriesInput as tt, ModuleContext as u, KagiStyle as un, Pane as ut, ModulesOptions as v, Interval as vn, BarTransformStream as vt, ChartPlugin as w, intervalDuration as wn, CalendarRange as wt, createModule as x, canBuildTimeframe as xn, SeriesTypeDefinition as xt, ModulesState as y, IntervalInput as yn, SeriesPaintContext as yt, ObjectTarget as z, LatestPriceOptions as zt };
|