openalgo-charts 2.6.9 → 2.7.0
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 +17 -17
- package/dist/draw/index.d.ts +33 -12
- package/dist/index.d.ts +1 -1
- package/dist/openalgo-charts.draw.mjs +1 -1
- package/dist/openalgo-charts.draw.mjs.map +1 -1
- package/dist/openalgo-charts.draw.standalone.js +1 -1
- package/dist/openalgo-charts.mjs +1 -1
- package/dist/openalgo-charts.standalone.js +1 -1
- package/dist/openalgo-charts.widget.mjs +1 -1
- package/dist/openalgo-charts.widget.mjs.map +1 -1
- package/dist/openalgo-charts.widget.standalone.js +1 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ with no runtime dependencies.
|
|
|
12
12
|
[](https://www.npmjs.com/package/openalgo-charts)
|
|
13
13
|
[](./LICENSE)
|
|
14
14
|
[](https://www.npmjs.com/package/openalgo-charts)
|
|
15
|
-
[](#develop)
|
|
16
16
|
[](#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.
|
|
28
|
+
Current version: **2.7.0**, a finish release. The drawing tool icons are redrawn around their anchors: every point you place is an open ring and a line stops at its edge, so a trend line, a ray and an extended line are told apart by their rings, and patterns, channels, positions and the Fibonacci and Gann studies show the points that set them. The widget's rail keeps its tools in view in a short chart, a failed load is reported once with its retry, and reduced motion stops every animation. No tool, option or export is added or removed. 2.6.9 was a security release for the build toolchain and the documentation site, over 2.6.8, which made volume studies work on price-driven charts.
|
|
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.
|
|
122
|
+
import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.7.0/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 | 140.
|
|
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 | 140.10 kB |
|
|
185
185
|
| `openalgo-charts/indicators` | 112 built-in indicators, calculation helpers and helpers for studies that use external data | 44.85 kB |
|
|
186
|
-
| `openalgo-charts/draw` | 87 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons |
|
|
186
|
+
| `openalgo-charts/draw` | 87 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 59.60 kB |
|
|
187
187
|
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 6.38 kB |
|
|
188
188
|
| `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 20.83 kB |
|
|
189
189
|
| `openalgo-charts/trade` | Order, position and bracket tools, account state, order preview and position commands, plus a depth-of-market ladder | 16.88 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 |
|
|
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 | 129.56 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.73 kB |
|
|
193
193
|
|
|
194
|
-
Everything together is **
|
|
194
|
+
Everything together is **436.91 kB Brotli**; a widget terminal with built-in indicators (base + draw + indicators + widget) is 374.10 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.00 kB in files of their own, fetched only when a widget first uses one. The nine classic-script files together are 450.64 kB. Figures are measured from the 2.7.0 release build. The trade tier is 16.88 kB on its own; base + trade costs 156.98 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 | 140.14 kB | 140.
|
|
521
|
-
| Base + trade | 157.02 kB |
|
|
520
|
+
| Base engine | 140.14 kB | 140.10 kB |
|
|
521
|
+
| Base + trade | 157.02 kB | 156.98 kB |
|
|
522
522
|
| Indicators tier | 44.86 kB | 44.85 kB |
|
|
523
|
-
| Draw tier |
|
|
523
|
+
| Draw tier | 59.60 kB | 59.60 kB |
|
|
524
524
|
| Transform tier | 6.39 kB | 6.38 kB |
|
|
525
525
|
| Profile tier | 20.83 kB | 20.83 kB |
|
|
526
526
|
| WebGL2 tier | 6.99 kB | 6.99 kB |
|
|
527
|
-
| Widget tier |
|
|
527
|
+
| Widget tier | 129.56 kB | 129.56 kB |
|
|
528
528
|
| Widget first-use parts (eight files beside the widget tier) | 21.00 kB | 21.00 kB |
|
|
529
|
-
| Widget terminal (base + draw + indicators + widget) |
|
|
529
|
+
| Widget terminal (base + draw + indicators + widget) | 374.10 kB | 374.10 kB |
|
|
530
530
|
| Workspace tier | 11.73 kB | 11.73 kB |
|
|
531
|
-
| Script tags (the nine classic-script files) |
|
|
532
|
-
| **Everything** |
|
|
531
|
+
| Script tags (the nine classic-script files) | 450.64 kB | 450.64 kB |
|
|
532
|
+
| **Everything** | 436.91 kB | 436.91 kB |
|
|
533
533
|
|
|
534
534
|
## Documentation
|
|
535
535
|
|
|
@@ -580,8 +580,8 @@ 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):
|
|
584
|
-
npm run test:demo # reference-host tests:
|
|
583
|
+
npm test # engine unit tests (Vitest): 12042 across 527 files
|
|
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)
|
|
587
587
|
npm run size # size-limit (Brotli) against the budget
|
|
@@ -601,7 +601,7 @@ npm run verify # lint + types + cycles + unused exports + unit + endurance h
|
|
|
601
601
|
|
|
602
602
|
## Status & limitations
|
|
603
603
|
|
|
604
|
-
Version **2.
|
|
604
|
+
Version **2.7.0**. 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/draw/index.d.ts
CHANGED
|
@@ -2389,16 +2389,38 @@ declare const DEFAULT_FIB_TIME_ZONE: readonly FibLevel[];
|
|
|
2389
2389
|
* chrome grid, so the ink stops short of the box. Without it, glyphs that
|
|
2390
2390
|
* happen to reach the edge look larger than their neighbours and the rail
|
|
2391
2391
|
* reads as ragged.
|
|
2392
|
-
* - **
|
|
2393
|
-
* of glyphs shares its anchor points, so siblings
|
|
2392
|
+
* - **Whole units for chrome, half units for tools.** Parallel strokes keep
|
|
2393
|
+
* an even gap and a family of glyphs shares its anchor points, so siblings
|
|
2394
|
+
* line up in a list. A 16px box has room for whole units and no more. The
|
|
2395
|
+
* tool glyphs are authored on half units, and a stroke cut back to the
|
|
2396
|
+
* edge of an anchor lands wherever its angle puts it, to two decimals.
|
|
2397
|
+
* Through 2.6.9 the tools sat on whole units too, a rule made for a
|
|
2398
|
+
* 2-unit line shown at 24px, where a unit was a device pixel. At 20px a
|
|
2399
|
+
* unit is five sixths of a pixel and nothing lands on one, so the rule
|
|
2400
|
+
* bought no sharpness and cost every glyph its proportions: no corner
|
|
2401
|
+
* could be rounded, no line could stop short of a mark, and every slope
|
|
2402
|
+
* was one of a handful.
|
|
2394
2403
|
* - **One stroke weight.** Different weights across identically sized boxes
|
|
2395
2404
|
* is the single most visible tell of a set assembled rather than drawn.
|
|
2405
|
+
* - **An anchor is an open ring, and a line stops at it.** A tool glyph is
|
|
2406
|
+
* its drawing as the chart shows it selected, in miniature: the layer
|
|
2407
|
+
* paints each point the user placed as a hollow handle, so the glyph
|
|
2408
|
+
* draws each as a ring of radius 2 and ends its strokes on the ring's
|
|
2409
|
+
* edge. The rings carry the reading: two at the ends are a segment, one
|
|
2410
|
+
* at the start is a ray, two inside a line that runs on are an extended
|
|
2411
|
+
* line, and one at each pivot is a pattern, a size smaller there so five
|
|
2412
|
+
* of them fit. Through 2.6.9 an anchor was a dot of radius 1 with the line run
|
|
2413
|
+
* into it, which at 20px was a blot three pixels across on the end of a
|
|
2414
|
+
* stroke: too small to read as a point, and the same ink as the line.
|
|
2415
|
+
* - **Corners are rounded.** A box, a bubble or a tag turns its corners on
|
|
2416
|
+
* a radius of 1.5 to 2, so a frame reads as a drawn object and not as a
|
|
2417
|
+
* table cell. The round join alone gave a radius of half the line.
|
|
2396
2418
|
* - **The whole glyph in its path.** The marks that tell siblings apart (a
|
|
2397
|
-
* segment ends in two
|
|
2398
|
-
* are
|
|
2399
|
-
*
|
|
2400
|
-
*
|
|
2401
|
-
*
|
|
2419
|
+
* segment ends in two rings, a ray starts at one, a path ends in a head)
|
|
2420
|
+
* are drawn in the path itself, so a host that renders the path data and
|
|
2421
|
+
* nothing else still gets every one of them. An accent registry repeats
|
|
2422
|
+
* the few marks meant solid (a magnet's poles) for a fill on top, which
|
|
2423
|
+
* adds weight, never identity.
|
|
2402
2424
|
*
|
|
2403
2425
|
* # Rendering
|
|
2404
2426
|
*
|
|
@@ -2447,14 +2469,13 @@ declare const ICON_ATTRS: {
|
|
|
2447
2469
|
*
|
|
2448
2470
|
* Values are the `d` attribute of one `<path>`. Multiple subpaths are joined
|
|
2449
2471
|
* into the same string rather than split across elements, so a host renders one
|
|
2450
|
-
* node per glyph, and that node is the whole glyph: its
|
|
2451
|
-
* the string
|
|
2452
|
-
* host that also wants them filled.
|
|
2472
|
+
* node per glyph, and that node is the whole glyph: its rings and heads are in
|
|
2473
|
+
* the string. `DRAWING_TOOL_ACCENTS` repeats the marks a host may also fill.
|
|
2453
2474
|
*/
|
|
2454
2475
|
declare const DRAWING_TOOL_ICONS: Readonly<Record<string, string>>;
|
|
2455
2476
|
/**
|
|
2456
|
-
* The fills of the tool glyphs' marks, by tool id: anchor
|
|
2457
|
-
*
|
|
2477
|
+
* The fills of the tool glyphs' solid marks, by tool id. Optional: an anchor
|
|
2478
|
+
* is an open ring and takes no fill, so nearly every glyph has none.
|
|
2458
2479
|
*
|
|
2459
2480
|
* Every mark here is also drawn, as an outline, in the glyph's own path, so a
|
|
2460
2481
|
* host that renders only `DRAWING_TOOL_ICONS` still shows each one. This adds
|
package/dist/index.d.ts
CHANGED