@abdullahjaswal/tickyr-charts 0.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/LICENSE ADDED
@@ -0,0 +1,14 @@
1
+ Copyright (c) 2026 Abdullah Jaswal. All rights reserved.
2
+
3
+ This source code is made publicly available for reference and evaluation
4
+ only. No license or permission is granted to use, copy, modify, merge,
5
+ publish, distribute, sublicense, or sell copies of the software, or to create
6
+ derivative works from it, in whole or in part, without the prior written
7
+ consent of the copyright holder.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
12
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER
13
+ IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
14
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,225 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/brand/logo-dark.svg">
4
+ <img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/brand/logo-light.png" alt="Tickyr Charts" width="84" height="84">
5
+ </picture>
6
+ </p>
7
+
8
+ <h1 align="center">Tickyr Charts</h1>
9
+
10
+ <p align="center">
11
+ Opinionated, canvas-rendered charts for trading and financial-data visualization.<br />
12
+ <strong>React and Solid adapters</strong> share one framework-agnostic core, powered by a Rust engine compiled to WASM.<br />
13
+ Built for fast, smooth rendering on mid-tier devices.
14
+ </p>
15
+
16
+ <p align="center">
17
+ <code>@abdullahjaswal/tickyr-charts</code>
18
+ </p>
19
+
20
+ ## Gallery
21
+
22
+ Every example is rendered live from the library. Theme (light / dark), color scheme (Monochrome / Classic / Accessible), and visual style (Fill / Outline) are all switchable at runtime. The shots below use the **Outline** style.
23
+
24
+ **CandleChart**, across themes and color schemes:
25
+
26
+ <table>
27
+ <tr><td></td><th>Monochrome</th><th>Classic</th></tr>
28
+ <tr>
29
+ <th>Light</th>
30
+ <td><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/candle-light-monochrome.png" width="400" alt="CandleChart, light theme, Monochrome palette, Outline style" /></td>
31
+ <td><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/candle-light-classic.png" width="400" alt="CandleChart, light theme, Classic palette, Outline style" /></td>
32
+ </tr>
33
+ <tr>
34
+ <th>Dark</th>
35
+ <td><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/candle-dark-monochrome.png" width="400" alt="CandleChart, dark theme, Monochrome palette, Outline style" /></td>
36
+ <td><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/candle-dark-classic.png" width="400" alt="CandleChart, dark theme, Classic palette, Outline style" /></td>
37
+ </tr>
38
+ </table>
39
+
40
+ **More chart types:**
41
+
42
+ <table>
43
+ <tr>
44
+ <td align="center"><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/treemap-dark-classic.png" width="400" alt="TreemapChart, dark theme, Classic palette, Outline style" /><br /><sub>TreemapChart, dark, Classic</sub></td>
45
+ <td align="center"><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/heatmap-light-monochrome.png" width="400" alt="HeatmapChart, light theme, Monochrome palette, Outline style" /><br /><sub>HeatmapChart, light, Monochrome</sub></td>
46
+ </tr>
47
+ <tr>
48
+ <td align="center"><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/depth-light-classic.png" width="400" alt="DepthChart, light theme, Classic palette, Outline style" /><br /><sub>DepthChart, light, Classic</sub></td>
49
+ <td align="center"><img src="https://raw.githubusercontent.com/AbdullahJaswal/tickyr-charts/main/assets/readme/line-dark-monochrome.png" width="400" alt="LineChart, dark theme, Monochrome palette, Outline style" /><br /><sub>LineChart, dark, Monochrome</sub></td>
50
+ </tr>
51
+ </table>
52
+
53
+ ## What's in the box
54
+
55
+ | Chart | What it's for |
56
+ |---|---|
57
+ | **CandleChart** | OHLC candles with volume sub-pane, indicators (RSI / MACD / Stochastic / ATR), VWAP overlay, signal / order / event / position markers, drawing tools, comparison overlay |
58
+ | **LineChart** | Time-series line - multi-series, indicator overlays (SMA / EMA / WMA / Bollinger), curve interpolation (linear / monotone / step / bump / basis) |
59
+ | **AreaChart** | Filled line with optional baseline, threshold-split colors, and gradient fills |
60
+ | **BarChart** | Vertical or horizontal bars - grouped / stacked / 100%-normalized / overlapping |
61
+ | **ScatterChart** | XY points with regression line + density-heatmap fallback for dense data |
62
+ | **HistogramChart** | Distribution bins - freedman-diaconis / sturges / fixed-count algorithms |
63
+ | **HeatmapChart** | Matrix heatmap with diverging / sequential / categorical color scales |
64
+ | **PieChart / DonutChart** | Categorical share-of-total with optional donut hole + center label |
65
+ | **SunburstChart / TreemapChart** | Hierarchical part-to-whole with drill-down navigation |
66
+ | **SankeyChart** | Flow diagrams across multiple stages |
67
+ | **DepthChart** | Orderbook bid/ask depth with mid-line + spread display |
68
+ | **RenkoChart / KagiChart / PointFigureChart** | Price-only "filtered-time" charts that ignore the time axis |
69
+
70
+ ## Highlights
71
+
72
+ - **🌐 Locale- and session-aware** - exchange session-aware time axis collapses overnight/weekend gaps; `lakh-crore` and Western digit grouping; multi-currency formatting
73
+ - **🌗 Themes + palettes** - light, dark, and OS-tracking modes; built-in `Monochrome` / `Classic` / `Accessible` (CVD-safe) palettes; register your own
74
+ - **🎨 Personalization** - every visual axis (corner radius, border width, glow, patterns, animations) configurable at provider or per-chart level
75
+ - **♿ Accessible by default** - `aria-label` on every chart, reduced-motion support, color-blind augmentation, keyboard-friendly drawings
76
+ - **📡 Streaming-first** - primitive-arg `chart.onTick(time, price, size)` API; engine-validated aggregation with bucket transitions, anomaly detection, and audit/telemetry hooks
77
+ - **⚡ Fast** - 60fps target on mid-tier 2022 Android devices; sustained 10+ ticks/sec; 8-10 charts concurrent
78
+
79
+ ## Install
80
+
81
+ ```sh
82
+ bun add @abdullahjaswal/tickyr-charts
83
+ # or: npm install @abdullahjaswal/tickyr-charts
84
+ ```
85
+
86
+ ## Quick start
87
+
88
+ ### React
89
+
90
+ ```tsx
91
+ import { ChartsProvider, CandleChart } from "@abdullahjaswal/tickyr-charts/react"
92
+
93
+ export default function App() {
94
+ return (
95
+ <ChartsProvider theme="dark" palette="Monochrome">
96
+ <CandleChart
97
+ data={{ candles: ohlcBars }}
98
+ width={900}
99
+ height={400}
100
+ indicators={[{ type: "rsi", period: 14 }]}
101
+ vwap={{ visible: true }}
102
+ />
103
+ </ChartsProvider>
104
+ )
105
+ }
106
+ ```
107
+
108
+ ### Solid
109
+
110
+ ```tsx
111
+ import { ChartsProvider, CandleChart } from "@abdullahjaswal/tickyr-charts/solid"
112
+
113
+ function App() {
114
+ return (
115
+ <ChartsProvider theme="dark" palette="Monochrome">
116
+ <CandleChart
117
+ data={{ candles: ohlcBars }}
118
+ width={900}
119
+ height={400}
120
+ />
121
+ </ChartsProvider>
122
+ )
123
+ }
124
+ ```
125
+
126
+ ### Live ticks
127
+
128
+ ```tsx
129
+ import { useRef } from "react"
130
+ import { CandleChart, type CandleChartHandle } from "@abdullahjaswal/tickyr-charts/react"
131
+
132
+ const ref = useRef<CandleChartHandle>(null)
133
+
134
+ // Push ticks from your websocket - primitive args, no allocations.
135
+ socket.on("tick", (t, price, size) => {
136
+ ref.current?.onTick(t, price, size)
137
+ })
138
+
139
+ return <CandleChart ref={ref} data={initialBars} streaming={{
140
+ timeframeMinutes: 1,
141
+ market: "equity",
142
+ }} />
143
+ ```
144
+
145
+ ## Configuration
146
+
147
+ The `ChartsProvider` wires shared defaults that every chart inherits (theme, palette, locale, time zone, visual style, etc.). Individual charts override per prop.
148
+
149
+ ```tsx
150
+ <ChartsProvider
151
+ theme="inherit" // "light" / "dark" / "inherit" (follows OS)
152
+ palette="Monochrome" // or "Classic", "Accessible", or your own
153
+ locale="USA"
154
+ timeZone="America/New_York"
155
+ visualStyle="Fill" // or "Outline"
156
+ cornerRadius={3}
157
+ borderWidth={1.4}
158
+ accents={false}
159
+ >
160
+ {/* charts */}
161
+ </ChartsProvider>
162
+ ```
163
+
164
+ Every chart accepts the same core props on top of its specific ones - see the **Storybook docs** (below) for the full prop table per chart.
165
+
166
+ ## Documentation
167
+
168
+ Interactive component docs with live examples and prop tables:
169
+
170
+ ```sh
171
+ bun run storybook # http://localhost:6006
172
+ ```
173
+
174
+ Or build the static site:
175
+
176
+ ```sh
177
+ bun run build:storybook # outputs storybook-static/
178
+ ```
179
+
180
+ Each chart has a **Docs** tab with:
181
+ - Every prop, its type, default, and description
182
+ - Every story rendered live with interactive controls
183
+ - Theme + palette toggle for quick visual checks
184
+
185
+ ## Browser support
186
+
187
+ ```
188
+ Chrome ≥ 111 Edge ≥ 111 Firefox ≥ 128 Safari ≥ 16.4
189
+ ```
190
+
191
+ Matches a mid-tier device floor.
192
+
193
+ ## Streaming hooks (optional convenience)
194
+
195
+ For hosts that prefer a hook-driven setup:
196
+
197
+ ```tsx
198
+ import { useStreamingCandles } from "@abdullahjaswal/tickyr-charts/react"
199
+
200
+ const { candles, pushTick, ready } = useStreamingCandles({
201
+ timeframeMinutes: 1,
202
+ market: "equity",
203
+ minPriceRaw: 0,
204
+ maxPriceRaw: 1_000_000_00, // scaled-integer cents
205
+ maxVolumeRaw: 1_000_000_000,
206
+ })
207
+
208
+ return <CandleChart data={candles} />
209
+ ```
210
+
211
+ The hook owns the streaming engine + pre-allocated bar buffer. Each `pushTick` validates + aggregates + emits a fresh snapshot.
212
+
213
+ ## Package surface
214
+
215
+ ```
216
+ @abdullahjaswal/tickyr-charts → shared types, engine helpers, personalization config
217
+ @abdullahjaswal/tickyr-charts/react → React adapters
218
+ @abdullahjaswal/tickyr-charts/solid → Solid adapters
219
+ ```
220
+
221
+ Both adapters render the same canvas pixels - switch freely between them in the same codebase.
222
+
223
+ ## License
224
+
225
+ Proprietary. All rights reserved. See [LICENSE](./LICENSE).