@itssumitrai/fin-charter 0.2.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.
Files changed (396) hide show
  1. package/README.md +96 -0
  2. package/dist/api/chart-api.d.ts +173 -0
  3. package/dist/api/export.d.ts +46 -0
  4. package/dist/api/indicator-api.d.ts +38 -0
  5. package/dist/api/options.d.ts +226 -0
  6. package/dist/api/pane-api.d.ts +28 -0
  7. package/dist/api/series-api.d.ts +115 -0
  8. package/dist/core/accessibility.d.ts +90 -0
  9. package/dist/core/alert-line.d.ts +49 -0
  10. package/dist/core/chart-state.d.ts +39 -0
  11. package/dist/core/chart-sync.d.ts +83 -0
  12. package/dist/core/crosshair.d.ts +28 -0
  13. package/dist/core/css-theme.d.ts +41 -0
  14. package/dist/core/custom-indicator.d.ts +70 -0
  15. package/dist/core/data-feed.d.ts +59 -0
  16. package/dist/core/data-layer.d.ts +38 -0
  17. package/dist/core/invalidation.d.ts +24 -0
  18. package/dist/core/market-session.d.ts +11 -0
  19. package/dist/core/order-line.d.ts +134 -0
  20. package/dist/core/pane-divider.d.ts +22 -0
  21. package/dist/core/pane.d.ts +32 -0
  22. package/dist/core/periodicity.d.ts +6 -0
  23. package/dist/core/plugin.d.ts +90 -0
  24. package/dist/core/price-line.d.ts +17 -0
  25. package/dist/core/price-scale.d.ts +74 -0
  26. package/dist/core/replay.d.ts +73 -0
  27. package/dist/core/rtl.d.ts +22 -0
  28. package/dist/core/segment-tree.d.ts +38 -0
  29. package/dist/core/series-markers.d.ts +18 -0
  30. package/dist/core/storage-adapter.d.ts +50 -0
  31. package/dist/core/streaming-adapter.d.ts +102 -0
  32. package/dist/core/symbol-resolver.d.ts +32 -0
  33. package/dist/core/text-label.d.ts +72 -0
  34. package/dist/core/time-scale.d.ts +109 -0
  35. package/dist/core/types.d.ts +144 -0
  36. package/dist/core/undo-redo.d.ts +46 -0
  37. package/dist/currency/currency.d.ts +8 -0
  38. package/dist/currency/index.d.ts +2 -0
  39. package/dist/drawings/arrow.d.ts +10 -0
  40. package/dist/drawings/base.d.ts +79 -0
  41. package/dist/drawings/channel.d.ts +10 -0
  42. package/dist/drawings/crossline.d.ts +10 -0
  43. package/dist/drawings/ellipse.d.ts +10 -0
  44. package/dist/drawings/fib-arc.d.ts +10 -0
  45. package/dist/drawings/fib-fan.d.ts +12 -0
  46. package/dist/drawings/fib-projection.d.ts +11 -0
  47. package/dist/drawings/fibonacci.d.ts +11 -0
  48. package/dist/drawings/horizontal-line.d.ts +10 -0
  49. package/dist/drawings/index.d.ts +7 -0
  50. package/dist/drawings/measurement.d.ts +11 -0
  51. package/dist/drawings/pitchfork.d.ts +12 -0
  52. package/dist/drawings/ray.d.ts +12 -0
  53. package/dist/drawings/rectangle.d.ts +10 -0
  54. package/dist/drawings/text-annotation.d.ts +11 -0
  55. package/dist/drawings/trendline.d.ts +10 -0
  56. package/dist/drawings/vertical-line.d.ts +10 -0
  57. package/dist/formatting/index.d.ts +5 -0
  58. package/dist/formatting/price-formatter.d.ts +6 -0
  59. package/dist/formatting/time-formatter.d.ts +7 -0
  60. package/dist/formatting/volume-formatter.d.ts +1 -0
  61. package/dist/i18n/i18n.d.ts +6 -0
  62. package/dist/i18n/index.d.ts +3 -0
  63. package/dist/i18n/locales/en.d.ts +3 -0
  64. package/dist/index.d.ts +63 -0
  65. package/dist/index.js +2 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/index10.js +2 -0
  68. package/dist/index10.js.map +1 -0
  69. package/dist/index100.js +2 -0
  70. package/dist/index100.js.map +1 -0
  71. package/dist/index101.js +2 -0
  72. package/dist/index101.js.map +1 -0
  73. package/dist/index102.js +2 -0
  74. package/dist/index102.js.map +1 -0
  75. package/dist/index103.js +2 -0
  76. package/dist/index103.js.map +1 -0
  77. package/dist/index104.js +2 -0
  78. package/dist/index104.js.map +1 -0
  79. package/dist/index105.js +2 -0
  80. package/dist/index105.js.map +1 -0
  81. package/dist/index106.js +2 -0
  82. package/dist/index106.js.map +1 -0
  83. package/dist/index107.js +2 -0
  84. package/dist/index107.js.map +1 -0
  85. package/dist/index108.js +2 -0
  86. package/dist/index108.js.map +1 -0
  87. package/dist/index109.js +2 -0
  88. package/dist/index109.js.map +1 -0
  89. package/dist/index11.js +2 -0
  90. package/dist/index11.js.map +1 -0
  91. package/dist/index110.js +2 -0
  92. package/dist/index110.js.map +1 -0
  93. package/dist/index111.js +2 -0
  94. package/dist/index111.js.map +1 -0
  95. package/dist/index112.js +2 -0
  96. package/dist/index112.js.map +1 -0
  97. package/dist/index113.js +2 -0
  98. package/dist/index113.js.map +1 -0
  99. package/dist/index114.js +2 -0
  100. package/dist/index114.js.map +1 -0
  101. package/dist/index115.js +2 -0
  102. package/dist/index115.js.map +1 -0
  103. package/dist/index116.js +2 -0
  104. package/dist/index116.js.map +1 -0
  105. package/dist/index117.js +2 -0
  106. package/dist/index117.js.map +1 -0
  107. package/dist/index118.js +2 -0
  108. package/dist/index118.js.map +1 -0
  109. package/dist/index119.js +2 -0
  110. package/dist/index119.js.map +1 -0
  111. package/dist/index12.js +2 -0
  112. package/dist/index12.js.map +1 -0
  113. package/dist/index120.js +2 -0
  114. package/dist/index120.js.map +1 -0
  115. package/dist/index121.js +2 -0
  116. package/dist/index121.js.map +1 -0
  117. package/dist/index122.js +2 -0
  118. package/dist/index122.js.map +1 -0
  119. package/dist/index123.js +2 -0
  120. package/dist/index123.js.map +1 -0
  121. package/dist/index124.js +2 -0
  122. package/dist/index124.js.map +1 -0
  123. package/dist/index13.js +2 -0
  124. package/dist/index13.js.map +1 -0
  125. package/dist/index14.js +2 -0
  126. package/dist/index14.js.map +1 -0
  127. package/dist/index15.js +2 -0
  128. package/dist/index15.js.map +1 -0
  129. package/dist/index16.js +2 -0
  130. package/dist/index16.js.map +1 -0
  131. package/dist/index17.js +2 -0
  132. package/dist/index17.js.map +1 -0
  133. package/dist/index18.js +2 -0
  134. package/dist/index18.js.map +1 -0
  135. package/dist/index19.js +2 -0
  136. package/dist/index19.js.map +1 -0
  137. package/dist/index2.js +2 -0
  138. package/dist/index2.js.map +1 -0
  139. package/dist/index20.js +2 -0
  140. package/dist/index20.js.map +1 -0
  141. package/dist/index21.js +2 -0
  142. package/dist/index21.js.map +1 -0
  143. package/dist/index22.js +2 -0
  144. package/dist/index22.js.map +1 -0
  145. package/dist/index23.js +2 -0
  146. package/dist/index23.js.map +1 -0
  147. package/dist/index24.js +2 -0
  148. package/dist/index24.js.map +1 -0
  149. package/dist/index25.js +2 -0
  150. package/dist/index25.js.map +1 -0
  151. package/dist/index26.js +2 -0
  152. package/dist/index26.js.map +1 -0
  153. package/dist/index27.js +2 -0
  154. package/dist/index27.js.map +1 -0
  155. package/dist/index28.js +2 -0
  156. package/dist/index28.js.map +1 -0
  157. package/dist/index29.js +2 -0
  158. package/dist/index29.js.map +1 -0
  159. package/dist/index3.js +2 -0
  160. package/dist/index3.js.map +1 -0
  161. package/dist/index30.js +2 -0
  162. package/dist/index30.js.map +1 -0
  163. package/dist/index31.js +2 -0
  164. package/dist/index31.js.map +1 -0
  165. package/dist/index32.js +2 -0
  166. package/dist/index32.js.map +1 -0
  167. package/dist/index33.js +2 -0
  168. package/dist/index33.js.map +1 -0
  169. package/dist/index34.js +2 -0
  170. package/dist/index34.js.map +1 -0
  171. package/dist/index35.js +2 -0
  172. package/dist/index35.js.map +1 -0
  173. package/dist/index36.js +2 -0
  174. package/dist/index36.js.map +1 -0
  175. package/dist/index37.js +2 -0
  176. package/dist/index37.js.map +1 -0
  177. package/dist/index38.js +2 -0
  178. package/dist/index38.js.map +1 -0
  179. package/dist/index39.js +2 -0
  180. package/dist/index39.js.map +1 -0
  181. package/dist/index4.js +2 -0
  182. package/dist/index4.js.map +1 -0
  183. package/dist/index40.js +2 -0
  184. package/dist/index40.js.map +1 -0
  185. package/dist/index41.js +2 -0
  186. package/dist/index41.js.map +1 -0
  187. package/dist/index42.js +2 -0
  188. package/dist/index42.js.map +1 -0
  189. package/dist/index43.js +2 -0
  190. package/dist/index43.js.map +1 -0
  191. package/dist/index44.js +2 -0
  192. package/dist/index44.js.map +1 -0
  193. package/dist/index45.js +2 -0
  194. package/dist/index45.js.map +1 -0
  195. package/dist/index46.js +2 -0
  196. package/dist/index46.js.map +1 -0
  197. package/dist/index47.js +2 -0
  198. package/dist/index47.js.map +1 -0
  199. package/dist/index48.js +2 -0
  200. package/dist/index48.js.map +1 -0
  201. package/dist/index49.js +2 -0
  202. package/dist/index49.js.map +1 -0
  203. package/dist/index5.js +2 -0
  204. package/dist/index5.js.map +1 -0
  205. package/dist/index50.js +2 -0
  206. package/dist/index50.js.map +1 -0
  207. package/dist/index51.js +2 -0
  208. package/dist/index51.js.map +1 -0
  209. package/dist/index52.js +2 -0
  210. package/dist/index52.js.map +1 -0
  211. package/dist/index53.js +2 -0
  212. package/dist/index53.js.map +1 -0
  213. package/dist/index54.js +2 -0
  214. package/dist/index54.js.map +1 -0
  215. package/dist/index55.js +2 -0
  216. package/dist/index55.js.map +1 -0
  217. package/dist/index56.js +2 -0
  218. package/dist/index56.js.map +1 -0
  219. package/dist/index57.js +2 -0
  220. package/dist/index57.js.map +1 -0
  221. package/dist/index58.js +2 -0
  222. package/dist/index58.js.map +1 -0
  223. package/dist/index59.js +2 -0
  224. package/dist/index59.js.map +1 -0
  225. package/dist/index6.js +2 -0
  226. package/dist/index6.js.map +1 -0
  227. package/dist/index60.js +2 -0
  228. package/dist/index60.js.map +1 -0
  229. package/dist/index61.js +2 -0
  230. package/dist/index61.js.map +1 -0
  231. package/dist/index62.js +2 -0
  232. package/dist/index62.js.map +1 -0
  233. package/dist/index63.js +2 -0
  234. package/dist/index63.js.map +1 -0
  235. package/dist/index64.js +2 -0
  236. package/dist/index64.js.map +1 -0
  237. package/dist/index65.js +3 -0
  238. package/dist/index65.js.map +1 -0
  239. package/dist/index66.js +2 -0
  240. package/dist/index66.js.map +1 -0
  241. package/dist/index67.js +2 -0
  242. package/dist/index67.js.map +1 -0
  243. package/dist/index68.js +2 -0
  244. package/dist/index68.js.map +1 -0
  245. package/dist/index69.js +2 -0
  246. package/dist/index69.js.map +1 -0
  247. package/dist/index7.js +2 -0
  248. package/dist/index7.js.map +1 -0
  249. package/dist/index70.js +2 -0
  250. package/dist/index70.js.map +1 -0
  251. package/dist/index71.js +2 -0
  252. package/dist/index71.js.map +1 -0
  253. package/dist/index72.js +2 -0
  254. package/dist/index72.js.map +1 -0
  255. package/dist/index73.js +2 -0
  256. package/dist/index73.js.map +1 -0
  257. package/dist/index74.js +2 -0
  258. package/dist/index74.js.map +1 -0
  259. package/dist/index75.js +2 -0
  260. package/dist/index75.js.map +1 -0
  261. package/dist/index76.js +2 -0
  262. package/dist/index76.js.map +1 -0
  263. package/dist/index77.js +2 -0
  264. package/dist/index77.js.map +1 -0
  265. package/dist/index78.js +2 -0
  266. package/dist/index78.js.map +1 -0
  267. package/dist/index79.js +2 -0
  268. package/dist/index79.js.map +1 -0
  269. package/dist/index8.js +2 -0
  270. package/dist/index8.js.map +1 -0
  271. package/dist/index80.js +2 -0
  272. package/dist/index80.js.map +1 -0
  273. package/dist/index81.js +2 -0
  274. package/dist/index81.js.map +1 -0
  275. package/dist/index82.js +2 -0
  276. package/dist/index82.js.map +1 -0
  277. package/dist/index83.js +2 -0
  278. package/dist/index83.js.map +1 -0
  279. package/dist/index84.js +2 -0
  280. package/dist/index84.js.map +1 -0
  281. package/dist/index85.js +2 -0
  282. package/dist/index85.js.map +1 -0
  283. package/dist/index86.js +2 -0
  284. package/dist/index86.js.map +1 -0
  285. package/dist/index87.js +2 -0
  286. package/dist/index87.js.map +1 -0
  287. package/dist/index88.js +2 -0
  288. package/dist/index88.js.map +1 -0
  289. package/dist/index89.js +2 -0
  290. package/dist/index89.js.map +1 -0
  291. package/dist/index9.js +2 -0
  292. package/dist/index9.js.map +1 -0
  293. package/dist/index90.js +2 -0
  294. package/dist/index90.js.map +1 -0
  295. package/dist/index91.js +2 -0
  296. package/dist/index91.js.map +1 -0
  297. package/dist/index92.js +2 -0
  298. package/dist/index92.js.map +1 -0
  299. package/dist/index93.js +2 -0
  300. package/dist/index93.js.map +1 -0
  301. package/dist/index94.js +2 -0
  302. package/dist/index94.js.map +1 -0
  303. package/dist/index95.js +2 -0
  304. package/dist/index95.js.map +1 -0
  305. package/dist/index96.js +2 -0
  306. package/dist/index96.js.map +1 -0
  307. package/dist/index97.js +2 -0
  308. package/dist/index97.js.map +1 -0
  309. package/dist/index98.js +2 -0
  310. package/dist/index98.js.map +1 -0
  311. package/dist/index99.js +2 -0
  312. package/dist/index99.js.map +1 -0
  313. package/dist/indicators/adx.d.ts +6 -0
  314. package/dist/indicators/aroon.d.ts +5 -0
  315. package/dist/indicators/atr.d.ts +1 -0
  316. package/dist/indicators/awesome-oscillator.d.ts +1 -0
  317. package/dist/indicators/bollinger.d.ts +6 -0
  318. package/dist/indicators/cci.d.ts +1 -0
  319. package/dist/indicators/chaikin-mf.d.ts +1 -0
  320. package/dist/indicators/choppiness.d.ts +1 -0
  321. package/dist/indicators/coppock.d.ts +1 -0
  322. package/dist/indicators/donchian.d.ts +6 -0
  323. package/dist/indicators/elder-force.d.ts +1 -0
  324. package/dist/indicators/ema.d.ts +1 -0
  325. package/dist/indicators/ichimoku.d.ts +8 -0
  326. package/dist/indicators/index.d.ts +31 -0
  327. package/dist/indicators/keltner.d.ts +6 -0
  328. package/dist/indicators/linear-regression.d.ts +1 -0
  329. package/dist/indicators/macd.d.ts +6 -0
  330. package/dist/indicators/mfi.d.ts +1 -0
  331. package/dist/indicators/obv.d.ts +1 -0
  332. package/dist/indicators/parabolic-sar.d.ts +1 -0
  333. package/dist/indicators/pivot-points.d.ts +10 -0
  334. package/dist/indicators/roc.d.ts +1 -0
  335. package/dist/indicators/rsi.d.ts +1 -0
  336. package/dist/indicators/sma.d.ts +1 -0
  337. package/dist/indicators/stochastic.d.ts +5 -0
  338. package/dist/indicators/supertrend.d.ts +5 -0
  339. package/dist/indicators/trix.d.ts +5 -0
  340. package/dist/indicators/utils.d.ts +20 -0
  341. package/dist/indicators/volume-profile.d.ts +37 -0
  342. package/dist/indicators/volume.d.ts +1 -0
  343. package/dist/indicators/vwap.d.ts +1 -0
  344. package/dist/indicators/vwma.d.ts +1 -0
  345. package/dist/indicators/williams-r.d.ts +1 -0
  346. package/dist/interactions/axis-drag.d.ts +24 -0
  347. package/dist/interactions/context-menu-handler.d.ts +42 -0
  348. package/dist/interactions/crosshair.d.ts +20 -0
  349. package/dist/interactions/drawing-handler.d.ts +39 -0
  350. package/dist/interactions/event-router.d.ts +37 -0
  351. package/dist/interactions/keyboard-nav.d.ts +11 -0
  352. package/dist/interactions/pan-zoom.d.ts +39 -0
  353. package/dist/interactions/range-selection.d.ts +103 -0
  354. package/dist/interactions/touch-gestures.d.ts +36 -0
  355. package/dist/logo.svg +40 -0
  356. package/dist/market/exchange-map.d.ts +3 -0
  357. package/dist/market/index.d.ts +4 -0
  358. package/dist/market/market-calendar.d.ts +4 -0
  359. package/dist/market/market-definition.d.ts +22 -0
  360. package/dist/mockServiceWorker.js +349 -0
  361. package/dist/renderers/area.d.ts +17 -0
  362. package/dist/renderers/bar-ohlc.d.ts +17 -0
  363. package/dist/renderers/baseline-delta-mountain.d.ts +22 -0
  364. package/dist/renderers/baseline.d.ts +19 -0
  365. package/dist/renderers/candlestick.d.ts +21 -0
  366. package/dist/renderers/canvas-renderer.d.ts +28 -0
  367. package/dist/renderers/colored-line.d.ts +15 -0
  368. package/dist/renderers/colored-mountain.d.ts +18 -0
  369. package/dist/renderers/column.d.ts +14 -0
  370. package/dist/renderers/high-low.d.ts +14 -0
  371. package/dist/renderers/histogram.d.ts +16 -0
  372. package/dist/renderers/hlc-area.d.ts +16 -0
  373. package/dist/renderers/hollow-candle.d.ts +18 -0
  374. package/dist/renderers/kagi.d.ts +22 -0
  375. package/dist/renderers/line-break.d.ts +20 -0
  376. package/dist/renderers/line.d.ts +17 -0
  377. package/dist/renderers/point-figure.d.ts +20 -0
  378. package/dist/renderers/renderer.d.ts +59 -0
  379. package/dist/renderers/renko.d.ts +24 -0
  380. package/dist/renderers/step-line.d.ts +14 -0
  381. package/dist/renderers/text-cache.d.ts +23 -0
  382. package/dist/renderers/volume-candle.d.ts +20 -0
  383. package/dist/renderers/webgl/area-webgl.d.ts +28 -0
  384. package/dist/renderers/webgl/candlestick-webgl.d.ts +30 -0
  385. package/dist/renderers/webgl/index.d.ts +7 -0
  386. package/dist/renderers/webgl/line-webgl.d.ts +23 -0
  387. package/dist/renderers/webgl/webgl-utils.d.ts +23 -0
  388. package/dist/timezone/index.d.ts +2 -0
  389. package/dist/timezone/timezone.d.ts +12 -0
  390. package/dist/transforms/aggregate.d.ts +2 -0
  391. package/dist/transforms/heikin-ashi.d.ts +2 -0
  392. package/dist/transforms/index.d.ts +2 -0
  393. package/dist/ui/context-menu.d.ts +14 -0
  394. package/dist/ui/hud.d.ts +43 -0
  395. package/dist/ui/settings-popup.d.ts +15 -0
  396. package/package.json +129 -0
@@ -0,0 +1,32 @@
1
+ export interface SymbolInfo {
2
+ /** Ticker symbol, e.g. "AAPL" */
3
+ symbol: string;
4
+ /** Human-readable name, e.g. "Apple Inc." */
5
+ name: string;
6
+ /** Instrument type, e.g. "stock", "crypto", "forex" */
7
+ type: string;
8
+ /** Exchange identifier, e.g. "NASDAQ" */
9
+ exchange: string;
10
+ /** IANA timezone, e.g. "America/New_York" */
11
+ timezone: string;
12
+ /** Decimal places for price display */
13
+ pricePrecision: number;
14
+ /** Minimum price movement (e.g. 1 for whole-cent, 0.5 for half-tick) */
15
+ minMov: number;
16
+ }
17
+ export interface ISymbolResolver {
18
+ /** Resolve a ticker string to full symbol information. */
19
+ resolveSymbol(ticker: string): Promise<SymbolInfo>;
20
+ /** Search symbols by query string, optionally filtered by instrument type. */
21
+ searchSymbols(query: string, type?: string): Promise<SymbolInfo[]>;
22
+ }
23
+ /**
24
+ * A simple in-memory symbol resolver that searches a pre-loaded map of symbols
25
+ * using fuzzy matching on both the ticker symbol and the human-readable name.
26
+ */
27
+ export declare class SimpleSymbolResolver implements ISymbolResolver {
28
+ private readonly _symbols;
29
+ constructor(symbols: Map<string, SymbolInfo>);
30
+ resolveSymbol(ticker: string): Promise<SymbolInfo>;
31
+ searchSymbols(query: string, type?: string): Promise<SymbolInfo[]>;
32
+ }
@@ -0,0 +1,72 @@
1
+ import { IPaneView } from './types';
2
+ export interface TextLabelOptions {
3
+ /** Text content. */
4
+ text: string;
5
+ /** Background color (set to 'transparent' for no background). */
6
+ backgroundColor: string;
7
+ /** Text color. */
8
+ textColor: string;
9
+ /** Border color (set to 'transparent' for no border). */
10
+ borderColor: string;
11
+ /** Border width in pixels. */
12
+ borderWidth: number;
13
+ /** Border radius in pixels. */
14
+ borderRadius: number;
15
+ /** Font size in pixels. */
16
+ fontSize: number;
17
+ /** Font family. */
18
+ fontFamily: string;
19
+ /** Box anchor relative to the time/price coordinate: 'left' = box starts at anchor, 'center' = centered, 'right' = box ends at anchor. */
20
+ boxAnchor: 'left' | 'center' | 'right';
21
+ /** Padding inside the box (pixels). */
22
+ padding: number;
23
+ /** Whether to draw an arrow/connector line from the box to the anchor point. */
24
+ showConnector: boolean;
25
+ /** Connector line color. */
26
+ connectorColor: string;
27
+ /** Y offset of the label box from the anchor point (pixels). */
28
+ yOffset: number;
29
+ }
30
+ export declare const DEFAULT_TEXT_LABEL_OPTIONS: TextLabelOptions;
31
+ /**
32
+ * TextLabel — a lightweight text annotation anchored to a time/price coordinate.
33
+ *
34
+ * Unlike the drawing tool's text annotation, TextLabels are programmatic
35
+ * (e.g., for annotating earnings dates, dividends) and don't require
36
+ * user interaction to place. They survive zoom/pan and are included in
37
+ * screenshot exports.
38
+ */
39
+ export declare class TextLabel {
40
+ readonly id: string;
41
+ /** Bar index (not timestamp). Use DataLayer.findIndex(timestamp) to convert. */
42
+ private _time;
43
+ private _price;
44
+ private _options;
45
+ private _requestRepaint;
46
+ constructor(id: string, time: number, price: number, options: Partial<TextLabelOptions>, requestRepaint?: () => void);
47
+ get time(): number;
48
+ get price(): number;
49
+ get options(): Readonly<TextLabelOptions>;
50
+ applyOptions(opts: Partial<TextLabelOptions>): void;
51
+ setPosition(time: number, price: number): void;
52
+ /**
53
+ * Create an IPaneView for rendering this label on the chart canvas.
54
+ */
55
+ createPaneView(indexToX: (i: number) => number, priceToY: (p: number) => number): IPaneView;
56
+ /** Serialize for persistence. */
57
+ serialize(): {
58
+ id: string;
59
+ time: number;
60
+ price: number;
61
+ options: TextLabelOptions;
62
+ };
63
+ }
64
+ /**
65
+ * Batch-create text labels (e.g., for annotating earnings dates).
66
+ */
67
+ export declare function createTextLabels(entries: Array<{
68
+ time: number;
69
+ price: number;
70
+ text: string;
71
+ options?: Partial<TextLabelOptions>;
72
+ }>, requestRepaint?: () => void): TextLabel[];
@@ -0,0 +1,109 @@
1
+ import { VisibleRange } from './types';
2
+ export interface TimeScaleOptions {
3
+ barSpacing: number;
4
+ rightOffset: number;
5
+ minBarSpacing: number;
6
+ maxBarSpacing: number;
7
+ }
8
+ /**
9
+ * TimeScale managing horizontal bar layout and coordinate mapping.
10
+ *
11
+ * - `_rightOffset` = bars of empty space to the right of the last bar.
12
+ * Default 0 means the last bar sits at the right edge.
13
+ * - `_barSpacing` controls zoom level.
14
+ * - Visible range: rightBorder = baseIndex + rightOffset,
15
+ * leftBorder = rightBorder - width/barSpacing + 1
16
+ * - indexToCoordinate: deltaFromRight = baseIndex + rightOffset - index;
17
+ * x = width - (deltaFromRight + 0.5) * barSpacing
18
+ * - Scrolling modifies rightOffset.
19
+ * - Auto-scroll on new data: rightOffset stays constant, so new bars
20
+ * naturally appear if the last bar was visible.
21
+ */
22
+ export declare class TimeScale {
23
+ private static readonly MIN_VISIBLE_BARS;
24
+ private _options;
25
+ /** Canvas width in pixels. */
26
+ private _width;
27
+ /** Total number of data bars. */
28
+ private _dataLength;
29
+ /** Bars of space to the right of the last bar. */
30
+ private _rightOffset;
31
+ /** Bar spacing (zoom level). Stored separately from options so zoomAt can mutate it without cloning options. */
32
+ private _barSpacing;
33
+ constructor(options?: Partial<TimeScaleOptions>);
34
+ private get _baseIndex();
35
+ setOptions(options: Partial<TimeScaleOptions>): void;
36
+ setWidth(width: number): void;
37
+ /**
38
+ * Set data length.
39
+ * Auto-scroll: rightOffset stays constant, so if the last bar was visible
40
+ * before new data arrived, the new bar naturally appears.
41
+ */
42
+ setDataLength(length: number): void;
43
+ get barSpacing(): number;
44
+ get minBarSpacing(): number;
45
+ get maxBarSpacing(): number;
46
+ /** Set bar spacing directly (clamped to min/max). */
47
+ setBarSpacing(spacing: number): void;
48
+ /** Scroll by pixels (positive = scroll right, negative = scroll left). */
49
+ scrollBy(deltaX: number): void;
50
+ get rightOffset(): number;
51
+ get dataLength(): number;
52
+ /**
53
+ * Compute the visible bar index range.
54
+ * rightBorder = baseIndex + rightOffset
55
+ * leftBorder = rightBorder - width/barSpacing + 1
56
+ */
57
+ visibleRange(): VisibleRange;
58
+ /**
59
+ * Convert a bar index to the x-pixel of its center.
60
+ * deltaFromRight = baseIndex + rightOffset - index
61
+ * x = width - (deltaFromRight + 0.5) * barSpacing
62
+ */
63
+ indexToX(index: number): number;
64
+ /**
65
+ * Convert an x-pixel coordinate back to the nearest bar index (not clamped).
66
+ * Inverse of indexToX.
67
+ */
68
+ xToIndex(x: number): number;
69
+ /**
70
+ * Return the fractional (float) index at an x coordinate.
71
+ * Used internally for zoom stabilization.
72
+ */
73
+ private _floatIndexAtX;
74
+ /**
75
+ * Called by the pan handler. Computes the shift in logical bars from the
76
+ * start position and applies it to the saved right offset.
77
+ *
78
+ * Dragging right → x increases → shift is negative → rightOffset decreases
79
+ * → chart moves toward future/recent data.
80
+ */
81
+ scrollTo(startX: number, currentX: number, savedRightOffset: number): void;
82
+ /** Direct offset setter for kinetic scrolling etc. */
83
+ setRightOffset(offset: number): void;
84
+ /** Scroll so the last bar is visible at the right edge (reset to configured rightOffset). */
85
+ scrollToEnd(): void;
86
+ /**
87
+ * Scroll by pixel amount. Kept for backwards compatibility with
88
+ * axis-drag, keyboard-nav, and kinetic scrolling.
89
+ *
90
+ * Positive deltaX → rightOffset increases → chart shifts to show older data.
91
+ */
92
+ scrollByPixels(deltaX: number): void;
93
+ /**
94
+ * Set scroll offset directly in bars.
95
+ * Kept for backwards compatibility with keyboard-nav (Home key).
96
+ */
97
+ scrollToPosition(position: number): void;
98
+ /**
99
+ * Zoom keeping the point under cursor stable.
100
+ * TV model: record float index under cursor, change barSpacing by
101
+ * `scale * (barSpacing / 10)`, then adjust rightOffset so that index
102
+ * stays at the same screen x.
103
+ */
104
+ zoomAt(x: number, scale: number): void;
105
+ /** Adjust barSpacing so all data bars fit exactly in the current width. */
106
+ fitContent(): void;
107
+ correctOffset(): void;
108
+ private _clampBarSpacing;
109
+ }
@@ -0,0 +1,144 @@
1
+ export interface Bar {
2
+ time: number;
3
+ open: number;
4
+ high: number;
5
+ low: number;
6
+ close: number;
7
+ volume?: number;
8
+ }
9
+ /** Same fields as Bar but stored as typed arrays (column-oriented). */
10
+ export interface ColumnData {
11
+ time: Float64Array;
12
+ open: Float64Array;
13
+ high: Float64Array;
14
+ low: Float64Array;
15
+ close: Float64Array;
16
+ volume: Float64Array;
17
+ }
18
+ export interface ColumnStore {
19
+ time: Float64Array;
20
+ open: Float64Array;
21
+ high: Float64Array;
22
+ low: Float64Array;
23
+ close: Float64Array;
24
+ volume: Float64Array;
25
+ length: number;
26
+ capacity: number;
27
+ }
28
+ export declare function createColumnStore(capacity: number): ColumnStore;
29
+ export declare function barsToColumnStore(bars: Bar[]): ColumnStore;
30
+ export declare const InvalidationLevel: {
31
+ readonly None: 0;
32
+ readonly Cursor: 1;
33
+ readonly Light: 2;
34
+ readonly Full: 3;
35
+ };
36
+ export type InvalidationLevelValue = (typeof InvalidationLevel)[keyof typeof InvalidationLevel];
37
+ export interface VisibleRange {
38
+ fromIdx: number;
39
+ toIdx: number;
40
+ }
41
+ export interface TimeRange {
42
+ from: number;
43
+ to: number;
44
+ }
45
+ export type PathCommand = {
46
+ cmd: 'M';
47
+ x: number;
48
+ y: number;
49
+ } | {
50
+ cmd: 'L';
51
+ x: number;
52
+ y: number;
53
+ } | {
54
+ cmd: 'Z';
55
+ } | {
56
+ cmd: 'Q';
57
+ cpx: number;
58
+ cpy: number;
59
+ x: number;
60
+ y: number;
61
+ } | {
62
+ cmd: 'C';
63
+ cp1x: number;
64
+ cp1y: number;
65
+ cp2x: number;
66
+ cp2y: number;
67
+ x: number;
68
+ y: number;
69
+ };
70
+ export interface GradientStop {
71
+ offset: number;
72
+ color: string;
73
+ }
74
+ export interface Gradient {
75
+ type: 'linear' | 'radial';
76
+ stops: GradientStop[];
77
+ }
78
+ export type RenderStyle = string | Gradient;
79
+ export declare const PrimitiveZOrder: {
80
+ readonly Bottom: 0;
81
+ readonly Normal: 1;
82
+ readonly Top: 2;
83
+ };
84
+ export type PrimitiveZOrderValue = (typeof PrimitiveZOrder)[keyof typeof PrimitiveZOrder];
85
+ export type DataUpdateScope = 'full' | 'update';
86
+ export interface AttachedParams {
87
+ requestUpdate(): void;
88
+ }
89
+ export interface IRenderTarget {
90
+ readonly canvas: HTMLCanvasElement;
91
+ readonly context: CanvasRenderingContext2D;
92
+ readonly width: number;
93
+ readonly height: number;
94
+ readonly pixelRatio: number;
95
+ }
96
+ export interface IPaneRenderer {
97
+ draw(target: IRenderTarget): void;
98
+ drawBackground?(target: IRenderTarget): void;
99
+ }
100
+ export interface IPaneView {
101
+ renderer(): IPaneRenderer | null;
102
+ zOrder?(): PrimitiveZOrderValue;
103
+ }
104
+ export interface IPriceAxisView {
105
+ text(): string;
106
+ textColor(): string;
107
+ backColor(): string;
108
+ coordinate(): number;
109
+ }
110
+ export interface ITimeAxisView {
111
+ text(): string;
112
+ coordinate(): number;
113
+ }
114
+ export interface PrimitiveHitTestResult {
115
+ cursorStyle?: string;
116
+ externalId?: string;
117
+ }
118
+ export interface ISeriesPrimitive {
119
+ /** Called when the primitive is attached to a series. */
120
+ attached?(params: AttachedParams): void;
121
+ /** Called when the primitive is detached. */
122
+ detached?(): void;
123
+ /** Notifies the primitive of a data scope update. */
124
+ updateAllViews?(): void;
125
+ /** Returns pane views for this primitive. */
126
+ paneViews?(): readonly IPaneView[];
127
+ /** Returns price axis views. */
128
+ priceAxisViews?(): readonly IPriceAxisView[];
129
+ /** Returns time axis views. */
130
+ timeAxisViews?(): readonly ITimeAxisView[];
131
+ /** Hit-test at the given canvas coordinate. */
132
+ hitTest?(x: number, y: number): PrimitiveHitTestResult | null;
133
+ }
134
+ export interface IPanePrimitive {
135
+ attached?(params: AttachedParams): void;
136
+ detached?(): void;
137
+ updateAllViews?(): void;
138
+ paneViews?(): readonly IPaneView[];
139
+ hitTest?(x: number, y: number): PrimitiveHitTestResult | null;
140
+ }
141
+ export type SeriesType = 'candlestick' | 'bar' | 'line' | 'area' | 'histogram' | 'baseline' | 'hollow-candle' | 'heikin-ashi' | 'step-line' | 'colored-line' | 'colored-mountain' | 'hlc-area' | 'high-low' | 'column' | 'volume-candle' | 'baseline-delta-mountain' | 'renko' | 'kagi' | 'line-break' | 'point-figure';
142
+ export type DeepPartial<T> = {
143
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
144
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Command pattern undo/redo stack.
3
+ *
4
+ * Each command has an `execute()` and `undo()` method. Commands are pushed
5
+ * onto the undo stack when executed, and moved between undo/redo stacks
6
+ * as the user navigates history.
7
+ */
8
+ export interface Command {
9
+ /** Human-readable description for UI. */
10
+ readonly label: string;
11
+ /** Execute (or re-execute) the command. */
12
+ execute(): void;
13
+ /** Reverse the command. */
14
+ undo(): void;
15
+ }
16
+ export type UndoRedoChangeCallback = () => void;
17
+ export declare class UndoRedoManager {
18
+ private _undoStack;
19
+ private _redoStack;
20
+ private _maxDepth;
21
+ private _changeCallbacks;
22
+ constructor(maxDepth?: number);
23
+ /** Push and execute a command. Clears the redo stack. */
24
+ execute(command: Command): void;
25
+ /** Undo the last command. */
26
+ undo(): boolean;
27
+ /** Redo the last undone command. */
28
+ redo(): boolean;
29
+ /** Whether undo is available. */
30
+ canUndo(): boolean;
31
+ /** Whether redo is available. */
32
+ canRedo(): boolean;
33
+ /** Clear both stacks (e.g., on symbol change). */
34
+ clear(): void;
35
+ /** Number of undo-able commands. */
36
+ get undoSize(): number;
37
+ /** Number of redo-able commands. */
38
+ get redoSize(): number;
39
+ /** Get the configured max depth. */
40
+ get maxDepth(): number;
41
+ /** Subscribe to changes in undo/redo availability. */
42
+ onChange(callback: UndoRedoChangeCallback): void;
43
+ /** Unsubscribe from changes. */
44
+ offChange(callback: UndoRedoChangeCallback): void;
45
+ private _notifyChange;
46
+ }
@@ -0,0 +1,8 @@
1
+ export interface CurrencyInfo {
2
+ code: string;
3
+ symbol: string;
4
+ decimals: number;
5
+ }
6
+ export declare const CURRENCIES: Record<string, CurrencyInfo>;
7
+ export declare function getCurrencyInfo(code: string): CurrencyInfo;
8
+ export declare function formatCurrency(value: number, currencyCode: string, locale?: string): string;
@@ -0,0 +1,2 @@
1
+ export { getCurrencyInfo, formatCurrency, CURRENCIES } from './currency';
2
+ export type { CurrencyInfo } from './currency';
@@ -0,0 +1,10 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class ArrowDrawing extends BaseDrawing {
4
+ readonly drawingType = "arrow";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
8
+ protected _createPaneView(): IPaneView;
9
+ }
10
+ export declare function createArrow(id: string, points: AnchorPoint[], options: DrawingOptions): ArrowDrawing;
@@ -0,0 +1,79 @@
1
+ import { ISeriesPrimitive, IPaneView, PrimitiveHitTestResult } from '../core/types';
2
+ import { TimeScale } from '../core/time-scale';
3
+ import { PriceScale } from '../core/price-scale';
4
+ export declare const HIT_THRESHOLD = 6;
5
+ export interface AnchorPoint {
6
+ time: number;
7
+ price: number;
8
+ }
9
+ export interface DrawingOptions {
10
+ color?: string;
11
+ lineWidth?: number;
12
+ lineStyle?: 'solid' | 'dashed' | 'dotted';
13
+ fillColor?: string;
14
+ text?: string;
15
+ fontSize?: number;
16
+ /** Whether to show labels on fibonacci and measurement tools. Defaults to true. */
17
+ showLabels?: boolean;
18
+ }
19
+ export interface SerializedDrawing {
20
+ type: string;
21
+ id: string;
22
+ points: AnchorPoint[];
23
+ options: DrawingOptions;
24
+ }
25
+ export interface DrawingHitTestResult {
26
+ drawingId: string;
27
+ part: 'body' | 'handle1' | 'handle2' | 'handle3' | 'edge';
28
+ cursorStyle: string;
29
+ }
30
+ export interface DrawingPrimitive {
31
+ readonly drawingType: string;
32
+ readonly requiredPoints: number;
33
+ points: AnchorPoint[];
34
+ options: DrawingOptions;
35
+ selected: boolean;
36
+ serialize(): SerializedDrawing;
37
+ drawingHitTest(x: number, y: number): DrawingHitTestResult | null;
38
+ }
39
+ /** Coordinate converters passed to drawings so they can map time/price to pixels. */
40
+ export interface DrawingContext {
41
+ timeScale: TimeScale;
42
+ priceScale: PriceScale;
43
+ chartWidth: number;
44
+ chartHeight: number;
45
+ requestUpdate(): void;
46
+ }
47
+ /** Distance from point (px,py) to the closest point on segment (x1,y1)-(x2,y2). */
48
+ export declare function distToSegment(px: number, py: number, x1: number, y1: number, x2: number, y2: number): number;
49
+ /** Returns true if (px,py) is inside the axis-aligned rectangle defined by two corners. */
50
+ export declare function pointInRect(px: number, py: number, x1: number, y1: number, x2: number, y2: number): boolean;
51
+ export type DrawingFactory = (id: string, points: AnchorPoint[], options: DrawingOptions) => ISeriesPrimitive & DrawingPrimitive;
52
+ export declare function applyLineStyle(ctx: CanvasRenderingContext2D, style: DrawingOptions['lineStyle']): void;
53
+ /**
54
+ * Abstract base that implements common ISeriesPrimitive + DrawingPrimitive plumbing.
55
+ * Subclasses only override _createPaneView().
56
+ */
57
+ export declare abstract class BaseDrawing implements ISeriesPrimitive, DrawingPrimitive {
58
+ abstract readonly drawingType: string;
59
+ abstract readonly requiredPoints: number;
60
+ points: AnchorPoint[];
61
+ options: DrawingOptions;
62
+ selected: boolean;
63
+ readonly id: string;
64
+ protected _ctx: DrawingContext | null;
65
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
66
+ attached(params: {
67
+ requestUpdate(): void;
68
+ }): void;
69
+ detached(): void;
70
+ updateAllViews(): void;
71
+ paneViews(): readonly IPaneView[];
72
+ hitTest(x: number, y: number): PrimitiveHitTestResult | null;
73
+ drawingHitTest(x: number, y: number): DrawingHitTestResult | null;
74
+ serialize(): SerializedDrawing;
75
+ /** Externally accessible hit-test returning DrawingHitTestResult. */
76
+ abstract _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
77
+ setContext(ctx: DrawingContext): void;
78
+ protected abstract _createPaneView(): IPaneView;
79
+ }
@@ -0,0 +1,10 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class ChannelDrawing extends BaseDrawing {
4
+ readonly drawingType = "channel";
5
+ readonly requiredPoints = 3;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
8
+ protected _createPaneView(): IPaneView;
9
+ }
10
+ export declare function createChannel(id: string, points: AnchorPoint[], options: DrawingOptions): ChannelDrawing;
@@ -0,0 +1,10 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class CrosslineDrawing extends BaseDrawing {
4
+ readonly drawingType = "crossline";
5
+ readonly requiredPoints = 1;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
8
+ protected _createPaneView(): IPaneView;
9
+ }
10
+ export declare function createCrossline(id: string, points: AnchorPoint[], options: DrawingOptions): CrosslineDrawing;
@@ -0,0 +1,10 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class EllipseDrawing extends BaseDrawing {
4
+ readonly drawingType = "ellipse";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
8
+ protected _createPaneView(): IPaneView;
9
+ }
10
+ export declare function createEllipse(id: string, points: AnchorPoint[], options: DrawingOptions): EllipseDrawing;
@@ -0,0 +1,10 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class FibArcDrawing extends BaseDrawing {
4
+ readonly drawingType = "fib-arc";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
8
+ protected _createPaneView(): IPaneView;
9
+ }
10
+ export declare function createFibArc(id: string, points: AnchorPoint[], options: DrawingOptions): FibArcDrawing;
@@ -0,0 +1,12 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class FibFanDrawing extends BaseDrawing {
4
+ readonly drawingType = "fib-fan";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ /** Extend a line from (x1,y1) through (tx,ty) to the chart edge. */
8
+ private _extendToEdge;
9
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
10
+ protected _createPaneView(): IPaneView;
11
+ }
12
+ export declare function createFibFan(id: string, points: AnchorPoint[], options: DrawingOptions): FibFanDrawing;
@@ -0,0 +1,11 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class FibProjectionDrawing extends BaseDrawing {
4
+ readonly drawingType = "fib-projection";
5
+ readonly requiredPoints = 3;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ private _getLevelYs;
8
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
9
+ protected _createPaneView(): IPaneView;
10
+ }
11
+ export declare function createFibProjection(id: string, points: AnchorPoint[], options: DrawingOptions): FibProjectionDrawing;
@@ -0,0 +1,11 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class FibonacciDrawing extends BaseDrawing {
4
+ readonly drawingType = "fibonacci";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ private _getLevelYs;
8
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
9
+ protected _createPaneView(): IPaneView;
10
+ }
11
+ export declare function createFibonacci(id: string, points: AnchorPoint[], options: DrawingOptions): FibonacciDrawing;
@@ -0,0 +1,10 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class HorizontalLineDrawing extends BaseDrawing {
4
+ readonly drawingType = "horizontal-line";
5
+ readonly requiredPoints = 1;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
8
+ protected _createPaneView(): IPaneView;
9
+ }
10
+ export declare function createHorizontalLine(id: string, points: AnchorPoint[], options: DrawingOptions): HorizontalLineDrawing;
@@ -0,0 +1,7 @@
1
+ import { ISeriesPrimitive } from '../core/types';
2
+ import { DrawingFactory, AnchorPoint, DrawingOptions, DrawingPrimitive } from './base';
3
+ export type { AnchorPoint, DrawingOptions, DrawingHitTestResult, SerializedDrawing, DrawingPrimitive, DrawingContext, DrawingFactory } from './base';
4
+ export { distToSegment, pointInRect, HIT_THRESHOLD, BaseDrawing } from './base';
5
+ export declare const DRAWING_REGISTRY: Map<string, DrawingFactory>;
6
+ export declare function registerBuiltinDrawings(): void;
7
+ export declare function createBuiltinDrawing(type: string, id: string, points: AnchorPoint[], options: DrawingOptions): (ISeriesPrimitive & DrawingPrimitive) | null;
@@ -0,0 +1,11 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class MeasurementDrawing extends BaseDrawing {
4
+ readonly drawingType = "measurement";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ private _buildLabel;
8
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
9
+ protected _createPaneView(): IPaneView;
10
+ }
11
+ export declare function createMeasurement(id: string, points: AnchorPoint[], options: DrawingOptions): MeasurementDrawing;
@@ -0,0 +1,12 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class PitchforkDrawing extends BaseDrawing {
4
+ readonly drawingType = "pitchfork";
5
+ readonly requiredPoints = 3;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ /** Given pivot (px,py), midpoint (mx,my), and extension factor, return end point. */
8
+ private _extendLine;
9
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
10
+ protected _createPaneView(): IPaneView;
11
+ }
12
+ export declare function createPitchfork(id: string, points: AnchorPoint[], options: DrawingOptions): PitchforkDrawing;
@@ -0,0 +1,12 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class RayDrawing extends BaseDrawing {
4
+ readonly drawingType = "ray";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ /** Compute the point where the ray exits the chart bounds. */
8
+ private _extendedEnd;
9
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
10
+ protected _createPaneView(): IPaneView;
11
+ }
12
+ export declare function createRay(id: string, points: AnchorPoint[], options: DrawingOptions): RayDrawing;
@@ -0,0 +1,10 @@
1
+ import { IPaneView } from '../core/types';
2
+ import { BaseDrawing, AnchorPoint, DrawingOptions, DrawingHitTestResult } from './base';
3
+ export declare class RectangleDrawing extends BaseDrawing {
4
+ readonly drawingType = "rectangle";
5
+ readonly requiredPoints = 2;
6
+ constructor(id: string, points: AnchorPoint[], options: DrawingOptions);
7
+ _hitTestDrawing(x: number, y: number): DrawingHitTestResult | null;
8
+ protected _createPaneView(): IPaneView;
9
+ }
10
+ export declare function createRectangle(id: string, points: AnchorPoint[], options: DrawingOptions): RectangleDrawing;