@sophistry/charts 0.0.0-stage → 0.0.1

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 (427) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -2
  3. package/dist/3d/bar-chart3d.d.ts +56 -0
  4. package/dist/3d/bar-chart3d.d.ts.map +1 -0
  5. package/dist/3d/definitions.d.ts +38 -0
  6. package/dist/3d/definitions.d.ts.map +1 -0
  7. package/dist/3d/definitions.js +14 -0
  8. package/dist/3d/forward.d.ts +65 -0
  9. package/dist/3d/forward.d.ts.map +1 -0
  10. package/dist/3d/index.d.ts +31 -0
  11. package/dist/3d/index.d.ts.map +1 -0
  12. package/dist/3d/index.js +1 -0
  13. package/dist/3d/quiver3d.d.ts +53 -0
  14. package/dist/3d/quiver3d.d.ts.map +1 -0
  15. package/dist/3d/scatter3d.d.ts +45 -0
  16. package/dist/3d/scatter3d.d.ts.map +1 -0
  17. package/dist/3d/stem3d.d.ts +46 -0
  18. package/dist/3d/stem3d.d.ts.map +1 -0
  19. package/dist/3d/surface-grid3d.d.ts +34 -0
  20. package/dist/3d/surface-grid3d.d.ts.map +1 -0
  21. package/dist/3d/tri-surface3d.d.ts +46 -0
  22. package/dist/3d/tri-surface3d.d.ts.map +1 -0
  23. package/dist/3d/voxels3d.d.ts +26 -0
  24. package/dist/3d/voxels3d.d.ts.map +1 -0
  25. package/dist/3d/wireframe3d.d.ts +31 -0
  26. package/dist/3d/wireframe3d.d.ts.map +1 -0
  27. package/dist/band.d.ts +21 -0
  28. package/dist/band.d.ts.map +1 -0
  29. package/dist/bars/bar-chart.d.ts +144 -0
  30. package/dist/bars/bar-chart.d.ts.map +1 -0
  31. package/dist/bars/bar-labels.d.ts +117 -0
  32. package/dist/bars/bar-labels.d.ts.map +1 -0
  33. package/dist/bars/bars.d.ts +224 -0
  34. package/dist/bars/bars.d.ts.map +1 -0
  35. package/dist/bars/bullet.d.ts +158 -0
  36. package/dist/bars/bullet.d.ts.map +1 -0
  37. package/dist/bars/candlestick.d.ts +98 -0
  38. package/dist/bars/candlestick.d.ts.map +1 -0
  39. package/dist/bars/funnel.d.ts +91 -0
  40. package/dist/bars/funnel.d.ts.map +1 -0
  41. package/dist/bars/histogram.d.ts +109 -0
  42. package/dist/bars/histogram.d.ts.map +1 -0
  43. package/dist/bars/index.d.ts +23 -0
  44. package/dist/bars/index.d.ts.map +1 -0
  45. package/dist/bars/race.d.ts +29 -0
  46. package/dist/bars/race.d.ts.map +1 -0
  47. package/dist/bars/rules.d.ts +122 -0
  48. package/dist/bars/rules.d.ts.map +1 -0
  49. package/dist/bars/shared.d.ts +42 -0
  50. package/dist/bars/shared.d.ts.map +1 -0
  51. package/dist/bars/transforms.d.ts +250 -0
  52. package/dist/bars/transforms.d.ts.map +1 -0
  53. package/dist/bars/waterfall.d.ts +107 -0
  54. package/dist/bars/waterfall.d.ts.map +1 -0
  55. package/dist/batch.d.ts +143 -0
  56. package/dist/batch.d.ts.map +1 -0
  57. package/dist/channels-_Xf-p6Lx.js +56 -0
  58. package/dist/chart.d.ts +88 -0
  59. package/dist/chart.d.ts.map +1 -0
  60. package/dist/color-norm.d.ts +91 -0
  61. package/dist/color-norm.d.ts.map +1 -0
  62. package/dist/context.d.ts +112 -0
  63. package/dist/context.d.ts.map +1 -0
  64. package/dist/curves/density.d.ts +126 -0
  65. package/dist/curves/density.d.ts.map +1 -0
  66. package/dist/curves/ecdf.d.ts +73 -0
  67. package/dist/curves/ecdf.d.ts.map +1 -0
  68. package/dist/curves/fill-between.d.ts +101 -0
  69. package/dist/curves/fill-between.d.ts.map +1 -0
  70. package/dist/curves/index.d.ts +16 -0
  71. package/dist/curves/index.d.ts.map +1 -0
  72. package/dist/curves/line-plot.d.ts +105 -0
  73. package/dist/curves/line-plot.d.ts.map +1 -0
  74. package/dist/curves/regression.d.ts +125 -0
  75. package/dist/curves/regression.d.ts.map +1 -0
  76. package/dist/curves/shared.d.ts +53 -0
  77. package/dist/curves/shared.d.ts.map +1 -0
  78. package/dist/curves/stack-plot.d.ts +141 -0
  79. package/dist/curves/stack-plot.d.ts.map +1 -0
  80. package/dist/curves/stairs.d.ts +171 -0
  81. package/dist/curves/stairs.d.ts.map +1 -0
  82. package/dist/data/channels.d.ts +171 -0
  83. package/dist/data/channels.d.ts.map +1 -0
  84. package/dist/end-space.d.ts +82 -0
  85. package/dist/end-space.d.ts.map +1 -0
  86. package/dist/entries/definitions.d.ts +21 -0
  87. package/dist/entries/definitions.d.ts.map +1 -0
  88. package/dist/entries/definitions.js +6 -0
  89. package/dist/frame/band-axis.d.ts +43 -0
  90. package/dist/frame/band-axis.d.ts.map +1 -0
  91. package/dist/frame/coords.d.ts +112 -0
  92. package/dist/frame/coords.d.ts.map +1 -0
  93. package/dist/frame/fit.d.ts +171 -0
  94. package/dist/frame/fit.d.ts.map +1 -0
  95. package/dist/frame/format.d.ts +41 -0
  96. package/dist/frame/format.d.ts.map +1 -0
  97. package/dist/frame/guide-metrics.d.ts +37 -0
  98. package/dist/frame/guide-metrics.d.ts.map +1 -0
  99. package/dist/frame/guides.d.ts +68 -0
  100. package/dist/frame/guides.d.ts.map +1 -0
  101. package/dist/frame/keys.d.ts +97 -0
  102. package/dist/frame/keys.d.ts.map +1 -0
  103. package/dist/frame/layout.d.ts +146 -0
  104. package/dist/frame/layout.d.ts.map +1 -0
  105. package/dist/frame/registry.d.ts +32 -0
  106. package/dist/frame/registry.d.ts.map +1 -0
  107. package/dist/frame/reports.d.ts +54 -0
  108. package/dist/frame/reports.d.ts.map +1 -0
  109. package/dist/frame/secondary-axes.d.ts +74 -0
  110. package/dist/frame/secondary-axes.d.ts.map +1 -0
  111. package/dist/frame/secondary.d.ts +57 -0
  112. package/dist/frame/secondary.d.ts.map +1 -0
  113. package/dist/frame/tooltip-overlay.d.ts +65 -0
  114. package/dist/frame/tooltip-overlay.d.ts.map +1 -0
  115. package/dist/frame/types.d.ts +659 -0
  116. package/dist/frame/types.d.ts.map +1 -0
  117. package/dist/grids/barbs.d.ts +52 -0
  118. package/dist/grids/barbs.d.ts.map +1 -0
  119. package/dist/grids/cell-rects.d.ts +38 -0
  120. package/dist/grids/cell-rects.d.ts.map +1 -0
  121. package/dist/grids/cells.d.ts +131 -0
  122. package/dist/grids/cells.d.ts.map +1 -0
  123. package/dist/grids/contour-f.d.ts +81 -0
  124. package/dist/grids/contour-f.d.ts.map +1 -0
  125. package/dist/grids/contour-shared.d.ts +54 -0
  126. package/dist/grids/contour-shared.d.ts.map +1 -0
  127. package/dist/grids/contour.d.ts +85 -0
  128. package/dist/grids/contour.d.ts.map +1 -0
  129. package/dist/grids/dendrogram.d.ts +105 -0
  130. package/dist/grids/dendrogram.d.ts.map +1 -0
  131. package/dist/grids/heatmap.d.ts +164 -0
  132. package/dist/grids/heatmap.d.ts.map +1 -0
  133. package/dist/grids/hex-bin.d.ts +94 -0
  134. package/dist/grids/hex-bin.d.ts.map +1 -0
  135. package/dist/grids/hist2d.d.ts +108 -0
  136. package/dist/grids/hist2d.d.ts.map +1 -0
  137. package/dist/grids/imshow.d.ts +85 -0
  138. package/dist/grids/imshow.d.ts.map +1 -0
  139. package/dist/grids/index.d.ts +27 -0
  140. package/dist/grids/index.d.ts.map +1 -0
  141. package/dist/grids/pcolormesh.d.ts +91 -0
  142. package/dist/grids/pcolormesh.d.ts.map +1 -0
  143. package/dist/grids/ramp-cells.d.ts +67 -0
  144. package/dist/grids/ramp-cells.d.ts.map +1 -0
  145. package/dist/grids/tri-contour.d.ts +121 -0
  146. package/dist/grids/tri-contour.d.ts.map +1 -0
  147. package/dist/grids/tri-shared.d.ts +62 -0
  148. package/dist/grids/tri-shared.d.ts.map +1 -0
  149. package/dist/grids/tripcolor.d.ts +74 -0
  150. package/dist/grids/tripcolor.d.ts.map +1 -0
  151. package/dist/guides/colorbar.d.ts +111 -0
  152. package/dist/guides/colorbar.d.ts.map +1 -0
  153. package/dist/guides/index.d.ts +12 -0
  154. package/dist/guides/index.d.ts.map +1 -0
  155. package/dist/guides/legend.d.ts +119 -0
  156. package/dist/guides/legend.d.ts.map +1 -0
  157. package/dist/guides/nodes.d.ts +14 -0
  158. package/dist/guides/nodes.d.ts.map +1 -0
  159. package/dist/guides/size-legend.d.ts +234 -0
  160. package/dist/guides/size-legend.d.ts.map +1 -0
  161. package/dist/hierarchy/breadcrumbs.d.ts +134 -0
  162. package/dist/hierarchy/breadcrumbs.d.ts.map +1 -0
  163. package/dist/hierarchy/circle-pack.d.ts +73 -0
  164. package/dist/hierarchy/circle-pack.d.ts.map +1 -0
  165. package/dist/hierarchy/drill.d.ts +246 -0
  166. package/dist/hierarchy/drill.d.ts.map +1 -0
  167. package/dist/hierarchy/frame.d.ts +68 -0
  168. package/dist/hierarchy/frame.d.ts.map +1 -0
  169. package/dist/hierarchy/icicle.d.ts +77 -0
  170. package/dist/hierarchy/icicle.d.ts.map +1 -0
  171. package/dist/hierarchy/index.d.ts +21 -0
  172. package/dist/hierarchy/index.d.ts.map +1 -0
  173. package/dist/hierarchy/labels.d.ts +25 -0
  174. package/dist/hierarchy/labels.d.ts.map +1 -0
  175. package/dist/hierarchy/mosaic.d.ts +131 -0
  176. package/dist/hierarchy/mosaic.d.ts.map +1 -0
  177. package/dist/hierarchy/own-tooltip.d.ts +13 -0
  178. package/dist/hierarchy/own-tooltip.d.ts.map +1 -0
  179. package/dist/hierarchy/props.d.ts +14 -0
  180. package/dist/hierarchy/props.d.ts.map +1 -0
  181. package/dist/hierarchy/sankey.d.ts +133 -0
  182. package/dist/hierarchy/sankey.d.ts.map +1 -0
  183. package/dist/hierarchy/shared.d.ts +248 -0
  184. package/dist/hierarchy/shared.d.ts.map +1 -0
  185. package/dist/hierarchy/sunburst.d.ts +75 -0
  186. package/dist/hierarchy/sunburst.d.ts.map +1 -0
  187. package/dist/hierarchy/tree.d.ts +125 -0
  188. package/dist/hierarchy/tree.d.ts.map +1 -0
  189. package/dist/hierarchy/treemap.d.ts +77 -0
  190. package/dist/hierarchy/treemap.d.ts.map +1 -0
  191. package/dist/index.d.ts +30 -0
  192. package/dist/index.d.ts.map +1 -0
  193. package/dist/index.js +5 -0
  194. package/dist/item-tooltip.d.ts +34 -0
  195. package/dist/item-tooltip.d.ts.map +1 -0
  196. package/dist/join.d.ts +224 -0
  197. package/dist/join.d.ts.map +1 -0
  198. package/dist/math/3d/bar3d.d.ts +28 -0
  199. package/dist/math/3d/bar3d.d.ts.map +1 -0
  200. package/dist/math/3d/quiver3d.d.ts +27 -0
  201. package/dist/math/3d/quiver3d.d.ts.map +1 -0
  202. package/dist/math/3d/scatter3d.d.ts +16 -0
  203. package/dist/math/3d/scatter3d.d.ts.map +1 -0
  204. package/dist/math/3d/stem3d.d.ts +23 -0
  205. package/dist/math/3d/stem3d.d.ts.map +1 -0
  206. package/dist/math/3d/surfaceGrid3d.d.ts +34 -0
  207. package/dist/math/3d/surfaceGrid3d.d.ts.map +1 -0
  208. package/dist/math/3d/trisurface.d.ts +12 -0
  209. package/dist/math/3d/trisurface.d.ts.map +1 -0
  210. package/dist/math/3d/voxels.d.ts +18 -0
  211. package/dist/math/3d/voxels.d.ts.map +1 -0
  212. package/dist/math/aggregate.d.ts +69 -0
  213. package/dist/math/aggregate.d.ts.map +1 -0
  214. package/dist/math/bar.d.ts +32 -0
  215. package/dist/math/bar.d.ts.map +1 -0
  216. package/dist/math/barLabels.d.ts +84 -0
  217. package/dist/math/barLabels.d.ts.map +1 -0
  218. package/dist/math/barbs.d.ts +37 -0
  219. package/dist/math/barbs.d.ts.map +1 -0
  220. package/dist/math/boxplot.d.ts +37 -0
  221. package/dist/math/boxplot.d.ts.map +1 -0
  222. package/dist/math/breadcrumbs.d.ts +129 -0
  223. package/dist/math/breadcrumbs.d.ts.map +1 -0
  224. package/dist/math/bubble.d.ts +39 -0
  225. package/dist/math/bubble.d.ts.map +1 -0
  226. package/dist/math/bullet.d.ts +111 -0
  227. package/dist/math/bullet.d.ts.map +1 -0
  228. package/dist/math/chord.d.ts +104 -0
  229. package/dist/math/chord.d.ts.map +1 -0
  230. package/dist/math/cluster.d.ts +89 -0
  231. package/dist/math/cluster.d.ts.map +1 -0
  232. package/dist/math/contour.d.ts +49 -0
  233. package/dist/math/contour.d.ts.map +1 -0
  234. package/dist/math/contourf.d.ts +51 -0
  235. package/dist/math/contourf.d.ts.map +1 -0
  236. package/dist/math/dodge.d.ts +37 -0
  237. package/dist/math/dodge.d.ts.map +1 -0
  238. package/dist/math/ecdf.d.ts +42 -0
  239. package/dist/math/ecdf.d.ts.map +1 -0
  240. package/dist/math/errorbar.d.ts +28 -0
  241. package/dist/math/errorbar.d.ts.map +1 -0
  242. package/dist/math/eventplot.d.ts +27 -0
  243. package/dist/math/eventplot.d.ts.map +1 -0
  244. package/dist/math/facet.d.ts +91 -0
  245. package/dist/math/facet.d.ts.map +1 -0
  246. package/dist/math/fillBetween.d.ts +29 -0
  247. package/dist/math/fillBetween.d.ts.map +1 -0
  248. package/dist/math/gauge.d.ts +72 -0
  249. package/dist/math/gauge.d.ts.map +1 -0
  250. package/dist/math/hexbin.d.ts +21 -0
  251. package/dist/math/hexbin.d.ts.map +1 -0
  252. package/dist/math/hierarchy.d.ts +180 -0
  253. package/dist/math/hierarchy.d.ts.map +1 -0
  254. package/dist/math/hierarchyJoin.d.ts +60 -0
  255. package/dist/math/hierarchyJoin.d.ts.map +1 -0
  256. package/dist/math/histogram.d.ts +37 -0
  257. package/dist/math/histogram.d.ts.map +1 -0
  258. package/dist/math/histogram2d.d.ts +45 -0
  259. package/dist/math/histogram2d.d.ts.map +1 -0
  260. package/dist/math/imshow.d.ts +27 -0
  261. package/dist/math/imshow.d.ts.map +1 -0
  262. package/dist/math/index.d.ts +140 -0
  263. package/dist/math/index.d.ts.map +1 -0
  264. package/dist/math/index.js +3 -0
  265. package/dist/math/jitter.d.ts +17 -0
  266. package/dist/math/jitter.d.ts.map +1 -0
  267. package/dist/math/join.d.ts +136 -0
  268. package/dist/math/join.d.ts.map +1 -0
  269. package/dist/math/keyframes.d.ts +128 -0
  270. package/dist/math/keyframes.d.ts.map +1 -0
  271. package/dist/math/legend.d.ts +121 -0
  272. package/dist/math/legend.d.ts.map +1 -0
  273. package/dist/math/line.d.ts +54 -0
  274. package/dist/math/line.d.ts.map +1 -0
  275. package/dist/math/morph.d.ts +82 -0
  276. package/dist/math/morph.d.ts.map +1 -0
  277. package/dist/math/mosaic.d.ts +120 -0
  278. package/dist/math/mosaic.d.ts.map +1 -0
  279. package/dist/math/ordinal.d.ts +80 -0
  280. package/dist/math/ordinal.d.ts.map +1 -0
  281. package/dist/math/parallel.d.ts +39 -0
  282. package/dist/math/parallel.d.ts.map +1 -0
  283. package/dist/math/pcolormesh.d.ts +23 -0
  284. package/dist/math/pcolormesh.d.ts.map +1 -0
  285. package/dist/math/pie.d.ts +106 -0
  286. package/dist/math/pie.d.ts.map +1 -0
  287. package/dist/math/polarArea.d.ts +35 -0
  288. package/dist/math/polarArea.d.ts.map +1 -0
  289. package/dist/math/radar.d.ts +111 -0
  290. package/dist/math/radar.d.ts.map +1 -0
  291. package/dist/math/range.d.ts +99 -0
  292. package/dist/math/range.d.ts.map +1 -0
  293. package/dist/math/regression.d.ts +110 -0
  294. package/dist/math/regression.d.ts.map +1 -0
  295. package/dist/math/reveal.d.ts +64 -0
  296. package/dist/math/reveal.d.ts.map +1 -0
  297. package/dist/math/sankey.d.ts +155 -0
  298. package/dist/math/sankey.d.ts.map +1 -0
  299. package/dist/math/scatter.d.ts +15 -0
  300. package/dist/math/scatter.d.ts.map +1 -0
  301. package/dist/math/shared/binning.d.ts +24 -0
  302. package/dist/math/shared/binning.d.ts.map +1 -0
  303. package/dist/math/shared/gridCells.d.ts +42 -0
  304. package/dist/math/shared/gridCells.d.ts.map +1 -0
  305. package/dist/math/shared/gridExtent.d.ts +6 -0
  306. package/dist/math/shared/gridExtent.d.ts.map +1 -0
  307. package/dist/math/shared/pairs.d.ts +3 -0
  308. package/dist/math/shared/pairs.d.ts.map +1 -0
  309. package/dist/math/shared/polar.d.ts +24 -0
  310. package/dist/math/shared/polar.d.ts.map +1 -0
  311. package/dist/math/stack.d.ts +70 -0
  312. package/dist/math/stack.d.ts.map +1 -0
  313. package/dist/math/stackplot.d.ts +36 -0
  314. package/dist/math/stackplot.d.ts.map +1 -0
  315. package/dist/math/stairs.d.ts +18 -0
  316. package/dist/math/stairs.d.ts.map +1 -0
  317. package/dist/math/stem.d.ts +22 -0
  318. package/dist/math/stem.d.ts.map +1 -0
  319. package/dist/math/symbol.d.ts +26 -0
  320. package/dist/math/symbol.d.ts.map +1 -0
  321. package/dist/math/tree.d.ts +118 -0
  322. package/dist/math/tree.d.ts.map +1 -0
  323. package/dist/math/tricontour.d.ts +77 -0
  324. package/dist/math/tricontour.d.ts.map +1 -0
  325. package/dist/math/violin.d.ts +100 -0
  326. package/dist/math/violin.d.ts.map +1 -0
  327. package/dist/math/waffle.d.ts +49 -0
  328. package/dist/math/waffle.d.ts.map +1 -0
  329. package/dist/math/waterfall.d.ts +29 -0
  330. package/dist/math/waterfall.d.ts.map +1 -0
  331. package/dist/math-CSHNpGej.js +3648 -0
  332. package/dist/mix.d.ts +25 -0
  333. package/dist/mix.d.ts.map +1 -0
  334. package/dist/multiview/brush.d.ts +166 -0
  335. package/dist/multiview/brush.d.ts.map +1 -0
  336. package/dist/multiview/chart-group.d.ts +266 -0
  337. package/dist/multiview/chart-group.d.ts.map +1 -0
  338. package/dist/multiview/chart-link.d.ts +189 -0
  339. package/dist/multiview/chart-link.d.ts.map +1 -0
  340. package/dist/multiview/chart-zoom.d.ts +145 -0
  341. package/dist/multiview/chart-zoom.d.ts.map +1 -0
  342. package/dist/multiview/facet.d.ts +239 -0
  343. package/dist/multiview/facet.d.ts.map +1 -0
  344. package/dist/multiview/group-guides.d.ts +100 -0
  345. package/dist/multiview/group-guides.d.ts.map +1 -0
  346. package/dist/multiview/index.d.ts +18 -0
  347. package/dist/multiview/index.d.ts.map +1 -0
  348. package/dist/multiview/joint-plot.d.ts +115 -0
  349. package/dist/multiview/joint-plot.d.ts.map +1 -0
  350. package/dist/multiview/pair-plot.d.ts +154 -0
  351. package/dist/multiview/pair-plot.d.ts.map +1 -0
  352. package/dist/multiview/panels.d.ts +23 -0
  353. package/dist/multiview/panels.d.ts.map +1 -0
  354. package/dist/multiview/parallel-coordinates.d.ts +110 -0
  355. package/dist/multiview/parallel-coordinates.d.ts.map +1 -0
  356. package/dist/points/event-plot.d.ts +68 -0
  357. package/dist/points/event-plot.d.ts.map +1 -0
  358. package/dist/points/index.d.ts +20 -0
  359. package/dist/points/index.d.ts.map +1 -0
  360. package/dist/points/labels.d.ts +71 -0
  361. package/dist/points/labels.d.ts.map +1 -0
  362. package/dist/points/links.d.ts +124 -0
  363. package/dist/points/links.d.ts.map +1 -0
  364. package/dist/points/rects.d.ts +81 -0
  365. package/dist/points/rects.d.ts.map +1 -0
  366. package/dist/points/rug.d.ts +73 -0
  367. package/dist/points/rug.d.ts.map +1 -0
  368. package/dist/points/scatter.d.ts +170 -0
  369. package/dist/points/scatter.d.ts.map +1 -0
  370. package/dist/points/segment-marks.d.ts +40 -0
  371. package/dist/points/segment-marks.d.ts.map +1 -0
  372. package/dist/points/shared.d.ts +35 -0
  373. package/dist/points/shared.d.ts.map +1 -0
  374. package/dist/points/stem.d.ts +76 -0
  375. package/dist/points/stem.d.ts.map +1 -0
  376. package/dist/points/strip.d.ts +146 -0
  377. package/dist/points/strip.d.ts.map +1 -0
  378. package/dist/points/symbol-marker.d.ts +34 -0
  379. package/dist/points/symbol-marker.d.ts.map +1 -0
  380. package/dist/points/ticks.d.ts +103 -0
  381. package/dist/points/ticks.d.ts.map +1 -0
  382. package/dist/props.d.ts +127 -0
  383. package/dist/props.d.ts.map +1 -0
  384. package/dist/radial/chord.d.ts +149 -0
  385. package/dist/radial/chord.d.ts.map +1 -0
  386. package/dist/radial/gauge.d.ts +127 -0
  387. package/dist/radial/gauge.d.ts.map +1 -0
  388. package/dist/radial/index.d.ts +16 -0
  389. package/dist/radial/index.d.ts.map +1 -0
  390. package/dist/radial/pie-chart.d.ts +144 -0
  391. package/dist/radial/pie-chart.d.ts.map +1 -0
  392. package/dist/radial/polar-area-chart.d.ts +136 -0
  393. package/dist/radial/polar-area-chart.d.ts.map +1 -0
  394. package/dist/radial/radar-chart.d.ts +177 -0
  395. package/dist/radial/radar-chart.d.ts.map +1 -0
  396. package/dist/radial/radial-bar-chart.d.ts +117 -0
  397. package/dist/radial/radial-bar-chart.d.ts.map +1 -0
  398. package/dist/radial/shared.d.ts +79 -0
  399. package/dist/radial/shared.d.ts.map +1 -0
  400. package/dist/radial/waffle.d.ts +131 -0
  401. package/dist/radial/waffle.d.ts.map +1 -0
  402. package/dist/raster.d.ts +44 -0
  403. package/dist/raster.d.ts.map +1 -0
  404. package/dist/series.d.ts +72 -0
  405. package/dist/series.d.ts.map +1 -0
  406. package/dist/src-CwGo1bes.js +19221 -0
  407. package/dist/stagger.d.ts +55 -0
  408. package/dist/stagger.d.ts.map +1 -0
  409. package/dist/statistics/box-plot.d.ts +152 -0
  410. package/dist/statistics/box-plot.d.ts.map +1 -0
  411. package/dist/statistics/error-bar.d.ts +149 -0
  412. package/dist/statistics/error-bar.d.ts.map +1 -0
  413. package/dist/statistics/groups.d.ts +141 -0
  414. package/dist/statistics/groups.d.ts.map +1 -0
  415. package/dist/statistics/index.d.ts +8 -0
  416. package/dist/statistics/index.d.ts.map +1 -0
  417. package/dist/statistics/violin-plot.d.ts +144 -0
  418. package/dist/statistics/violin-plot.d.ts.map +1 -0
  419. package/dist/text-width.d.ts +10 -0
  420. package/dist/text-width.d.ts.map +1 -0
  421. package/dist/tooltip.d.ts +277 -0
  422. package/dist/tooltip.d.ts.map +1 -0
  423. package/dist/util.d.ts +34 -0
  424. package/dist/util.d.ts.map +1 -0
  425. package/dist/voxels-9lJ2TZS4.js +235 -0
  426. package/dist/wireframe3d-D157GZAq.js +345 -0
  427. package/package.json +86 -3
@@ -0,0 +1,98 @@
1
+ /**
2
+ * `candlestick`: candles (or OHLC bars) for price data. The wicks (and the
3
+ * OHLC ticks) are one instances node of `line`s, the bodies one of `rect`s.
4
+ *
5
+ * On reveal, each line's `progress` channel traces a wick from its low end
6
+ * and an OHLC tick out from its end, and a body grows from the open
7
+ * towards the close; a body not started is left out of the batch.
8
+ * Every wick paints under every body (candles don't overlap, so this
9
+ * looks the same as painting them candle by candle).
10
+ */
11
+ import type { ColorInput } from "@sophistry/core/color";
12
+ import type { BandKey } from "@sophistry/core/geometry";
13
+ import type { Channel, PositionValue } from "../data/channels";
14
+ import type { TooltipSpec } from "../tooltip";
15
+ /**
16
+ * Props of {@link candlestick}.
17
+ *
18
+ * @category Charts
19
+ */
20
+ export interface CandlestickProps<T = unknown> {
21
+ /** One candle per datum: a period. */
22
+ data: readonly T[];
23
+ /**
24
+ * The period: a `Date`, Temporal value or epoch ms on a time axis, a number, or a category on a
25
+ * band axis.
26
+ */
27
+ x: Channel<T, BandKey | PositionValue>;
28
+ /** Price at the period's open. */
29
+ open: Channel<T, number>;
30
+ /** Highest price in the period. */
31
+ high: Channel<T, number>;
32
+ /** Lowest price in the period. */
33
+ low: Channel<T, number>;
34
+ /** Price at the period's close. */
35
+ close: Channel<T, number>;
36
+ /**
37
+ * Body width: a fraction of the band on a band axis, or of the smallest gap between periods on
38
+ * a continuous one.
39
+ * @default 0.6
40
+ */
41
+ bodyWidth?: number;
42
+ /**
43
+ * Draw OHLC bars (open tick left, close tick right) instead of candles.
44
+ * @default false
45
+ */
46
+ ohlc?: boolean;
47
+ /** Colour of a period that closed up. Defaults to the theme's positive colour. */
48
+ upColor?: ColorInput;
49
+ /** Colour of a period that closed down. Defaults to the theme's negative colour. */
50
+ downColor?: ColorInput;
51
+ /** Wick and OHLC line width. */
52
+ strokeWidth?: number;
53
+ /**
54
+ * Reveal, 0..1: each wick draws from low to high, then its body grows from open to close.
55
+ * @see https://sophistry.dev/guides/chart-animation/#reveals
56
+ */
57
+ progress?: number;
58
+ /**
59
+ * Fraction of the reveal spent staggering period after period in time order, 0..0.95.
60
+ * @default 0
61
+ */
62
+ stagger?: number;
63
+ /**
64
+ * Hover tooltip: `true` for a row per channel (`x`, `open`, `high`, `low`, `close`), or a
65
+ * template, function or options. See {@link TooltipSpec}.
66
+ */
67
+ tooltip?: TooltipSpec<T>;
68
+ zIndex?: number;
69
+ visible?: boolean;
70
+ }
71
+ /**
72
+ * Candlesticks (or OHLC bars) for price data, inside a `chart` on a time
73
+ * axis (`xAxis: { scale: "utc" }`) or a category axis. Wicks span low to
74
+ * high, bodies open to close coloured by direction; the value axis fits the
75
+ * prices without forcing zero.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * import { candlestick, chart } from "@sophistry/charts";
80
+ *
81
+ * const prices = [
82
+ * { day: new Date("2024-03-04"), o: 101, h: 106, l: 99, c: 104 },
83
+ * { day: new Date("2024-03-05"), o: 104, h: 105, l: 97, c: 98 },
84
+ * { day: new Date("2024-03-06"), o: 98, h: 103, l: 96, c: 102 },
85
+ * ];
86
+ * chart.create({
87
+ * width: 8,
88
+ * height: 4,
89
+ * xAxis: { scale: "utc" },
90
+ * children: [candlestick.create({ data: prices, x: "day", open: "o", high: "h", low: "l", close: "c" })],
91
+ * });
92
+ * ```
93
+ *
94
+ * @see https://sophistry.dev/reference/chart-catalogue/#waterfalls-funnels-and-candlesticks
95
+ * @category Charts
96
+ */
97
+ export declare const candlestick: import("@sophistry/core").Definition<CandlestickProps<any>, import("@sophistry/core/internal").CompositeNode<CandlestickProps<any>>, keyof CandlestickProps<any>>;
98
+ //# sourceMappingURL=candlestick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candlestick.d.ts","sourceRoot":"","sources":["../../src/bars/candlestick.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,0BAA0B,CAAC;AAOvE,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MA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* `chart` with a band y axis whose one layer (the internal `FunnelStages`)
4
+ * draws the stages as one instances node of `rect`s, the necks between them
5
+ * as one path batch (each neck is its own trapezoid), and the names and
6
+ * values as label nodes.
7
+ */
8
+ import type { ColorInput } from "@sophistry/core/color";
9
+ import type { Point } from "@sophistry/core/geometry";
10
+ import type { Channel, ColorChannel } from "../data/channels";
11
+ import type { TooltipSpec } from "../tooltip";
12
+ /**
13
+ * Props of {@link funnel}: `value` is required unless `data` is `number[]`.
14
+ *
15
+ * @category Charts
16
+ */
17
+ export interface FunnelProps<T = unknown> {
18
+ /** One stage per datum, widest (first) at the top. */
19
+ data: readonly T[];
20
+ /** How many reached this stage. Defaults to the datum when `data` is `number[]`. */
21
+ value?: Channel<T, number>;
22
+ /** The stage's name, drawn to its left. Omitted, no names are drawn. */
23
+ label?: Channel<T, string>;
24
+ /** Width of the plotting area. */
25
+ width: number;
26
+ /** Height of the plotting area. */
27
+ height: number;
28
+ /** Centre of the plotting area. Defaults to the origin. */
29
+ center?: Point;
30
+ /** One colour for every stage, or `(d, i) => colour`. Wins over `colors`. */
31
+ color?: ColorChannel<T>;
32
+ /** Colours cycled across the stages. Defaults to the theme's categorical colours. */
33
+ colors?: readonly ColorInput[];
34
+ /**
35
+ * Fill opacity of the stages, 0..1.
36
+ * @default 0.85
37
+ */
38
+ fillOpacity?: number;
39
+ /**
40
+ * Gap between stages, as a fraction of a stage's slot.
41
+ * @default 0.25
42
+ */
43
+ padding?: number;
44
+ /**
45
+ * Shade the narrowing between stages.
46
+ * @default true
47
+ */
48
+ connectors?: boolean;
49
+ /**
50
+ * What to write in each stage: `"value"`, `"percent"` (of the first stage), `"both"`, or
51
+ * `"none"`.
52
+ * @default "both"
53
+ */
54
+ show?: "value" | "percent" | "both" | "none";
55
+ /** Title above the chart. */
56
+ title?: string;
57
+ /**
58
+ * Reveal, 0..1: stage names first, then each stage widens out from the centre, top to bottom.
59
+ * @see https://sophistry.dev/guides/chart-animation/#reveals
60
+ */
61
+ progress?: number;
62
+ /**
63
+ * Fraction of the data reveal spent staggering stage after stage, 0..0.95.
64
+ * @default 0.5
65
+ */
66
+ stagger?: number;
67
+ /** Hover tooltip: `true` for "stage: value (pct)", or `(d, i) => string`. */
68
+ tooltip?: TooltipSpec<T>;
69
+ zIndex?: number;
70
+ visible?: boolean;
71
+ }
72
+ /**
73
+ * A funnel: how many make it through each stage of a process. Stages stack
74
+ * top-down, each centred with a width proportional to its value, shaded
75
+ * necks showing the loss between them. A `chart` with a band y axis and no
76
+ * value axis.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * import { createScene } from "@sophistry/core";
81
+ * import { funnel } from "@sophistry/charts";
82
+ *
83
+ * const scene = createScene({ host: document.querySelector("#figure")!, units: 10 });
84
+ * scene.add(funnel.create({ data: [1200, 640, 310, 95], width: 6, height: 4 }));
85
+ * ```
86
+ *
87
+ * @see https://sophistry.dev/reference/chart-catalogue/#waterfalls-funnels-and-candlesticks
88
+ * @category Charts
89
+ */
90
+ export declare const funnel: import("@sophistry/core").Definition<FunnelProps<any>, import("@sophistry/core/internal").CompositeNode<FunnelProps<any>>, keyof FunnelProps<any>>;
91
+ //# sourceMappingURL=funnel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"funnel.d.ts","sourceRoot":"","sources":["../../src/bars/funnel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkBH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAmB,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAQvE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAW9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAY9C;;;;GAIG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACvC,sDAAsD;IACtD,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IACnB,oFAAoF;IACpF,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3B,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,6EAA6E;IAC7E,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,qFAAqF;IACrF,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7C,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AA0UD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM,oJAqBjB,CAAC"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * `histogram`: values bucketed into equal-width bins, one touching bar per
3
+ * bin, drawn as one instances node of `rect`s keyed by the bin's place.
4
+ *
5
+ * The reveal and a transition's presence grow each bar's top from the
6
+ * baseline (geometry) or, on an axis without zero, fade it (per-item
7
+ * opacity); a bin not started is left out of the batch (it counts as
8
+ * `progress` 0).
9
+ */
10
+ import type { ColorInput } from "@sophistry/core/color";
11
+ import type { Range } from "@sophistry/core/geometry";
12
+ import type { MarkTransition } from "../batch";
13
+ import type { Channel } from "../data/channels";
14
+ import type { RevealProps, TransitionProps } from "../props";
15
+ /**
16
+ * Props of {@link histogram}: `value` is required unless `data` is `number[]`.
17
+ *
18
+ * @category Charts
19
+ */
20
+ export interface HistogramProps<T = unknown> extends TransitionProps<T>, RevealProps {
21
+ /** One observation per datum. */
22
+ data: readonly T[];
23
+ /**
24
+ * The observed value, in data units. Defaults to the datum when `data` is `number[]`; required
25
+ * otherwise. Non-finite values and values outside `range` are not counted.
26
+ */
27
+ value?: Channel<T, number>;
28
+ /**
29
+ * Number of equal-width bins. Wins over a `range` step. Defaults to the count the `range` step
30
+ * implies, else 10.
31
+ */
32
+ binCount?: number;
33
+ /**
34
+ * `[min, max, step?]` spanned by the bins, in data units; `step` is the bin width when
35
+ * `binCount` is not given (`[0, 10, 2]` is five bins). Defaults to the finite extent of the
36
+ * values.
37
+ */
38
+ range?: Range;
39
+ /** Fill of every bar. Defaults to the theme's first series colour. */
40
+ color?: ColorInput;
41
+ /**
42
+ * Fill opacity, 0..1.
43
+ * @default 0.85
44
+ */
45
+ fillOpacity?: number;
46
+ /** Outline colour. @default "none" */
47
+ stroke?: string;
48
+ /** Outline width. */
49
+ strokeWidth?: number;
50
+ /** Opacity 0..1. @default 1 */
51
+ opacity?: number;
52
+ /**
53
+ * Reveal, 0..1: bars grow from the baseline (fading in when the axis has no zero).
54
+ * @default 1
55
+ */
56
+ progress?: number;
57
+ /**
58
+ * Fraction of the reveal spent staggering bin after bin, left to right, 0..0.95.
59
+ * @default 0
60
+ */
61
+ stagger?: number;
62
+ /**
63
+ * The data to transition to, bins matched by place: shared bins move their edges and counts, so
64
+ * every frame is a histogram; extra bins grow in or shrink away. See {@link TransitionProps}.
65
+ * @see https://sophistry.dev/guides/chart-animation/#data-transitions
66
+ */
67
+ to?: readonly T[];
68
+ /**
69
+ * `to`'s bin count; `to={data}` with a new `toBinCount` re-bins as a transition. Defaults to
70
+ * `binCount`.
71
+ */
72
+ toBinCount?: number;
73
+ /** `to`'s binning range, as `range`. Defaults to `range`. */
74
+ toRange?: Range;
75
+ /**
76
+ * Fraction of a transition's enter stage spent staggering entering bins, left to right. See
77
+ * {@link TransitionProps}.
78
+ * @default 0
79
+ */
80
+ enterStagger?: number;
81
+ /**
82
+ * How bars move when `data` changes (outside a `to` blend): a tween or a
83
+ * spring in the node's tween bank. Omitted, data changes are instant.
84
+ */
85
+ transition?: MarkTransition;
86
+ /** Paint order; the bars paint at `zIndex + UNDER_AXES_Z_INDEX`. */
87
+ zIndex?: number;
88
+ visible?: boolean;
89
+ }
90
+ /**
91
+ * A histogram: values bucketed into equal-width bins, one touching bar per
92
+ * bin, its height the count. `progress` grows bars from the baseline
93
+ * (fading in when the axis has no zero). Inside a `chart` (which fits the
94
+ * counts) or an `axes`. See {@link histogramBins} for the binning rule (the
95
+ * last bin is right-inclusive). Drawn as one instances node of rects.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * import { chart, histogram } from "@sophistry/charts";
100
+ *
101
+ * const heights = [162, 170, 175, 168, 181, 159, 177, 173, 166, 185, 171, 169];
102
+ * chart.create({ width: 8, height: 4, children: [histogram.create({ data: heights, binCount: 12 })] });
103
+ * ```
104
+ *
105
+ * @see https://sophistry.dev/reference/chart-catalogue/#histograms
106
+ * @category Charts
107
+ */
108
+ export declare const histogram: import("@sophistry/core").Definition<HistogramProps<any>, import("@sophistry/core/internal").CompositeNode<HistogramProps<any>>, keyof HistogramProps<any>>;
109
+ //# sourceMappingURL=histogram.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"histogram.d.ts","sourceRoot":"","sources":["../../src/bars/histogram.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAmB,KAAK,EA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AO,CAAC,EAAE,OAAO,CAAC;CAClB;AAsLD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,6JAoDpB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /** Family barrel: bars and their kin. Owned by its family; re-exported from the package entry. */
2
+ export type { BarChartHandle, BarChartProps } from "./bar-chart";
3
+ export { barChart, barChartHandle } from "./bar-chart";
4
+ export type { BarLabelOptions } from "./bar-labels";
5
+ export type { BarsHandle, BarsProps } from "./bars";
6
+ export { bars, barsHandle } from "./bars";
7
+ export type { BulletProps } from "./bullet";
8
+ export { bullet, bulletTooltip } from "./bullet";
9
+ export type { CandlestickProps } from "./candlestick";
10
+ export { candlestick } from "./candlestick";
11
+ export type { FunnelProps } from "./funnel";
12
+ export { funnel } from "./funnel";
13
+ export type { HistogramProps } from "./histogram";
14
+ export { histogram } from "./histogram";
15
+ export type { RankRaceOptions } from "./race";
16
+ export { rankRace } from "./race";
17
+ export type { RuleBaseProps, RuleXProps, RuleYProps } from "./rules";
18
+ export { ruleX, ruleY } from "./rules";
19
+ export type { BinnedRow, BinOptions, DodgedRow, DodgeOptions, GroupedRow, GroupOptions, JitterTransformOptions, NormalizeOptions, RollingTransformOptions, StackedRow, StackOptions, SummarizeOptions, SummaryRow, } from "./transforms";
20
+ export { bin, dodge, group, jitter, normalize, rolling, stack, summarize, } from "./transforms";
21
+ export type { WaterfallProps } from "./waterfall";
22
+ export { waterfall } from "./waterfall";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bars/index.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAElG,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,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+ import type { Channel } from "../data/channels";
4
+ import type { RaceOptions, RaceTimeline } from "../math/keyframes";
5
+ /**
6
+ * Options for {@link rankRace}.
7
+ *
8
+ * @category Charts
9
+ */
10
+ export interface RankRaceOptions<T> extends RaceOptions {
11
+ /** What races: a key of `T` or `(d, i) => key`. */
12
+ key: Channel<T, BandKey>;
13
+ /** When the row's value holds: a key of `T` or `(d, i) => number`. */
14
+ time: Channel<T, number>;
15
+ /** The value: a key of `T` or `(d, i) => number`. */
16
+ value: Channel<T, number>;
17
+ }
18
+ /**
19
+ * A bar chart race from long-format rows (one per key per moment): see
20
+ * {@link raceTimeline}. Missing keys count as 0; duplicate rows are summed.
21
+ * Pass `view(time)`'s `categories` and `slot` to the `chart`'s `yAxis` (with
22
+ * `clip`) so bars and names slide together, and pin colours with
23
+ * `chart.create({ color: { domain: race.keys } })`.
24
+ *
25
+ * @see https://sophistry.dev/guides/chart-animation/#data-transitions
26
+ * @category Charts
27
+ */
28
+ export declare function rankRace<T>(rows: readonly T[], options: RankRaceOptions<T>): RaceTimeline;
29
+ //# sourceMappingURL=race.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"race.d.ts","sourceRoot":"","sources":["../../src/bars/race.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAInE;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,CAAE,SAAQ,WAAW;IACtD,mDAAmD;IACnD,GAAG,EAAE,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACzB,sEAAsE;IACtE,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACzB,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACzB,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,GACzB,YAAY,CA+Bd"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * `ruleX` / `ruleY`: reference lines across the plot, or segments between
3
+ * given ends, one per datum, drawn as one instances node of `line`s.
4
+ *
5
+ * Batched like every per-datum mark (see `points/scatter.ts`): each update
6
+ * builds one item per key (its two ends in scene units and its colour) and
7
+ * hands them to {@link createBatchedMark}. The reveal (and an entering or
8
+ * leaving rule's presence) is each item's `progress` channel: the line
9
+ * traces from its low end.
10
+ */
11
+ import type { BandKey } from "@sophistry/core/geometry";
12
+ import type { MarkTransition } from "../batch";
13
+ import type { Channel, ColorChannel, PositionValue } from "../data/channels";
14
+ import type { KeyedTransitionProps, RevealProps } from "../props";
15
+ import type { TooltipSpec } from "../tooltip";
16
+ /**
17
+ * Props every rule takes.
18
+ *
19
+ * @category Charts
20
+ */
21
+ export interface RuleBaseProps<T> extends KeyedTransitionProps<T>, RevealProps {
22
+ /** One rule per datum. `ruleY.create({ data: [0] })` is a zero line. */
23
+ data: readonly T[];
24
+ /** Rule colour, constant or `(d, i) => colour`. Defaults to the theme foreground. */
25
+ color?: ColorChannel<T>;
26
+ /** Line width. */
27
+ strokeWidth?: number;
28
+ /** Dash pattern, as on any line: `[0.1, 0.08]`. */
29
+ dash?: number[];
30
+ opacity?: number;
31
+ /**
32
+ * Reveal, 0..1: each rule draws from its low end to its high end.
33
+ * @default 1
34
+ */
35
+ progress?: number;
36
+ /**
37
+ * Hover tooltip: `true` for the rule's value, or a template, function or options. See {@link
38
+ * TooltipSpec}.
39
+ */
40
+ tooltip?: TooltipSpec<T>;
41
+ /**
42
+ * How rules move when `data` changes (outside a `to` blend): a tween or a
43
+ * spring in the node's tween bank; new rules draw out of their low end,
44
+ * removed ones draw back into it. Omitted, data changes are instant.
45
+ */
46
+ transition?: MarkTransition;
47
+ zIndex?: number;
48
+ visible?: boolean;
49
+ /**
50
+ * The data to transition to, matched to `data` by `key`: rules slide and stretch to their new
51
+ * place; new ones draw out, removed ones draw back in. See {@link KeyedTransitionProps}.
52
+ * @see https://sophistry.dev/guides/chart-animation/#data-transitions
53
+ */
54
+ to?: readonly T[];
55
+ }
56
+ /**
57
+ * Props of {@link ruleX}: `x` is required unless `data` is `number[]`.
58
+ *
59
+ * @category Charts
60
+ */
61
+ export interface RuleXProps<T = unknown> extends RuleBaseProps<T> {
62
+ /**
63
+ * Where the vertical rule stands: a number in data units (a `Date` reads as epoch ms) or a
64
+ * category on a band axis. Defaults to the datum when `data` is `number[]`.
65
+ */
66
+ x?: Channel<T, BandKey | PositionValue>;
67
+ /** Lower end, in data units. Defaults to the bottom of the plotting area. */
68
+ y1?: Channel<T, PositionValue>;
69
+ /** Upper end, in data units. Defaults to the top of the plotting area. */
70
+ y2?: Channel<T, PositionValue>;
71
+ }
72
+ /**
73
+ * Props of {@link ruleY}: `y` is required unless `data` is `number[]`.
74
+ *
75
+ * @category Charts
76
+ */
77
+ export interface RuleYProps<T = unknown> extends RuleBaseProps<T> {
78
+ /**
79
+ * Height of the horizontal rule: a number in data units (a `Date` reads as epoch ms) or a
80
+ * category on a band axis. Defaults to the datum when `data` is `number[]`.
81
+ */
82
+ y?: Channel<T, BandKey | PositionValue>;
83
+ /** Left end, in data units. Defaults to the left of the plotting area. */
84
+ x1?: Channel<T, PositionValue>;
85
+ /** Right end, in data units. Defaults to the right of the plotting area. */
86
+ x2?: Channel<T, PositionValue>;
87
+ }
88
+ /**
89
+ * Vertical reference lines across the plot; `y1`/`y2` shorten them to
90
+ * segments (a lollipop's stick, a candle's wick). Inside a `chart` or
91
+ * `axes`. Drawn as one instances node of lines: `event.key` is the datum's
92
+ * key.
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * import { chart, ruleX } from "@sophistry/charts";
97
+ *
98
+ * chart.create({ width: 8, height: 4, children: [ruleX.create({ data: [2, 5], dash: [0.1, 0.08] })] });
99
+ * ```
100
+ *
101
+ * @see https://sophistry.dev/guides/charts/#marks
102
+ * @category Charts
103
+ */
104
+ export declare const ruleX: import("@sophistry/core").Definition<RuleXProps<any>, import("@sophistry/core/internal").CompositeNode<RuleXProps<any>>, keyof RuleXProps<any>>;
105
+ /**
106
+ * Horizontal reference lines across the plot; `ruleY.create({ data: [0] })`
107
+ * is a zero line and `x1`/`x2` shorten them to segments. Inside a `chart`
108
+ * or `axes`. Drawn as one instances node of lines.
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * import { chart, linePlot, ruleY } from "@sophistry/charts";
113
+ *
114
+ * const data = [-2, 1, 3, -1, 4];
115
+ * chart.create({ width: 8, height: 4, children: [linePlot.create({ data }), ruleY.create({ data: [0] })] });
116
+ * ```
117
+ *
118
+ * @see https://sophistry.dev/guides/charts/#marks
119
+ * @category Charts
120
+ */
121
+ export declare const ruleY: import("@sophistry/core").Definition<RuleYProps<any>, import("@sophistry/core/internal").CompositeNode<RuleYProps<any>>, keyof RuleYProps<any>>;
122
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/bars/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,OAAO,KAAK,EAAE,OAAO,EAAS,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAkB7E,OAAO,KAAK,EAAY,oBAAoB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAK9C;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,CAAE,SAAQ,oBAAoB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,CAAC,CAAC;IAC/B,4EAA4E;IAC5E,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;CAC/B;AAqWD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,iJAwBhB,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,iJAwBhB,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Helpers the bar family shares: a label placed beside a point, box arithmetic, and the tooltip props a batched node
3
+ * takes. Internal to the family.
4
+ */
5
+ import type { Bounds, Placement, Point, Vec2 } from "@sophistry/core";
6
+ import type { TooltipState } from "../tooltip";
7
+ /** The metrics style labels are measured in: the label defaults. */
8
+ export declare function labelStyle(fontSize: number, fontFamily: string): {
9
+ fontSize: number;
10
+ fontFamily: string;
11
+ fontWeight: number;
12
+ italic: boolean;
13
+ letterSpacing: number;
14
+ };
15
+ /**
16
+ * Where a label goes to sit beside `at` (in `direction`, `gap` away) rather
17
+ * than centred on it, measured the same
18
+ * way core's axes place their end labels (the label's own width, one line
19
+ * height per font).
20
+ *
21
+ * @returns The label's `place`.
22
+ */
23
+ export declare function besidePlace(text: string, at: Point, direction: Vec2, gap: number, fontSize: number, fontFamily: string): Placement;
24
+ /** A box's centre. */
25
+ export declare function boxCenter(box: Bounds): Point;
26
+ /** The box spanned by two corners. */
27
+ export declare function boxOfCorners(a: Point, b: Point): Bounds;
28
+ /** Whether two boxes are equal field by field. */
29
+ export declare function sameBox(a: Bounds | null, b: Bounds | null): boolean;
30
+ /**
31
+ * The interaction props a batched node shares for item tooltips: the
32
+ * handlers when the chart has a tooltip and the mark (or the chart) asks for
33
+ * one, else none.
34
+ */
35
+ export declare function tooltipProps(tooltip: TooltipState | null, own: unknown, handlers: {
36
+ readonly label?: string;
37
+ readonly onEnter?: unknown;
38
+ readonly onLeave?: unknown;
39
+ readonly onTap?: unknown;
40
+ readonly itemLabel?: unknown;
41
+ }): Record<string, unknown>;
42
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