openalgo-charts 2.2.3 → 2.3.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,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, 85 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, 76.40 KB Brotli for the base engine, and a one-call widget tier that adds the toolbar, drawing rail, dialogs and shortcuts.
7
+ Professional interactive charts, 102 built-in indicators plus your own custom ones, 85 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, 76.46 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
  [![npm version](https://img.shields.io/npm/v/openalgo-charts.svg?color=cb3837&label=npm)](https://www.npmjs.com/package/openalgo-charts)
10
10
  [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
11
- [![bundle](https://img.shields.io/badge/brotli-76.40%20KB%20base%20%C2%B7%20213.14%20KB%20all%20tiers-brightgreen.svg)](#size-budget)
12
- [![tests](https://img.shields.io/badge/tests-5157%20passing-brightgreen.svg)](#develop)
11
+ [![bundle](https://img.shields.io/badge/brotli-76.46%20KB%20base%20%C2%B7%20214.99%20KB%20all%20tiers-brightgreen.svg)](#size-budget)
12
+ [![tests](https://img.shields.io/badge/tests-5182%20passing-brightgreen.svg)](#develop)
13
13
  [![dependencies](https://img.shields.io/badge/runtime%20deps-0-brightgreen.svg)](#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,14 +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.2.3**.
46
+ Current version: **2.3.1**.
47
47
 
48
- This release expands the drawing catalogue to 85 tools with pitchforks, regression
49
- channels, advanced Fibonacci and Gann geometry, and harmonic and Elliott patterns.
50
- It adds guided multi-point placement and an editable sample gallery while keeping
51
- saved drawing documents compatible. See the
52
- [drawing guide](https://marketcalls.github.io/openalgo-charts/docs/drawing-tools/)
53
- and the [2.2.3 changelog](./CHANGELOG.md#223).
48
+ This release fixes live data loading: a refresh no longer deletes the candle the
49
+ stream just completed when the broker's REST history has not published it yet.
50
+ See the [2.3.1 changelog](./CHANGELOG.md#231).
54
51
 
55
52
  ```bash
56
53
  npm install openalgo-charts
@@ -79,7 +76,7 @@ in front of npm rather than being places you upload to. A chart is one HTML file
79
76
  ```html
80
77
  <div id="chart" style="width:100vw;height:100vh"></div>
81
78
  <script type="module">
82
- import { createChart } from 'https://unpkg.com/openalgo-charts@2.2.3/dist/openalgo-charts.mjs';
79
+ import { createChart } from 'https://unpkg.com/openalgo-charts@2.3.1/dist/openalgo-charts.mjs';
83
80
  const chart = createChart(document.getElementById('chart'), { timezone: 'Asia/Kolkata' });
84
81
  chart.addSeries('candlestick').setData(bars);
85
82
  </script>
@@ -119,16 +116,16 @@ Import only what you use. Each tier is a separate bundle that registers into the
119
116
 
120
117
  | Import | Contents | Brotli |
121
118
  |---|---|---|
122
- | `openalgo-charts` | Engine, 13 chart types, panes &amp; scales, primitives, registries, chart state, chart linking, bar cache, interval registry, trading overlay, SVG export, render backend port, OpenAlgo feeds | 76.40 KB |
119
+ | `openalgo-charts` | Engine, 13 chart types, panes &amp; scales, primitives, registries, chart state, chart linking, bar cache, interval registry, trading overlay, SVG export, render backend port, OpenAlgo feeds | 76.46 KB |
123
120
  | `openalgo-charts/indicators` | 102 built-in indicators, the `registerIndicator` contract for your own, and the Tier-2 (external-data) contract | 28.19 KB |
124
121
  | `openalgo-charts/draw` | 85 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 34.53 KB |
125
- | `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point &amp; Figure, Kagi | 2.66 KB |
122
+ | `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point &amp; Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 4.44 KB |
126
123
  | `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 14.96 KB |
127
124
  | `openalgo-charts/trade` | Order / position / bracket tools + DOM ladder | 7.61 KB |
128
125
  | `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 |
129
126
  | `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 | 42.41 KB |
130
127
 
131
- Everything together is **213.14 KB Brotli**; a widget terminal (base + draw + indicators + widget, what one `createWidget` call loads) is 181.53 KB. Figures are measured from the 2.2.3 release build. The trade tier is listed as its delta over the base, so loading base + trade costs 84.01 KB.
128
+ Everything together is **214.99 KB Brotli**; a widget terminal (base + draw + indicators + widget, what one `createWidget` call loads) is 181.60 KB. Figures are measured from the 2.3.1 release build. The trade tier is listed as its delta over the base, so loading base + trade costs 84.07 KB.
132
129
 
133
130
  ## What's built
134
131
 
@@ -420,16 +417,16 @@ Enforced in CI by [`size-limit`](./.size-limit.json). Nothing is excluded, becau
420
417
 
421
418
  | Bundle | Limit | Actual |
422
419
  |---|---|---|
423
- | Base engine | 77 KB | 76.40 KB |
424
- | Base + trade | 85 KB | 84.01 KB |
420
+ | Base engine | 77 KB | 76.46 KB |
421
+ | Base + trade | 85 KB | 84.07 KB |
425
422
  | Indicators tier | 30 KB | 28.19 KB |
426
423
  | Draw tier | 36 KB | 34.53 KB |
427
- | Transform tier | 5 KB | 2.66 KB |
424
+ | Transform tier | 6 KB | 4.44 KB |
428
425
  | Profile tier | 15 KB | 14.96 KB |
429
426
  | WebGL2 tier | 7 KB | 6.38 KB |
430
427
  | Widget tier | 43 KB | 42.41 KB |
431
- | Widget terminal (base + draw + indicators + widget) | 183 KB | 181.53 KB |
432
- | **Everything** | 215 KB | 213.14 KB |
428
+ | Widget terminal (base + draw + indicators + widget) | 183 KB | 181.60 KB |
429
+ | **Everything** | 218 KB | 214.99 KB |
433
430
 
434
431
  ## Documentation
435
432
 
@@ -474,7 +471,7 @@ See [Contributing](./CONTRIBUTING.md) for setup, targeted checks, documentation
474
471
  ```bash
475
472
  npm install # install dev toolchain
476
473
  npm run typecheck # strict TypeScript check
477
- npm test # unit tests (vitest) - 5157 across 207 files
474
+ npm test # unit tests (vitest) - 5185 across 209 files
478
475
  npm run build # Rollup -> dist/ (minified ESM per tier + types)
479
476
  npm run size # size-limit (Brotli) against the budget
480
477
  npm run e2e # Playwright Chromium smoke tests
@@ -491,7 +488,7 @@ npm run verify # lint + typecheck + test + build + demo tests + dts + size +
491
488
 
492
489
  ## Status &amp; limitations
493
490
 
494
- Version **2.2.3**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
491
+ Version **2.3.1**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
495
492
 
496
493
  Known gaps, stated plainly:
497
494
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Library version string. Matches package.json (including locally prepared releases). */
2
- declare const VERSION = "2.2.3";
2
+ declare const VERSION = "2.3.1";
3
3
  /** Returns the current library version. */
4
4
  declare function version(): string;
5
5