traderead-charts 1.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,35 @@
1
+ # Changelog
2
+
3
+ ## 1.1.0 — 2026-09-13
4
+
5
+ First npm release (`npm install traderead-charts`). Since 1.0.0:
6
+
7
+ - **Mobile**: fullscreen host-override + iOS fake-fullscreen fallback,
8
+ scrollable tool rail in short frames, price/time axis drag zoom,
9
+ one-finger vertical pan of the price pane, menus close on outside tap.
10
+ - **Small embeds**: type menu and indicator panel clamp inside the frame,
11
+ pane titles clear the tool rail, compact logo under 560px that slides
12
+ aside when the rail would overlap it.
13
+ - **Attribution**: the badge link carries `utm_source=widget`; hosts can
14
+ override it via the `logoHref` option.
15
+
16
+ ## 1.0.0 — 7 Sep 2026
17
+ First production release. The engine renders every chart on
18
+ traderead.ai: the interactive widget, the AI-read captures and the
19
+ images posted to X.
20
+
21
+ Built from first principles in the week of 5–7 Sep 2026:
22
+ - Candles, hollow candles, Heikin Ashi, OHLC bars, line, area, baseline
23
+ - Oscillator sub-panes with own scales, titles, guides, draggable separators
24
+ - Built-in indicators (multi EMA/SMA, VWAP, Bollinger, RSI, MACD, Stochastic)
25
+ with a TradingView-style panel: add, remove, rename, recolor, edit params
26
+ - Drawing set: trend, horizontal, rectangle, Fibonacci, text — two-click or
27
+ drag, select/move/resize, floating style bar, per-key persistence
28
+ - Symbol search by ticker or name with a pluggable data source
29
+ - Live `tick()` with the bucket roll built in; `prependBars` lazy history
30
+ with time-anchored drawings; explicit `setTimeframe`
31
+ - Momentum pan, cursor-anchored zoom, price-axis vertical zoom, fit
32
+ - Legend with live values, per-pane titles, last-value axis tags
33
+ - Share (Web Share / clipboard), snapshot preview (no auto-download),
34
+ fullscreen, light & dark themes, `resample()` for custom timeframes
35
+ - Edition gate (`maxIndicators`) for open-core Standard/Pro builds
package/LICENSE.md ADDED
@@ -0,0 +1,30 @@
1
+ # TradeRead Community License 1.0
2
+
3
+ Copyright (c) 2026 Marcel Todea / TradeRead — https://traderead.ai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a
6
+ copy of this software and associated files (the "Software"), to use,
7
+ copy, modify, merge, publish, distribute and sublicense the Software,
8
+ including for commercial purposes, subject to the following conditions:
9
+
10
+ 1. **Attribution mark.** Any publicly accessible page, application,
11
+ screenshot or image that displays charts rendered by the Software
12
+ must visibly show the TradeRead mark and name as rendered by the
13
+ Software's built-in badge, or an equivalent clearly visible notice
14
+ "Charts by TradeRead" linking to https://traderead.ai. Hiding,
15
+ removing or obscuring the badge without providing the equivalent
16
+ notice suspends the rights granted here for as long as the breach
17
+ continues; the rights resume when compliance is restored.
18
+ 2. **Notices.** The above copyright notice and this license text shall
19
+ be included in all copies or substantial portions of the Software.
20
+ 3. **No trademark grant.** "TradeRead" and the TradeRead mark identify
21
+ the origin of the Software. This license grants no right to use them
22
+ beyond the attribution required by condition 1, and none to suggest
23
+ endorsement of derived products.
24
+ 4. **No warranty.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
25
+ OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
26
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE
29
+ SOFTWARE OR ITS USE. Nothing rendered by the Software constitutes
30
+ financial advice.
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # TradeRead Charts
2
+
3
+ **A complete financial charting widget for JavaScript — not just an engine.**
4
+ Candlestick charts, technical indicators with a TradingView-style panel,
5
+ drawing tools, symbol search, light/dark themes: everything included, zero
6
+ dependencies, one `<script>` tag. A free, self-hosted alternative to
7
+ TradingView's Lightweight Charts™ for anyone who wants the whole widget,
8
+ not a bare canvas.
9
+
10
+ ![TradeRead Charts — candlesticks, EMA overlays, RSI and MACD panes, live legend](docs/media/screenshot.png)
11
+
12
+ - 🕯️ 7 chart types: candles, hollow candles, Heikin Ashi, OHLC bars, line, area, baseline
13
+ - 📊 Built-in indicators: unlimited EMAs/SMAs, VWAP, Bollinger, RSI, MACD, Stochastic — add, remove, rename, recolor from the bundled panel
14
+ - ✏️ Drawing tools: trend line, horizontal, rectangle, Fibonacci retracement, text — move, resize, style, persisted per symbol
15
+ - 🔎 Symbol search by ticker **or name**, with a pluggable data source (keyless Binance adapter included)
16
+ - 📱 Touch-first: pinch zoom, one-finger drawing, momentum scrolling
17
+ - 🌗 Light & dark themes, live-switchable
18
+ - ⚡ 50,000 candles load in ~1.4 ms; dense repaint under 1 ms
19
+ - 🏭 In production on [traderead.ai](https://traderead.ai/?utm_source=github) — the interactive widget, the AI-read captures and every chart posted to X
20
+
21
+ A financial charting engine built from first principles by TradeRead —
22
+ candlesticks, volume, overlays, crosshair, inertia-free pan/zoom, touch,
23
+ high-DPI rendering. No third-party rendering code: every line in `src/`
24
+ is original TradeRead work, written from public behavior specifications,
25
+ so the engine is TradeRead intellectual property in full.
26
+
27
+ **Status: 1.0.0 — in production.** Since 7 Sep 2026 this engine renders
28
+ every chart on [traderead.ai](https://traderead.ai/?utm_source=github): the interactive
29
+ widget, the AI-read captures and the images posted to X. Candles, volume, line overlays (EMA/VWAP/Bollinger),
30
+ oscillator sub-panes (RSI/MACD/Stochastic) with per-pane scales and
31
+ guides, the full drawing set (trend, horizontal, rectangle, Fibonacci
32
+ retracement, text) with selection, move, resize, delete and per-key
33
+ persistence, adaptive price/time scales, pane-aware crosshair,
34
+ wheel/trackpad/drag/touch navigation, light & dark palettes, live bar
35
+ updates, built-in TradeRead mark.
36
+
37
+ Hard-won rules carried over from the production widget: drawings anchor
38
+ to (time, price) because lazy history prepends bars and shifts indices;
39
+ the price pane autoscales from bars alone so a distant EMA cannot squash
40
+ the candles; persisted JSON strips cached text widths; Delete never
41
+ fires while a form field has focus.
42
+
43
+ ## The plus over a bare engine
44
+
45
+ `ui: true` (the default) mounts the complete widget, not just a canvas:
46
+ the drawing rail, a TradingView-style indicator panel (any number of
47
+ EMAs/SMAs, VWAP, Bollinger, RSI, MACD, Stochastic — add, remove, edit
48
+ params, all persisted per key), a chart-type menu (seven types,
49
+ Heikin Ashi included) and a PNG snapshot that opens a preview with explicit Download / Copy actions — nothing downloads by itself. Hosts that want only the
50
+ engine pass `ui: false` and drive the same APIs themselves.
51
+
52
+ ## Quick start
53
+
54
+ ```html
55
+ <script src="src/traderead-charts.js"></script>
56
+ <div id="chart" style="width:800px;height:480px"></div>
57
+ <script>
58
+ const chart = TRCharts.createChart(document.getElementById("chart"));
59
+ chart.setData(bars); // [{time, open, high, low, close, volume}]
60
+ chart.addLine("ema20", ema20); // [{time, value}]
61
+ chart.update(lastBar); // live tick
62
+ </script>
63
+ ```
64
+
65
+ ## Roadmap to parity with the production widget
66
+ - [x] Sub-panes (RSI / MACD / Stochastic)
67
+ - [x] Drawing set with selection, move, resize, persistence
68
+ - [x] Light theme palette
69
+ - [x] Draggable pane separators (mouse and touch)
70
+ - [x] Chart types, picked from a menu: candles, hollow candles, Heikin Ashi, OHLC bars, line, area, baseline
71
+ - [x] Markers (arrows/circles with text, above/below bars)
72
+ - [ ] Per-bar coloring API
73
+ - [x] Kinetic scroll (momentum glide with decay); pinch anchor refinement pending
74
+ - [x] Two-click drawing (click, move, click — drag still works; Esc aborts)
75
+ - [x] Resizable text (drag the size grip on the selection)
76
+ - [x] Symbol header (ticker · timeframe · live price · change)
77
+ - [x] Vertical price zoom on the axis wheel (dblclick resets)
78
+ - [x] Fullscreen button (prominent, bottom-right)
79
+ - [x] Share (native sheet on phones, clipboard on desktop) and Fit chart
80
+ - [x] Symbol search: by ticker OR name, dropdown on ambiguity — the UI ships
81
+ with the widget, the data source is pluggable (`symbolSearch.search` /
82
+ `onSelect`); the demo bundles a keyless Binance adapter
83
+ - [x] Per-drawing color (floating chip on selection — boxes, lines, text)
84
+ - [x] Per-indicator color picker and custom rename (panel, legend and pane title follow)
85
+ - [x] Oscillator panes carry their own titles
86
+ - [x] Indicator legend with live numeric values (crosshair-tracked) and last-value tags on each oscillator's axis
87
+ - [x] `tick(price)` with the bucket roll built in — a closed candle always
88
+ opens the next one (a production bug class, ended in the library)
89
+ - [x] Mobile drawing hardening: touch lock while a tool is armed, cancel commits the in-flight shape, one-finger draw/move, two-finger always navigates
90
+
91
+ ## Editions (open-core plan)
92
+
93
+ - **Standard** (this repo, free): everything you see, up to 4 indicators
94
+ per chart (`maxIndicators: 4`), standard timeframes incl. 30m, TradeRead
95
+ mark required.
96
+ - **Pro** (paid, private repo — contact via traderead.ai): unlimited indicators, custom timeframes — the
97
+ bundled `TRCharts.resample()` turns any finer feed into 2m/3m or the
98
+ calendar frames 1M/1Y, so custom frames work with every data source.
99
+ Client-side limits are honesty gates, not DRM: the licence is the
100
+ enforcement, as with every client-side library.
101
+
102
+ ## License
103
+ **TradeRead Community License 1.0** — free for personal and commercial
104
+ use, modification and redistribution. One condition: any public page or
105
+ image that shows charts rendered by this engine keeps the TradeRead mark
106
+ visible (it is built in and on by default), or an equivalent "Charts by
107
+ TradeRead" notice linking to traderead.ai. Full text in LICENSE.md.
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "traderead-charts",
3
+ "version": "1.1.0",
4
+ "description": "Complete financial charting widget — candlesticks, indicators with a pro-style panel, drawing tools, symbol search, themes. Batteries included, zero dependencies, in production on traderead.ai.",
5
+ "main": "src/traderead-charts.js",
6
+ "files": [
7
+ "src",
8
+ "LICENSE.md",
9
+ "README.md",
10
+ "CHANGELOG.md"
11
+ ],
12
+ "license": "SEE LICENSE IN LICENSE.md",
13
+ "author": "Marcel Todea / TradeRead (https://traderead.ai)",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/marceltodeamt-lang/traderead-charts.git"
17
+ },
18
+ "keywords": [
19
+ "charts",
20
+ "candlestick",
21
+ "financial",
22
+ "trading",
23
+ "canvas",
24
+ "indicators",
25
+ "rsi",
26
+ "macd",
27
+ "drawing-tools",
28
+ "widget"
29
+ ],
30
+ "sideEffects": true,
31
+ "homepage": "https://marceltodeamt-lang.github.io/traderead-charts/",
32
+ "bugs": {
33
+ "url": "https://github.com/marceltodeamt-lang/traderead-charts/issues"
34
+ }
35
+ }