openalgo-charts 2.0.0 → 2.0.1
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,7 +4,7 @@
|
|
|
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, 66.
|
|
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, 66.42 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)
|
|
@@ -62,7 +62,7 @@ in front of npm rather than being places you upload to. A chart is one HTML file
|
|
|
62
62
|
```html
|
|
63
63
|
<div id="chart" style="width:100vw;height:100vh"></div>
|
|
64
64
|
<script type="module">
|
|
65
|
-
import { createChart } from 'https://unpkg.com/openalgo-charts@2.0.
|
|
65
|
+
import { createChart } from 'https://unpkg.com/openalgo-charts@2.0.1/dist/openalgo-charts.mjs';
|
|
66
66
|
const chart = createChart(document.getElementById('chart'), { timezone: 'Asia/Kolkata' });
|
|
67
67
|
chart.addSeries('candlestick').setData(bars);
|
|
68
68
|
</script>
|
|
@@ -101,7 +101,7 @@ Import only what you use. Each tier is a separate bundle that registers into the
|
|
|
101
101
|
|
|
102
102
|
| Import | Contents | Brotli |
|
|
103
103
|
|---|---|---|
|
|
104
|
-
| `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 | 66.
|
|
104
|
+
| `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 | 66.42 KB |
|
|
105
105
|
| `openalgo-charts/indicators` | 102 built-in indicators, the `registerIndicator` contract for your own, and the Tier-2 (external-data) contract | 27.27 KB |
|
|
106
106
|
| `openalgo-charts/draw` | 51 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 25.82 KB |
|
|
107
107
|
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi | 2.66 KB |
|
|
@@ -110,7 +110,7 @@ Import only what you use. Each tier is a separate bundle that registers into the
|
|
|
110
110
|
| `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 |
|
|
111
111
|
| `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 | 35.56 KB |
|
|
112
112
|
|
|
113
|
-
Everything together is **182.
|
|
113
|
+
Everything together is **182.37 KB Brotli**; a widget terminal (base + draw + indicators + widget, what one `createWidget` call loads) is 155.06 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.03 KB.
|
|
114
114
|
|
|
115
115
|
## What's built
|
|
116
116
|
|
|
@@ -294,16 +294,16 @@ Enforced in CI by [`size-limit`](./.size-limit.json). Nothing is excluded, becau
|
|
|
294
294
|
|
|
295
295
|
| Bundle | Limit | Actual |
|
|
296
296
|
|---|---|---|
|
|
297
|
-
| Base engine | 67 KB | 66.
|
|
298
|
-
| Base + trade | 75 KB | 74.
|
|
297
|
+
| Base engine | 67 KB | 66.42 KB |
|
|
298
|
+
| Base + trade | 75 KB | 74.03 KB |
|
|
299
299
|
| Indicators tier | 30 KB | 27.27 KB |
|
|
300
300
|
| Draw tier | 26 KB | 25.82 KB |
|
|
301
301
|
| Transform tier | 5 KB | 2.66 KB |
|
|
302
302
|
| Profile tier | 11 KB | 10.66 KB |
|
|
303
303
|
| WebGL2 tier | 7 KB | 6.38 KB |
|
|
304
304
|
| Widget tier | 36 KB | 35.56 KB |
|
|
305
|
-
| Widget terminal (base + draw + indicators + widget) | 156 KB | 155.
|
|
306
|
-
| **Everything** | **183 KB** | **182.
|
|
305
|
+
| Widget terminal (base + draw + indicators + widget) | 156 KB | 155.06 KB |
|
|
306
|
+
| **Everything** | **183 KB** | **182.37 KB** |
|
|
307
307
|
|
|
308
308
|
## Documentation
|
|
309
309
|
|
|
@@ -363,7 +363,7 @@ npm run verify # lint + typecheck + test + build + demo tests + dts + size +
|
|
|
363
363
|
|
|
364
364
|
## Status & limitations
|
|
365
365
|
|
|
366
|
-
Version **2.0.
|
|
366
|
+
Version **2.0.1**. All engine build phases are implemented with 3999 unit tests across 170 files. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
|
|
367
367
|
|
|
368
368
|
Known gaps, stated plainly:
|
|
369
369
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Library version string. Matches package.json (published npm release). */
|
|
2
|
-
declare const VERSION = "2.0.
|
|
2
|
+
declare const VERSION = "2.0.1";
|
|
3
3
|
/** Returns the current library version. */
|
|
4
4
|
declare function version(): string;
|
|
5
5
|
|
|
@@ -6884,7 +6884,12 @@ interface OrderUpdateEvent {
|
|
|
6884
6884
|
/**
|
|
6885
6885
|
* Pure: build a subscribe message — `{ action, symbol, exchange, mode }`, where
|
|
6886
6886
|
* `mode` is the numeric OpenAlgo data mode. Depth subscriptions may request a
|
|
6887
|
-
*
|
|
6887
|
+
* book depth (broker-dependent: 5/20/30/50).
|
|
6888
|
+
*
|
|
6889
|
+
* The wire key the proxy reads is `depth`; 1.x sent `depth_level`, which the
|
|
6890
|
+
* proxy never read, so every request above the default was silently served
|
|
6891
|
+
* at five levels. Both keys go out: `depth` for the proxy, `depth_level` for
|
|
6892
|
+
* any consumer that learned the old name from this library.
|
|
6888
6893
|
*/
|
|
6889
6894
|
declare function formatSubscribe(mode: WsMode, symbol: string, exchange: string, depthLevel?: number): string;
|
|
6890
6895
|
declare function formatUnsubscribe(mode: WsMode, symbol: string, exchange: string): string;
|