openalgo-charts 2.5.8 → 2.5.9
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 +37 -24
- package/dist/draw/index.d.ts +552 -164
- package/dist/index.d.ts +115 -23
- package/dist/openalgo-charts.draw.mjs +1 -1
- package/dist/openalgo-charts.draw.mjs.map +1 -1
- package/dist/openalgo-charts.mjs +1 -1
- package/dist/openalgo-charts.mjs.map +1 -1
- package/dist/openalgo-charts.standalone.js +1 -1
- package/dist/openalgo-charts.standalone.js.map +1 -1
- package/dist/openalgo-charts.transform.mjs +1 -1
- package/dist/openalgo-charts.transform.mjs.map +1 -1
- package/dist/openalgo-charts.webgl.mjs +1 -1
- package/dist/openalgo-charts.webgl.mjs.map +1 -1
- package/dist/openalgo-charts.widget.mjs +1 -1
- package/dist/openalgo-charts.widget.mjs.map +1 -1
- package/dist/openalgo-charts.workspace.mjs +1 -1
- package/dist/openalgo-charts.workspace.mjs.map +1 -1
- package/dist/webgl/index.d.ts +33 -13
- package/dist/widget/index.d.ts +288 -153
- package/dist/workspace/index.d.ts +116 -1
- package/package.json +4 -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.5.
|
|
28
|
+
Current version: **2.5.9**, drawing interaction and replay: drawings belong to the instrument they were drawn on, the magnet works on every pane and in every drag, box select, drag to copy, an eraser, a temporary measure and visibility per interval join the drawing controller, the widget adds a floating drawing toolbar, style templates and a coordinates tab, replay's forming bar stays inside the bar it closes on (and can form over simulated steps where no finer data exists), and lines reach the edges of the view. 2.5.8 was the rendering performance release.
|
|
29
29
|
See the [changelog](./CHANGELOG.md) for release notes.
|
|
30
30
|
|
|
31
31
|
## Quick start
|
|
@@ -54,9 +54,16 @@ Bar timestamps use UTC seconds. See [getting started](./docs/getting-started.md)
|
|
|
54
54
|
for setup, [data feeds](https://marketcalls.github.io/openalgo-charts/docs/data-feeds/)
|
|
55
55
|
for live data, or [the widget example](#the-whole-terminal-in-one-call) for chart controls.
|
|
56
56
|
|
|
57
|
+
In a framework, create the chart when the component mounts and call `chart.destroy()`
|
|
58
|
+
when it unmounts. [Framework integration](https://marketcalls.github.io/openalgo-charts/docs/frameworks/)
|
|
59
|
+
covers React, Next.js, Angular and Svelte. The [Vue 3 guide](https://marketcalls.github.io/openalgo-charts/docs/vue/)
|
|
60
|
+
has a composable and a component tested in Chromium, Firefox and WebKit, with a
|
|
61
|
+
no-build example in [`examples/vue`](./examples/vue). In Vue, hold the chart in a
|
|
62
|
+
`shallowRef`, never in `ref()` or `reactive()`.
|
|
63
|
+
|
|
57
64
|
## Architecture
|
|
58
65
|
|
|
59
|
-
<a href="docs/architecture-diagram.svg"><img src="docs/architecture-diagram.svg" alt="OpenAlgo Charts 2.5.
|
|
66
|
+
<a href="docs/architecture-diagram.svg"><img src="docs/architecture-diagram.svg" alt="OpenAlgo Charts 2.5.9 architecture: host responsibilities, the base data-to-rendering pipeline with alerts and shared replay, and eight optional tiers including workspace storage, trading tools and the widget" width="920" /></a>
|
|
60
67
|
|
|
61
68
|
How data reaches the chart, what your app owns, and which features you can import.
|
|
62
69
|
[Open the full-size diagram](docs/architecture-diagram.svg).
|
|
@@ -107,7 +114,7 @@ You can also load the library from a CDN in a plain HTML page:
|
|
|
107
114
|
```html
|
|
108
115
|
<div id="chart" style="width:100vw;height:100vh"></div>
|
|
109
116
|
<script type="module">
|
|
110
|
-
import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.5.
|
|
117
|
+
import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.5.9/dist/openalgo-charts.mjs';
|
|
111
118
|
const chart = createChart(document.getElementById('chart'), { timezone: 'Asia/Kolkata' });
|
|
112
119
|
chart.addSeries('candlestick').setData(generateBars(1700000000, 200, 3600));
|
|
113
120
|
chart.fitContent();
|
|
@@ -165,17 +172,17 @@ Unused optional tiers stay out of the base chart download.
|
|
|
165
172
|
|
|
166
173
|
| Import | Contents | Brotli |
|
|
167
174
|
|---|---|---|
|
|
168
|
-
| `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 |
|
|
175
|
+
| `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 | 131.68 kB |
|
|
169
176
|
| `openalgo-charts/indicators` | 105 built-in indicators, calculation helpers and helpers for studies that use external data | 40.38 kB |
|
|
170
|
-
| `openalgo-charts/draw` | 87 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons |
|
|
171
|
-
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 4.
|
|
177
|
+
| `openalgo-charts/draw` | 87 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 55.61 kB |
|
|
178
|
+
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 4.56 kB |
|
|
172
179
|
| `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 14.96 kB |
|
|
173
180
|
| `openalgo-charts/trade` | Order, position and bracket tools, account state, order preview and position commands, plus a depth-of-market ladder | 16.69 kB |
|
|
174
|
-
| `openalgo-charts/webgl` | GPU drawing for supported series, with Canvas 2D fallback | 6.
|
|
175
|
-
| `openalgo-charts/widget` | `createWidget`: toolbar, Data, Objects, Watchlist and News dock, account summary, symbol search, dialogs, mobile controls, shortcuts and optional layout persistence |
|
|
176
|
-
| `openalgo-charts/workspace` | Validated workspace and indicator-template documents, named watchlists, named catalogs with revision checks, asynchronous storage and an IndexedDB adapter; no DOM |
|
|
181
|
+
| `openalgo-charts/webgl` | GPU drawing for supported series, with Canvas 2D fallback | 6.93 kB |
|
|
182
|
+
| `openalgo-charts/widget` | `createWidget`: toolbar, Data, Objects, Watchlist and News dock, account summary, symbol search, dialogs, mobile controls, shortcuts and optional layout persistence | 99.64 kB |
|
|
183
|
+
| `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.33 kB |
|
|
177
184
|
|
|
178
|
-
Everything together is **
|
|
185
|
+
Everything together is **381.78 kB Brotli**; a widget terminal with built-in indicators (base + draw + indicators + widget) is 327.32 kB. Figures are measured from the 2.5.9 release build. The trade tier is 16.69 kB on its own; base + trade costs 148.36 kB. Sizes use decimal kB.
|
|
179
186
|
|
|
180
187
|
## What's built
|
|
181
188
|
|
|
@@ -501,17 +508,17 @@ Enforced in CI by [`size-limit`](./.size-limit.json). Nothing is excluded, becau
|
|
|
501
508
|
|
|
502
509
|
| Bundle | Limit | Actual |
|
|
503
510
|
|---|---|---|
|
|
504
|
-
| Base engine |
|
|
505
|
-
| Base + trade |
|
|
511
|
+
| Base engine | 131.68 kB | 131.68 kB |
|
|
512
|
+
| Base + trade | 148.37 kB | 148.36 kB |
|
|
506
513
|
| Indicators tier | 40.39 kB | 40.38 kB |
|
|
507
|
-
| Draw tier |
|
|
508
|
-
| Transform tier | 6 kB | 4.
|
|
514
|
+
| Draw tier | 55.62 kB | 55.61 kB |
|
|
515
|
+
| Transform tier | 6 kB | 4.56 kB |
|
|
509
516
|
| Profile tier | 15 kB | 14.96 kB |
|
|
510
|
-
| WebGL2 tier | 7 kB | 6.
|
|
511
|
-
| Widget tier |
|
|
512
|
-
| Widget terminal (base + draw + indicators + widget) |
|
|
513
|
-
| Workspace tier |
|
|
514
|
-
| **Everything** |
|
|
517
|
+
| WebGL2 tier | 7 kB | 6.93 kB |
|
|
518
|
+
| Widget tier | 99.65 kB | 99.64 kB |
|
|
519
|
+
| Widget terminal (base + draw + indicators + widget) | 327.32 kB | 327.32 kB |
|
|
520
|
+
| Workspace tier | 11.34 kB | 11.33 kB |
|
|
521
|
+
| **Everything** | 381.79 kB | 381.78 kB |
|
|
515
522
|
|
|
516
523
|
## Documentation
|
|
517
524
|
|
|
@@ -536,7 +543,7 @@ Teach your AI coding assistant this library:
|
|
|
536
543
|
npx skills add https://github.com/marketcalls/openalgo-charts
|
|
537
544
|
```
|
|
538
545
|
|
|
539
|
-
Installs six skills from [`.github/skills/`](./.github/skills) - a reference hub with
|
|
546
|
+
Installs six skills from [`.github/skills/`](./.github/skills) - a reference hub with 26 deep-dive files covering the whole API surface and its foot-guns, plus task skills for scaffolding a chart, adding indicators, building a terminal, writing a plugin, and debugging. Works with Claude Code, Cursor, Codex, Copilot, Gemini CLI and the rest of the `skills` CLI's supported agents.
|
|
540
547
|
|
|
541
548
|
## Examples
|
|
542
549
|
|
|
@@ -549,6 +556,12 @@ cd examples/yfinance && pip install -r requirements.txt && python server.py
|
|
|
549
556
|
python server.py --fixture # no yfinance, no network: deterministic synthetic bars
|
|
550
557
|
```
|
|
551
558
|
|
|
559
|
+
A **Vue 3 example** ([`examples/vue`](./examples/vue)) runs with no build step from Vue's
|
|
560
|
+
browser build: a composable, a component with symbol, interval and theme props, a bare
|
|
561
|
+
chart and the widget under one `KeepAlive`, and a switch that unmounts both. Serve the
|
|
562
|
+
repository root after `npm run build` (for example `node tests/e2e/serve.cjs`) and open
|
|
563
|
+
`/examples/vue/index.html`.
|
|
564
|
+
|
|
552
565
|
## Develop
|
|
553
566
|
|
|
554
567
|
See [Contributing](./CONTRIBUTING.md) for setup, targeted checks, documentation updates and the release workflow.
|
|
@@ -556,8 +569,8 @@ See [Contributing](./CONTRIBUTING.md) for setup, targeted checks, documentation
|
|
|
556
569
|
```bash
|
|
557
570
|
npm install # install dev toolchain
|
|
558
571
|
npm run typecheck # strict TypeScript check
|
|
559
|
-
npm test # engine unit tests (Vitest):
|
|
560
|
-
npm run test:demo # reference-host tests:
|
|
572
|
+
npm test # engine unit tests (Vitest): 9803 across 442 files
|
|
573
|
+
npm run test:demo # reference-host tests: 668 across 63 files
|
|
561
574
|
npm run test:endurance # node endurance-harness tests: 7 cases
|
|
562
575
|
npm run build # Rollup -> dist/ (minified ESM per tier + types)
|
|
563
576
|
npm run size # size-limit (Brotli) against the budget
|
|
@@ -577,7 +590,7 @@ npm run verify # lint + types + unit + endurance harness + build + demo + dt
|
|
|
577
590
|
|
|
578
591
|
## Status & limitations
|
|
579
592
|
|
|
580
|
-
Version **2.5.
|
|
593
|
+
Version **2.5.9**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
|
|
581
594
|
|
|
582
595
|
Known gaps, stated plainly:
|
|
583
596
|
|