openalgo-charts 2.1.4 → 2.1.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/README.md
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
**A from-scratch, dependency-free HTML5-canvas charting engine for OpenAlgo.**
|
|
6
6
|
|
|
7
|
-
Professional interactive charts, 102 built-in indicators plus your own custom ones, 51 drawing tools, order flow, market replay, linked chart grids, on-chart trading, vector SVG export and an optional WebGL2 backend. Eight lazy-loaded tiers, zero runtime dependencies, 67.
|
|
7
|
+
Professional interactive charts, 102 built-in indicators plus your own custom ones, 51 drawing tools, order flow, market replay, linked chart grids, on-chart trading, vector SVG export and an optional WebGL2 backend. Eight lazy-loaded tiers, zero runtime dependencies, 67.08 KB Brotli for the base engine, and a one-call widget tier that adds the toolbar, drawing rail, dialogs and shortcuts.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/openalgo-charts)
|
|
10
10
|
[](./LICENSE)
|
|
11
|
-
[](#size-budget)
|
|
12
|
+
[](#develop)
|
|
13
13
|
[](#principles)
|
|
14
14
|
|
|
15
15
|
[**Documentation**](https://marketcalls.github.io/openalgo-charts/) · [**Live examples**](https://marketcalls.github.io/openalgo-charts/examples) · [**Getting started**](./docs/getting-started.md) · [**Migrating to 2.0**](./docs/migrating-to-2.md) · [**Architecture**](./ARCHITECTURE.md)
|
|
@@ -43,13 +43,11 @@ Every chart in the [live gallery](https://marketcalls.github.io/openalgo-charts/
|
|
|
43
43
|
|
|
44
44
|
## Install
|
|
45
45
|
|
|
46
|
-
Current version: **2.1.
|
|
46
|
+
Current version: **2.1.5**.
|
|
47
47
|
|
|
48
|
-
This patch
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
to change one. Time-axis direction, Reset view and default visible bars are unchanged. See the
|
|
52
|
-
[2.1.4 changelog](./CHANGELOG.md#214) and
|
|
48
|
+
This patch keeps drawing previews and freehand strokes visible beyond the latest
|
|
49
|
+
candle and before the first loaded bar. Future drawing anchors remain editable
|
|
50
|
+
and retain their saved positions. See the [2.1.5 changelog](./CHANGELOG.md#215) and
|
|
53
51
|
[OpenAlgo compatibility guide](https://marketcalls.github.io/openalgo-charts/docs/openalgo-compatibility/).
|
|
54
52
|
|
|
55
53
|
```bash
|
|
@@ -71,7 +69,7 @@ in front of npm rather than being places you upload to. A chart is one HTML file
|
|
|
71
69
|
```html
|
|
72
70
|
<div id="chart" style="width:100vw;height:100vh"></div>
|
|
73
71
|
<script type="module">
|
|
74
|
-
import { createChart } from 'https://unpkg.com/openalgo-charts@2.1.
|
|
72
|
+
import { createChart } from 'https://unpkg.com/openalgo-charts@2.1.5/dist/openalgo-charts.mjs';
|
|
75
73
|
const chart = createChart(document.getElementById('chart'), { timezone: 'Asia/Kolkata' });
|
|
76
74
|
chart.addSeries('candlestick').setData(bars);
|
|
77
75
|
</script>
|
|
@@ -110,16 +108,16 @@ Import only what you use. Each tier is a separate bundle that registers into the
|
|
|
110
108
|
|
|
111
109
|
| Import | Contents | Brotli |
|
|
112
110
|
|---|---|---|
|
|
113
|
-
| `openalgo-charts` | Engine, 13 chart types, panes & scales, primitives, registries, chart state, chart linking, bar cache, interval registry, trading overlay, SVG export, render backend port, OpenAlgo feeds | 67.
|
|
111
|
+
| `openalgo-charts` | Engine, 13 chart types, panes & scales, primitives, registries, chart state, chart linking, bar cache, interval registry, trading overlay, SVG export, render backend port, OpenAlgo feeds | 67.08 KB |
|
|
114
112
|
| `openalgo-charts/indicators` | 102 built-in indicators, the `registerIndicator` contract for your own, and the Tier-2 (external-data) contract | 27.36 KB |
|
|
115
|
-
| `openalgo-charts/draw` | 51 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 25.
|
|
113
|
+
| `openalgo-charts/draw` | 51 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 25.84 KB |
|
|
116
114
|
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi | 2.66 KB |
|
|
117
115
|
| `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 14.96 KB |
|
|
118
116
|
| `openalgo-charts/trade` | Order / position / bracket tools + DOM ladder | 7.61 KB |
|
|
119
117
|
| `openalgo-charts/webgl` | WebGL2 series backend: batched, analytically anti-aliased GPU rendering of the standard chart types behind `renderer: 'auto'`, with a session-long fallback to the 2D path | 6.38 KB |
|
|
120
118
|
| `openalgo-charts/widget` | The chart with its chrome in one call: `createWidget` adds a top bar, the drawing rail, a status line, the settings and indicator dialogs, drawing properties, a right-click menu, a keymap with a `?` panel and optional layout persistence. The only tier that ships DOM | 36.01 KB |
|
|
121
119
|
|
|
122
|
-
Everything together is **187.
|
|
120
|
+
Everything together is **187.90 KB Brotli**; a widget terminal (base + draw + indicators + widget, what one `createWidget` call loads) is 156.29 KB. Figures are the measured `size-limit` output. The trade tier is listed as its delta over the base, so loading base + trade costs 74.69 KB.
|
|
123
121
|
|
|
124
122
|
## What's built
|
|
125
123
|
|
|
@@ -411,16 +409,16 @@ Enforced in CI by [`size-limit`](./.size-limit.json). Nothing is excluded, becau
|
|
|
411
409
|
|
|
412
410
|
| Bundle | Limit | Actual |
|
|
413
411
|
|---|---|---|
|
|
414
|
-
| Base engine | 68 KB | 67.
|
|
415
|
-
| Base + trade | 75 KB | 74.
|
|
412
|
+
| Base engine | 68 KB | 67.08 KB |
|
|
413
|
+
| Base + trade | 75 KB | 74.69 KB |
|
|
416
414
|
| Indicators tier | 30 KB | 27.36 KB |
|
|
417
|
-
| Draw tier | 26 KB | 25.
|
|
415
|
+
| Draw tier | 26 KB | 25.84 KB |
|
|
418
416
|
| Transform tier | 5 KB | 2.66 KB |
|
|
419
417
|
| Profile tier | 15 KB | 14.96 KB |
|
|
420
418
|
| WebGL2 tier | 7 KB | 6.38 KB |
|
|
421
419
|
| Widget tier | 37 KB | 36.01 KB |
|
|
422
|
-
| Widget terminal (base + draw + indicators + widget) | 157 KB | 156.
|
|
423
|
-
| **Everything** | **188 KB** | **187.
|
|
420
|
+
| Widget terminal (base + draw + indicators + widget) | 157 KB | 156.29 KB |
|
|
421
|
+
| **Everything** | **188 KB** | **187.90 KB** |
|
|
424
422
|
|
|
425
423
|
## Documentation
|
|
426
424
|
|
|
@@ -465,7 +463,7 @@ See [Contributing](./CONTRIBUTING.md) for setup, targeted checks, documentation
|
|
|
465
463
|
```bash
|
|
466
464
|
npm install # install dev toolchain
|
|
467
465
|
npm run typecheck # strict TypeScript check
|
|
468
|
-
npm test # unit tests (vitest) -
|
|
466
|
+
npm test # unit tests (vitest) - 4215 across 182 files
|
|
469
467
|
npm run build # Rollup -> dist/ (minified ESM per tier + types)
|
|
470
468
|
npm run size # size-limit (Brotli) against the budget
|
|
471
469
|
npm run e2e # Playwright Chromium smoke tests
|
|
@@ -482,7 +480,7 @@ npm run verify # lint + typecheck + test + build + demo tests + dts + size +
|
|
|
482
480
|
|
|
483
481
|
## Status & limitations
|
|
484
482
|
|
|
485
|
-
Version **2.1.
|
|
483
|
+
Version **2.1.5**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
|
|
486
484
|
|
|
487
485
|
Known gaps, stated plainly:
|
|
488
486
|
|
package/dist/draw/index.d.ts
CHANGED
|
@@ -1208,8 +1208,9 @@ interface DrawingChartHost {
|
|
|
1208
1208
|
priceToCoordinate?(price: number, paneIndex?: number): number | null;
|
|
1209
1209
|
coordinateToPrice?(y: number, paneIndex?: number): number | null;
|
|
1210
1210
|
/**
|
|
1211
|
-
* Optional, the time-axis half of the same conversion.
|
|
1212
|
-
*
|
|
1211
|
+
* Optional, the time-axis half of the same conversion. coordinateToTime also
|
|
1212
|
+
* keeps previews and freehand strokes active in empty space beyond the bars.
|
|
1213
|
+
* Without these methods a horizontal nudge assumes the default bar spacing.
|
|
1213
1214
|
*/
|
|
1214
1215
|
timeToCoordinate?(time: number): number;
|
|
1215
1216
|
coordinateToTime?(x: number): number;
|
package/dist/index.d.ts
CHANGED