openalgo-charts 2.7.4 → 2.7.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
@@ -12,7 +12,7 @@ with no runtime dependencies.
12
12
  [![npm version](https://img.shields.io/npm/v/openalgo-charts.svg?color=cb3837&label=npm)](https://www.npmjs.com/package/openalgo-charts)
13
13
  [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
14
14
  [![npm downloads](https://img.shields.io/npm/dm/openalgo-charts.svg?color=0ea5e9&label=npm%20downloads)](https://www.npmjs.com/package/openalgo-charts)
15
- [![tests](https://img.shields.io/badge/engine%20tests-12535%20passing-brightgreen.svg)](#develop)
15
+ [![tests](https://img.shields.io/badge/engine%20tests-12553%20passing-brightgreen.svg)](#develop)
16
16
  [![dependencies](https://img.shields.io/badge/runtime%20deps-0-brightgreen.svg)](#principles)
17
17
 
18
18
  [**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)
@@ -25,7 +25,7 @@ with no runtime dependencies.
25
25
  npm install openalgo-charts
26
26
  ```
27
27
 
28
- Current version: **2.7.4**. Pivot points in six level sets (Traditional, Fibonacci, Woodie, Classic, DeMark and Camarilla), and in the widget: rows a host adds to the right-click menu, an opt-in full screen button, a study's placement from its own menu, a choice of regular or extended hours where the feed serves both, and thirty timezones. 2.7.3 was a correctness release: saved drawings and layouts survive reloads, a second tab and a reopened layout; alerts fire across history refreshes; live candles follow the history they continue; the price axis labels only tradable prices; and orders and positions keep the exchange and product that identify them. 2.7.2 numbered Elliott wave counts from the point after their origin, as a count is read, with each label centred on its point, and 2.7.1 added the five Elliott wave counts, each drawn from its origin and labelled by degree, for 90 drawing tools.
28
+ Current version: **2.7.5**. Three reports fixed: a fit keeps the right offset its host configured, the widget's right-click menu has Reset view, and its dialogs move by their title bar. 2.7.4 added: Pivot points in six level sets (Traditional, Fibonacci, Woodie, Classic, DeMark and Camarilla), and in the widget: rows a host adds to the right-click menu, an opt-in full screen button, a study's placement from its own menu, a choice of regular or extended hours where the feed serves both, and thirty timezones. 2.7.3 was a correctness release: saved drawings and layouts survive reloads, a second tab and a reopened layout; alerts fire across history refreshes; live candles follow the history they continue; the price axis labels only tradable prices; and orders and positions keep the exchange and product that identify them. 2.7.2 numbered Elliott wave counts from the point after their origin, as a count is read, with each label centred on its point, and 2.7.1 added the five Elliott wave counts, each drawn from its origin and labelled by degree, for 90 drawing tools.
29
29
 
30
30
  2.6.4 was an order flow release: a footprint finds the imbalances beside a row that never traded, prints volume shaded by delta, alerts once when price comes back to a zone, extends only the zone kinds you pick, and takes a colour for each of its parts or one of six named themes; the website gains an Order flow page of live footprint and market profile examples. 2.6.3 was a finish release: finer glyphs at one line weight, a drawing rail that folds away, a smoother wheel and trackpad zoom, a widget whose drag keeps the price scale fitting, and a log scale that fills the pane. 2.6.2 was a fix for the bottom bar's ranges and Go to, which reported missing history across a weekend or another gap no session trades in. 2.6.1 was order flow analytics for the footprint (trade classification, a trade size filter, imbalance and delta views, zones, unfinished auctions, delta flips and session statistics), rows aligned on the even boundary, Renko and point and figure sizing from price or the ATR, and settings dialogs for both chart types in the widget and the reference host. 2.6.0 was analysis depth and a stricter API: the chart applies Heikin Ashi, Renko, range bars, line break, point and figure and Kagi to the bars you feed, live, with each study on the elements or the underlying bars; seven new built-ins and a timeframe input on 29 of them; symbol search through the OpenAlgo feed; rich event details with host actions; a typed event map for `chart.on`; a classic-script build of every tier and `require()` of the ESM files; and declarations that hold for a host compiling with both strict flags. 2.5.10 was the persistence, saved layouts and chart grid release.
31
31
  See the [changelog](./CHANGELOG.md) for release notes.
@@ -119,7 +119,7 @@ You can also load the library from a CDN in a plain HTML page:
119
119
  ```html
120
120
  <div id="chart" style="width:100vw;height:100vh"></div>
121
121
  <script type="module">
122
- import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.7.4/dist/openalgo-charts.mjs';
122
+ import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.7.5/dist/openalgo-charts.mjs';
123
123
  const chart = createChart(document.getElementById('chart'), { timezone: 'Asia/Kolkata' });
124
124
  chart.addSeries('candlestick').setData(generateBars(1700000000, 200, 3600));
125
125
  chart.fitContent();
@@ -181,17 +181,17 @@ Unused optional tiers stay out of the base chart download.
181
181
 
182
182
  | Import | Contents | Brotli |
183
183
  |---|---|---|
184
- | `openalgo-charts` | Engine, 13 chart types, panes and scales, custom indicator registry, primitives, alerts, replay, comparisons, chart linking, state, feeds, bar cache, trading overlays, CSV and SVG export | 141.91 kB |
184
+ | `openalgo-charts` | Engine, 13 chart types, panes and scales, custom indicator registry, primitives, alerts, replay, comparisons, chart linking, state, feeds, bar cache, trading overlays, CSV and SVG export | 141.95 kB |
185
185
  | `openalgo-charts/indicators` | 113 built-in indicators, calculation helpers and helpers for studies that use external data | 46.00 kB |
186
186
  | `openalgo-charts/draw` | 90 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 61.86 kB |
187
187
  | `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point &amp; Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 6.55 kB |
188
188
  | `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 20.96 kB |
189
189
  | `openalgo-charts/trade` | Order, position and bracket tools, account state, order preview and position commands, plus a depth-of-market ladder | 17.29 kB |
190
190
  | `openalgo-charts/webgl` | GPU drawing for supported series, with Canvas 2D fallback | 6.99 kB |
191
- | `openalgo-charts/widget` | `createWidget`: toolbar, bottom bar, Data, Objects, Watchlist and News dock, account summary, symbol search, dialogs, mobile controls, a shortcuts editor, saved layouts, the chart grid (`createChartGrid`) and optional persistence in IndexedDB | 132.36 kB |
191
+ | `openalgo-charts/widget` | `createWidget`: toolbar, bottom bar, Data, Objects, Watchlist and News dock, account summary, symbol search, dialogs, mobile controls, a shortcuts editor, saved layouts, the chart grid (`createChartGrid`) and optional persistence in IndexedDB | 132.91 kB |
192
192
  | `openalgo-charts/workspace` | Validated workspace and indicator-template documents, named watchlists, named catalogs with revision checks, asynchronous storage and an IndexedDB adapter; no DOM | 11.89 kB |
193
193
 
194
- Everything together is **445.81 kB Brotli**; a widget terminal with built-in indicators (base + draw + indicators + widget) is 382.13 kB. The widget's eight first-use parts (the shortcuts editor, the Layouts menu, the templates list, the chart data dialog, the chart type settings dialog, the grid bar and its menus, and the IndexedDB store) add 21.04 kB in files of their own, fetched only when a widget first uses one. The nine classic-script files together are 459.54 kB. Figures are measured from the 2.7.3 release build. The trade tier is 17.29 kB on its own; base + trade costs 159.19 kB. Sizes use decimal kB.
194
+ Everything together is **446.40 kB Brotli**; a widget terminal with built-in indicators (base + draw + indicators + widget) is 382.72 kB. The widget's eight first-use parts (the shortcuts editor, the Layouts menu, the templates list, the chart data dialog, the chart type settings dialog, the grid bar and its menus, and the IndexedDB store) add 21.04 kB in files of their own, fetched only when a widget first uses one. The nine classic-script files together are 460.03 kB. Figures are measured from the 2.7.3 release build. The trade tier is 17.29 kB on its own; base + trade costs 159.24 kB. Sizes use decimal kB.
195
195
 
196
196
  ## What's built
197
197
 
@@ -517,19 +517,19 @@ Enforced in CI by [`size-limit`](./.size-limit.json). Nothing is excluded, becau
517
517
 
518
518
  | Bundle | Limit | Actual |
519
519
  |---|---|---|
520
- | Base engine | 141.91 kB | 141.91 kB |
521
- | Base + trade | 159.20 kB | 159.19 kB |
520
+ | Base engine | 141.95 kB | 141.95 kB |
521
+ | Base + trade | 159.24 kB | 159.24 kB |
522
522
  | Indicators tier | 46.01 kB | 46.00 kB |
523
523
  | Draw tier | 61.86 kB | 61.86 kB |
524
524
  | Transform tier | 6.56 kB | 6.55 kB |
525
525
  | Profile tier | 20.97 kB | 20.96 kB |
526
526
  | WebGL2 tier | 6.99 kB | 6.99 kB |
527
- | Widget tier | 132.36 kB | 132.36 kB |
527
+ | Widget tier | 132.91 kB | 132.91 kB |
528
528
  | Widget first-use parts (eight files beside the widget tier) | 21.05 kB | 21.04 kB |
529
- | Widget terminal (base + draw + indicators + widget) | 382.13 kB | 382.13 kB |
529
+ | Widget terminal (base + draw + indicators + widget) | 382.73 kB | 382.72 kB |
530
530
  | Workspace tier | 11.89 kB | 11.89 kB |
531
- | Script tags (the nine classic-script files) | 459.55 kB | 459.54 kB |
532
- | **Everything** | 445.81 kB | 445.81 kB |
531
+ | Script tags (the nine classic-script files) | 460.03 kB | 460.03 kB |
532
+ | **Everything** | 446.40 kB | 446.40 kB |
533
533
 
534
534
  ## Documentation
535
535
 
@@ -580,7 +580,7 @@ See [Contributing](./CONTRIBUTING.md) for setup, targeted checks, documentation
580
580
  ```bash
581
581
  npm install # install dev toolchain
582
582
  npm run typecheck # TypeScript: src with the stricter flags, then the tests
583
- npm test # engine unit tests (Vitest): 12535 across 563 files
583
+ npm test # engine unit tests (Vitest): 12553 across 564 files
584
584
  npm run test:demo # reference-host tests: 740 across 69 files
585
585
  npm run test:endurance # node endurance-harness tests: 7 cases
586
586
  npm run build # Rollup -> dist/ (minified ESM per tier + types)
@@ -601,7 +601,7 @@ npm run verify # lint + types + cycles + unused exports + unit + endurance h
601
601
 
602
602
  ## Status &amp; limitations
603
603
 
604
- Version **2.7.4**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
604
+ Version **2.7.5**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
605
605
 
606
606
  Known gaps, stated plainly:
607
607
 
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.7.4";
2
+ declare const VERSION = "2.7.5";
3
3
  /** Returns the current library version. */
4
4
  declare function version(): string;
5
5
 
@@ -435,6 +435,8 @@ declare const DEFAULT_TIME_SCALE_OPTIONS: TimeScaleOptions;
435
435
  declare class TimeScale {
436
436
  private _barSpacing;
437
437
  private _rightOffset;
438
+ /** The host's configured gap, which a fit returns to; a pan moves `_rightOffset` only. */
439
+ private readonly _fitRightOffset;
438
440
  private readonly _minBarSpacing;
439
441
  private readonly _maxBarSpacing;
440
442
  private _width;