lightweight-charts-drawing 0.2.3 → 0.2.5
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/CHANGELOG.md +33 -1
- package/dist/index.d.ts +55 -3
- package/dist/lightweight-charts-drawing.es.js +1398 -1285
- package/dist/lightweight-charts-drawing.es.js.map +1 -1
- package/dist/lightweight-charts-drawing.umd.cjs +7 -7
- package/dist/lightweight-charts-drawing.umd.cjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.5 (01/10/2026)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Volume profiles (fixed range, anchored): `DrawingStyle.vp`
|
|
8
|
+
(`VolumeProfileStyle`) with the study settings: rows layout (number of
|
|
9
|
+
rows / ticks per row) and row size, volume (Up/Down, Total, Delta), value
|
|
10
|
+
area volume, extend right (fixed range), histogram visibility, row values,
|
|
11
|
+
width (% of the box), placement, up / down and value area colours, VAH /
|
|
12
|
+
VAL / POC lines, developing POC and VA lines, histogram box colour.
|
|
13
|
+
Defaults: `volumeProfileDefaults(kind)`, merged settings:
|
|
14
|
+
`volumeProfileStyle(kind, style)`.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Pitchfan: each level is drawn with its own width and line style.
|
|
19
|
+
- Info line: `extendLeft` / `extendRight` continue the line to the pane edges.
|
|
20
|
+
- Highlighter: drawn at its width (no 12 px minimum).
|
|
21
|
+
|
|
22
|
+
## 0.2.4 (01/10/2026)
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- `Drawing.owner` / `NewDrawing.owner`: id of the study whose pane the drawing
|
|
27
|
+
lives in (absent = the main series pane). For hosts with several panes.
|
|
28
|
+
- `magnetSnap(dp, coords, mode, snapToIndicators, ohlc = true)`: `ohlc = false`
|
|
29
|
+
snaps only to the indicator values (a pane without the main series).
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Vertical line: factory `extendLine: true` (the line runs through every pane).
|
|
34
|
+
|
|
3
35
|
## 0.2.3 (01/10/2026)
|
|
4
36
|
|
|
5
37
|
### Changed
|
|
@@ -131,7 +163,7 @@ runtime (`src/runtime`). Breaking: the 0.1 API is removed.
|
|
|
131
163
|
|
|
132
164
|
- The volume-based tools need bars with a volume: pass them with the
|
|
133
165
|
`bars` option (series data usually has none).
|
|
134
|
-
- Checks behind this release
|
|
166
|
+
- Checks behind this release: the renderers
|
|
135
167
|
match OpenTrader's on 430 golden fixtures, the canvas renderer matches the
|
|
136
168
|
SVG output on 774 fixtures (0.05 % of drawn pixels differ, text
|
|
137
169
|
anti-aliasing), and all 86 tools pass a real-mouse survey (place, select,
|
package/dist/index.d.ts
CHANGED
|
@@ -442,8 +442,8 @@ export declare type DrawingStyle = {
|
|
|
442
442
|
showImage?: boolean;
|
|
443
443
|
plateColor?: string;
|
|
444
444
|
signpostPosition?: number;
|
|
445
|
-
/**
|
|
446
|
-
* through every pane of the chart
|
|
445
|
+
/** Vertical line "Extend" (extendLine, factory on): the line runs
|
|
446
|
+
* through every pane of the chart; off = its own pane only. */
|
|
447
447
|
extendLine?: boolean;
|
|
448
448
|
/** TV vertical line text orientation (factory vertical). */
|
|
449
449
|
textOrientation?: "vertical" | "horizontal";
|
|
@@ -624,6 +624,10 @@ export declare type DrawingStyle = {
|
|
|
624
624
|
vwapUpper?: RegressionLine[];
|
|
625
625
|
vwapLower?: RegressionLine[];
|
|
626
626
|
vwapPriceLabel?: boolean;
|
|
627
|
+
/** Fixed range / anchored volume profile settings (the reference VbP
|
|
628
|
+
* study: Inputs + Style tab). Unset = the kind's factory settings
|
|
629
|
+
* (`volumeProfileDefaults` in specs). */
|
|
630
|
+
vp?: VolumeProfileStyle;
|
|
627
631
|
};
|
|
628
632
|
|
|
629
633
|
/** Draws `items` on `ctx` (current transform = CSS pixels). */
|
|
@@ -806,6 +810,7 @@ export declare type NewDrawing = (OnePoint | TwoPoint | ThreePoint | FourPoint |
|
|
|
806
810
|
};
|
|
807
811
|
closed?: boolean;
|
|
808
812
|
fmt?: number;
|
|
813
|
+
owner?: string;
|
|
809
814
|
};
|
|
810
815
|
|
|
811
816
|
export declare type OHLC = {
|
|
@@ -1358,7 +1363,50 @@ declare type UnitVisibility = {
|
|
|
1358
1363
|
to: number;
|
|
1359
1364
|
};
|
|
1360
1365
|
|
|
1361
|
-
export declare const VERSION = "0.2.
|
|
1366
|
+
export declare const VERSION = "0.2.4";
|
|
1367
|
+
|
|
1368
|
+
/** Volume profile tools: the reference VbPFixed / VbPAnchored study
|
|
1369
|
+
* defaults (24 rows, Up/Down, 70% value area, histogram 30% of the box,
|
|
1370
|
+
* POC 2 px on, VAH / VAL 2 px off, developing plots 1 px off) with the
|
|
1371
|
+
* dark-theme colours of its themed colour list (cold gray 200 lines and
|
|
1372
|
+
* values, sky blue 400 at 50 / 75 % up, berry pink 400 at 50 / 75 % down,
|
|
1373
|
+
* sky blue 500 developing VA, sky blue 400 at 5 % box). Fixed range draws
|
|
1374
|
+
* from the left edge, anchored from the right. */
|
|
1375
|
+
export declare function volumeProfileDefaults(kind: DrawingKind): VolumeProfileStyle;
|
|
1376
|
+
|
|
1377
|
+
/** Volume profile tool settings (reference VbPFixed / VbPAnchored study).
|
|
1378
|
+
* Inputs: rows layout (number of rows or ticks per row) and row size,
|
|
1379
|
+
* volume (Up/Down, Total, Delta), value area volume (%), extend right
|
|
1380
|
+
* (fixed range only). Style: the histogram (visible, values, width % of
|
|
1381
|
+
* the box, placement, up / down and value area up / down colours), the
|
|
1382
|
+
* VAH / VAL / POC lines, the developing POC and VA plots and the
|
|
1383
|
+
* histogram box colour. */
|
|
1384
|
+
export declare type VolumeProfileStyle = {
|
|
1385
|
+
rowsLayout: "rows" | "ticks";
|
|
1386
|
+
rows: number;
|
|
1387
|
+
volume: "upDown" | "total" | "delta";
|
|
1388
|
+
vaVolume: number;
|
|
1389
|
+
extendRight: boolean;
|
|
1390
|
+
visible: boolean;
|
|
1391
|
+
showValues: boolean;
|
|
1392
|
+
valuesColor: string;
|
|
1393
|
+
percentWidth: number;
|
|
1394
|
+
placement: "left" | "right";
|
|
1395
|
+
upColor: string;
|
|
1396
|
+
downColor: string;
|
|
1397
|
+
vaUpColor: string;
|
|
1398
|
+
vaDownColor: string;
|
|
1399
|
+
vah: RegressionLine;
|
|
1400
|
+
val: RegressionLine;
|
|
1401
|
+
poc: RegressionLine;
|
|
1402
|
+
developingPoc: RegressionLine;
|
|
1403
|
+
developingVah: RegressionLine;
|
|
1404
|
+
developingVal: RegressionLine;
|
|
1405
|
+
boxColor: string;
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
/** The drawing's volume profile settings over the factory ones. */
|
|
1409
|
+
export declare function volumeProfileStyle(kind: DrawingKind, s: DrawingStyle): VolumeProfileStyle;
|
|
1362
1410
|
|
|
1363
1411
|
declare type WithId<T> = T & {
|
|
1364
1412
|
id: string;
|
|
@@ -1428,6 +1476,10 @@ declare type WithId<T> = T & {
|
|
|
1428
1476
|
/** ObjectTree group tag — drawings sharing a tag render under one group
|
|
1429
1477
|
* header in the panel (set/cleared by its Manage mode). */
|
|
1430
1478
|
group?: string;
|
|
1479
|
+
/** Owner of the drawing's pane: the id of the study whose pane it was
|
|
1480
|
+
* drawn in (its price scale maps the points). Absent = the main series
|
|
1481
|
+
* pane. A drawing is drawn and clipped in its owner's pane. */
|
|
1482
|
+
owner?: string;
|
|
1431
1483
|
};
|
|
1432
1484
|
|
|
1433
1485
|
export { }
|