@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,133 @@
1
+ /**
2
+ * `sankey`: quantities flowing between stages.
3
+ *
4
+ * The flows are one path batch: each ribbon a closed ring with its own fill
5
+ * (its source's, target's or own colour), the fill opacity shared; per-flow
6
+ * picking and tooltips go through `event.item`. The node bars are `rect`
7
+ * instances of one instances node, keyed by node id. The left-to-right draw
8
+ * of a flow cuts its ring (`sankeyRibbon`'s `t`). Node names
9
+ * are `label` nodes placed beside their bars: outside the diagram for the first and last
10
+ * columns, right of the bar (with a halo over the flows) for the others.
11
+ */
12
+ import type { ColorInput } from "@sophistry/core/color";
13
+ import type { Point } from "@sophistry/core/geometry";
14
+ import type { Channel, ColorChannel, RequiredUnless } from "../data/channels";
15
+ import type { SankeyAlign, SankeyId } from "../math/sankey";
16
+ import type { TooltipSpec } from "../tooltip";
17
+ /** @category Charts */
18
+ export interface SankeyBaseProps<L, N> {
19
+ /** The flows: one ribbon per datum. */
20
+ data: readonly L[];
21
+ /** The node a flow leaves. */
22
+ source: Channel<L, SankeyId>;
23
+ /** The node a flow enters. */
24
+ target: Channel<L, SankeyId>;
25
+ /** The flow's size; non-finite and negative values draw nothing. */
26
+ value: Channel<L, number>;
27
+ /**
28
+ * The nodes, in the order they are stacked and coloured. Every id a link names must be here
29
+ * (else throws). Defaults to the links' endpoints in first-seen order.
30
+ */
31
+ nodes?: readonly N[];
32
+ /**
33
+ * A node's id, matched against `source`/`target`. Defaults to the datum itself, when `nodes` is
34
+ * `(string | number)[]`.
35
+ */
36
+ nodeId?: Channel<N, SankeyId>;
37
+ /** The text beside a node. Defaults to its id. */
38
+ nodeLabel?: Channel<N, string>;
39
+ /** Width of the diagram, nodes included; labels may overhang it. */
40
+ width: number;
41
+ /** Height of the diagram. */
42
+ height: number;
43
+ /** Centre of the diagram. Defaults to the origin. */
44
+ center?: Point;
45
+ /**
46
+ * Width of each node bar.
47
+ * @default 0.2
48
+ */
49
+ nodeWidth?: number;
50
+ /**
51
+ * Gap between nodes in a column.
52
+ * @default 0.2
53
+ */
54
+ nodePadding?: number;
55
+ /**
56
+ * How nodes are assigned to columns; see {@link SankeyAlign}.
57
+ * @default "justify"
58
+ */
59
+ align?: SankeyAlign;
60
+ /**
61
+ * Relaxation passes of the layout.
62
+ * @default 6
63
+ */
64
+ iterations?: number;
65
+ /** Node colours, cycled by node order. Defaults to the theme's categorical colours. */
66
+ colors?: readonly ColorInput[];
67
+ /**
68
+ * A flow's colour: its `"source"` node's, its `"target"` node's, or a colour channel of its
69
+ * own.
70
+ * @default "source"
71
+ */
72
+ linkColor?: "source" | "target" | ColorChannel<L>;
73
+ /**
74
+ * Fill opacity of the flows, 0..1.
75
+ * @default 0.35
76
+ */
77
+ linkOpacity?: number;
78
+ /**
79
+ * Draw node labels.
80
+ * @default true
81
+ */
82
+ labels?: boolean;
83
+ /**
84
+ * Font size of node labels.
85
+ * @default 0.24
86
+ */
87
+ labelFontSize?: number;
88
+ /**
89
+ * Reveal, 0..1: nodes appear column by column, then the flows draw left to right.
90
+ * @default 1
91
+ * @see https://sophistry.dev/guides/chart-animation/#reveals
92
+ */
93
+ progress?: number;
94
+ /**
95
+ * Hover tooltip: `true` shows "A → B: value" on a flow and "name: value" on a node; a function
96
+ * replaces the flow text.
97
+ */
98
+ tooltip?: TooltipSpec<L>;
99
+ /** Paint order of the flows; nodes paint above them. */
100
+ zIndex?: number;
101
+ visible?: boolean;
102
+ }
103
+ /**
104
+ * Props of {@link sankey}: `nodeId` is required when `nodes` holds records.
105
+ *
106
+ * @category Charts
107
+ */
108
+ export type SankeyProps<L, N = SankeyId> = SankeyBaseProps<L, N> & RequiredUnless<N, SankeyId, "nodeId">;
109
+ /**
110
+ * A Sankey diagram: quantities flowing between stages, each flow a ribbon as thick as its
111
+ * value, each node a bar as tall as what passes through it. Lays itself out in a
112
+ * `width × height` box; needs no `chart`. A cycle in the links throws. The flows are one path
113
+ * batch and the bars one instances node (`event.item` picks one). See {@link sankeyLayout} and
114
+ * {@link sankeyRibbon} for the geometry alone.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * import { sankey } from "@sophistry/charts";
119
+ *
120
+ * const flows = [
121
+ * { from: "coal", to: "electricity", twh: 40 },
122
+ * { from: "wind", to: "electricity", twh: 25 },
123
+ * { from: "electricity", to: "homes", twh: 35 },
124
+ * { from: "electricity", to: "industry", twh: 30 },
125
+ * ];
126
+ * sankey.create({ data: flows, source: "from", target: "to", value: "twh", width: 8, height: 4, tooltip: true });
127
+ * ```
128
+ *
129
+ * @see https://sophistry.dev/reference/chart-catalogue/#flows
130
+ * @category Charts
131
+ */
132
+ export declare const sankey: import("@sophistry/core").Definition<SankeyBaseProps<any, any>, import("@sophistry/core/internal").CompositeNode<SankeyBaseProps<any, any>>, keyof SankeyBaseProps<any, any>>;
133
+ //# sourceMappingURL=sankey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sankey.d.ts","sourceRoot":"","sources":["../../src/hierarchy/sankey.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAkBH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAStD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQ9E,OAAO,KAAK,EACX,WAAW,EACX,QAAQ,EAIR,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,YAAY,CAAC;AAkB5D,uBAAuB;AACvB,MAAM,WAAW,eAAe,CAAC,CAAC,EAAE,CAAC;IACpC,uCAAuC;IACvC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IACnB,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC7B,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC7B,oEAAoE;IACpE,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC1B;;;O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AQ,CAAC,CAAC;AAiSvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM,+KA4HjB,CAAC"}
@@ -0,0 +1,248 @@
1
+ /**
2
+ * Shared props and helpers of the hierarchy charts (`treemap`, `icicle`,
3
+ * `sunburst`, `circlePack`, `tree`): layout options, the keyed-transition
4
+ * layout cache, branch colours, tooltip text, label fitting and zoom. Only
5
+ * the props types are public.
6
+ *
7
+ * Each is a factory called once in a composite's `setup`, returning a
8
+ * function its `update` calls with the current props, which recomputes only
9
+ * when its inputs changed (by identity, or shallowly for small records).
10
+ */
11
+ import type { ColorInput } from "@sophistry/core/color";
12
+ import type { Theme } from "@sophistry/core/themes";
13
+ import type { Channel, ColorChannel } from "../data/channels";
14
+ import type { HierarchyNodeInfo, HierarchyOptions } from "../math/hierarchy";
15
+ import type { HierarchyJoinInfo } from "../math/hierarchyJoin";
16
+ import type { JoinStaging } from "../math/join";
17
+ import type { TooltipSpec, TooltipState } from "../tooltip";
18
+ /** Default label font size of the hierarchy charts, in scene units. */
19
+ export declare const HIERARCHY_LABEL_FONT_SIZE = 0.2;
20
+ /**
21
+ * Props every hierarchy chart (`treemap`, `icicle`, `sunburst`,
22
+ * `circlePack`, `tree`) shares. `data` is one object, the root of a nested
23
+ * tree; `value` sizes the leaves and a parent is the sum of its leaves.
24
+ * Channel functions receive `(node, i)` with `i` the node's pre-order
25
+ * position (root 0).
26
+ *
27
+ * @see https://sophistry.dev/reference/chart-catalogue/#hierarchies
28
+ * @category Charts
29
+ */
30
+ export interface HierarchyChartBaseProps<T> {
31
+ /** The root of the tree. */
32
+ data: T;
33
+ /**
34
+ * A node's children: a key of `T` or `(d, i) => T[]`. Anything but a
35
+ * non-empty array makes the node a leaf. Defaults to the datum's `children` property.
36
+ */
37
+ children?: Channel<T, readonly T[] | undefined>;
38
+ /**
39
+ * A leaf's size: a key of `T` or `(d, i) => number`. Required unless `T` is
40
+ * `number`. A parent's own value is ignored; zero, negative and non-finite
41
+ * values drop the leaf.
42
+ */
43
+ value?: Channel<T, number>;
44
+ /** A node's name: drawn where it fits, and used in the tooltip. */
45
+ label?: Channel<T, string>;
46
+ /**
47
+ * Order siblings by descending value; `false` keeps data order. Colours
48
+ * never depend on it.
49
+ * @default true
50
+ */
51
+ sort?: boolean;
52
+ /** One colour for every node, or `(d, i) => colour` per node (returning nothing falls back to the branch colour). Wins over `colors`. */
53
+ color?: ColorChannel<T>;
54
+ /**
55
+ * Colours cycled across the top-level branches; every node inherits its
56
+ * branch's colour. Defaults to the theme's series colours.
57
+ */
58
+ colors?: readonly ColorInput[];
59
+ /**
60
+ * How much lighter each level below the top-level branches is drawn, 0..1
61
+ * toward white (capped at 0.6); 0 keeps one flat colour per branch.
62
+ * @default 0.12
63
+ */
64
+ depthLighten?: number;
65
+ /** Fill opacity of the nodes, 0..1. @default 1 */
66
+ fillOpacity?: number;
67
+ /** Draw node names where they fit. @default true */
68
+ labels?: boolean;
69
+ /** Label font size. @default 0.2 */
70
+ labelFontSize?: number;
71
+ /** Reveal, 0..1; each chart documents its own animation. @default 1 */
72
+ progress?: number;
73
+ /** Fraction of the reveal spent staggering, 0..0.95. Each chart documents its default. */
74
+ stagger?: number;
75
+ /** Hover or tap text: `true` for the node's path of names joined by `" / "` plus `": value"`, or `(d, i) => string`. */
76
+ tooltip?: TooltipSpec<T>;
77
+ /** Paint order; labels draw at `zIndex + 1`. */
78
+ zIndex?: number;
79
+ /** `false` hides the chart. @default true */
80
+ visible?: boolean;
81
+ }
82
+ /**
83
+ * A keyed data transition for a hierarchy chart. Nodes are matched by their
84
+ * path of names; matched nodes move and resize, others fade out or in.
85
+ *
86
+ * @see https://sophistry.dev/guides/chart-animation/#data-transitions
87
+ * @category Charts
88
+ */
89
+ export interface HierarchyTransitionProps<T> {
90
+ /**
91
+ * The tree to transition to (same shape and channels as `data`); give
92
+ * siblings unique `label`s so they match. Matched nodes move in straight
93
+ * lines, so tiles reordering between the ends slide across each other;
94
+ * `sort: false`, an order-keeping treemap `tile` or `tile: "resquarify"`
95
+ * keep every frame a clean tiling. See {@link TransitionProps}.
96
+ */
97
+ to?: T;
98
+ /** Transition progress from `data` (0) to `to` (1). @default 0 */
99
+ blend?: number;
100
+ /** See {@link TransitionProps.staging}. @default "staged" */
101
+ staging?: JoinStaging;
102
+ /**
103
+ * Fraction of the enter stage spent staggering entering nodes, 0..0.95, in
104
+ * the new tree's pre-order (parents before children).
105
+ * @default 0
106
+ */
107
+ enterStagger?: number;
108
+ }
109
+ /** The base and transition prop keys every hierarchy chart declares. */
110
+ export declare const HIERARCHY_PROP_KEYS: readonly ["data", "children", "value", "label", "sort", "color", "colors", "depthLighten", "fillOpacity", "labels", "labelFontSize", "progress", "stagger", "tooltip", "zIndex", "visible", "to", "blend", "staging", "enterStagger"];
111
+ /** Fields that place a rectangle or partition node. */
112
+ export declare const RECT_FIELDS: readonly ["x0", "x1", "y0", "y1"];
113
+ /** Fields that place a packed circle. */
114
+ export declare const CIRCLE_FIELDS: readonly ["x", "y", "r"];
115
+ /** A laid-out node, maybe joined across a keyed transition. */
116
+ export type Joined<N> = N & Partial<HierarchyJoinInfo>;
117
+ /** A hierarchy chart's layout on one update: the frame drawn, and each end's own. */
118
+ export interface HierarchyEnds<N> {
119
+ /** `data`'s layout, or with `to` the two ends joined at `blend`. */
120
+ layout: readonly Joined<N>[];
121
+ from: readonly N[];
122
+ to: readonly N[] | undefined;
123
+ }
124
+ /**
125
+ * A hierarchy chart's layout cache: `data`'s, or with `to` the two ends
126
+ * joined at `blend`. Each end is laid out again only when its tree or a
127
+ * layout input (`deps`) changed; a `blend` scrub re-joins without laying
128
+ * out. Call once, in `setup`.
129
+ *
130
+ * @param fields - The numeric fields that place a node.
131
+ * @internal
132
+ */
133
+ export declare function createHierarchyLayout<T, N extends HierarchyNodeInfo<T>>(fields: readonly (keyof N & string)[]): (props: {
134
+ data: T;
135
+ } & HierarchyTransitionProps<T>, layoutOf: (data: T, end: "from" | "to") => N[], deps: readonly unknown[]) => HierarchyEnds<N>;
136
+ /**
137
+ * Each laid-out node's identity across updates: its path of names, as
138
+ * `hierarchyKeys` gives it (the root is `""`). The instance key of its mark.
139
+ * Call once, in `setup`.
140
+ *
141
+ * @internal
142
+ */
143
+ export declare function createHierarchyKeys<T>(): (nodes: readonly HierarchyNodeInfo<T>[]) => readonly string[];
144
+ /** A node's keyed-transition presence, 1 without one. @internal */
145
+ export declare function presenceOf(node: Partial<HierarchyJoinInfo>): number;
146
+ /**
147
+ * Fill colours by layout position, blended in OKLCH between the ends of a
148
+ * keyed transition. Call once, in `setup`.
149
+ *
150
+ * @internal
151
+ */
152
+ export declare function createHierarchyFills<T>(): (props: HierarchyChartBaseProps<T>, theme: Theme, ends: HierarchyEnds<HierarchyNodeInfo<T>>) => readonly string[];
153
+ /** The layout accessors for a hierarchy chart's channel props. @internal */
154
+ export declare function hierarchyOptions<T>(props: HierarchyChartBaseProps<T>): HierarchyOptions<T>;
155
+ /** The props {@link hierarchyOptions} reads: a layout cache's dependencies. @internal */
156
+ export declare function hierarchyOptionDeps<T>(props: HierarchyChartBaseProps<T>): unknown[];
157
+ /** The default tooltip text: the path below the root joined by `" / "`, then `": value"`. @internal */
158
+ export declare function hierarchyTooltipText<T>(node: HierarchyNodeInfo<T>): string;
159
+ /** The pad between a label and its tile edge, for a font size. */
160
+ export declare function labelPad(fontSize: number): number;
161
+ /**
162
+ * A node to zoom into: its names below the root (`[]` is the root,
163
+ * `["src", "lib"]` is "lib" inside "src"), or a predicate picking the first
164
+ * matching node in pre-order. A path that stops matching zooms as far as it got.
165
+ *
166
+ * @category Charts
167
+ */
168
+ export type HierarchyFocus<T> = readonly string[] | ((datum: T, index: number) => boolean);
169
+ /**
170
+ * What a zoomable hierarchy chart shows: one node, or a `{ from, to, t }`
171
+ * transition between two that scrubs. Either end may itself be a
172
+ * transition, so an interrupted zoom starts from where it had reached.
173
+ *
174
+ * @see https://sophistry.dev/guides/chart-animation/#domain-transitions
175
+ * @category Charts
176
+ */
177
+ export type HierarchyFocusSpec<T> = HierarchyFocus<T> | {
178
+ from: HierarchyFocusSpec<T>;
179
+ to: HierarchyFocusSpec<T>;
180
+ t: number;
181
+ };
182
+ /** A window onto a hierarchy layout, in the layout's own units. */
183
+ export interface HierarchyView {
184
+ x0: number;
185
+ x1: number;
186
+ y0: number;
187
+ y1: number;
188
+ }
189
+ /** A focus spec with every end found in the layout. @internal */
190
+ export type ResolvedFocus = {
191
+ at: number;
192
+ } | {
193
+ from: ResolvedFocus;
194
+ to: ResolvedFocus;
195
+ t: number;
196
+ };
197
+ /** The pre-order position of the node `focus` names, or 0 (the root). @internal */
198
+ export declare function findFocus<T>(nodes: readonly HierarchyNodeInfo<T>[], focus: HierarchyFocus<T> | undefined): number;
199
+ /** Every end of a focus spec found in the layout. @internal */
200
+ export declare function resolveFocus<T>(nodes: readonly HierarchyNodeInfo<T>[], spec: HierarchyFocusSpec<T> | undefined): ResolvedFocus;
201
+ /** Whether a resolved focus is mid-transition, i.e. the view is moving. @internal */
202
+ export declare function isZooming(focus: ResolvedFocus): boolean;
203
+ /** Whether the node at `position` is `ancestor` or below it. @internal */
204
+ export declare function isWithin<T>(nodes: readonly HierarchyNodeInfo<T>[], position: number, ancestor: number): boolean;
205
+ /** Two windows blended linearly: every edge moves at a constant rate. */
206
+ export declare function lerpView(a: HierarchyView, b: HierarchyView, t: number): HierarchyView;
207
+ /**
208
+ * Two square windows blended along van Wijk and Nuij's smooth zoom path:
209
+ * constant apparent speed, pulling out and back in between distant nodes.
210
+ */
211
+ export declare function smoothZoomView(a: HierarchyView, b: HierarchyView, t: number): HierarchyView;
212
+ /** A zoomable hierarchy chart's camera on one update. See {@link createHierarchyZoom}. @internal */
213
+ export interface HierarchyZoom {
214
+ /** The window the focus asks for. */
215
+ view: HierarchyView;
216
+ /** A node's presence: 1 inside the focused subtree, 0 outside, blended. */
217
+ weight(position: number): number;
218
+ /** The node the focus is heading for. */
219
+ target: number;
220
+ resolved: ResolvedFocus;
221
+ }
222
+ /**
223
+ * A zoomable hierarchy chart's camera: the window `focus` asks for, and each
224
+ * node's presence (1 inside the focused subtree, 0 outside, blended). The
225
+ * resolved focus and the subtree tables are cached across updates (a zoom
226
+ * scrub touches neither). Call once, in `setup`.
227
+ *
228
+ * @internal
229
+ */
230
+ export declare function createHierarchyZoom<T>(): (nodes: readonly HierarchyNodeInfo<T>[], focus: HierarchyFocusSpec<T> | undefined, viewOf: (position: number) => HierarchyView, blend?: (a: HierarchyView, b: HierarchyView, t: number) => HierarchyView) => HierarchyZoom;
231
+ /**
232
+ * Where a tap drills: the focused node zooms out to its parent, a node with
233
+ * children zooms in, a leaf zooms to its parent; -1 when nothing would move.
234
+ *
235
+ * @internal
236
+ */
237
+ export declare function drillTarget<T>(nodes: readonly HierarchyNodeInfo<T>[], focus: number, tapped: number): number;
238
+ /** A layout interval seen through the window `[v0, v1]`, clamped, as fractions 0..1. @internal */
239
+ export declare function throughView(lo: number, hi: number, v0: number, v1: number): [number, number];
240
+ /**
241
+ * Closes the chart's open tooltip whenever the view or the layout moved
242
+ * since the last update, so it never points at a node's old place. Call
243
+ * once, in `setup`; call the result in every update.
244
+ *
245
+ * @internal
246
+ */
247
+ export declare function createTooltipCloser(): (tooltip: TooltipState, moved: readonly unknown[]) => void;
248
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/hierarchy/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,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;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,CACtC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,SAAS,OAAO,EAAE,KACrB,IAAI,CASR"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * `sunburst`: the partition layout in polar coordinates.
3
+ *
4
+ * Every sector is one item of one path batch, with the native curve outline
5
+ * of a `Sector` (the centre disc) or an `AnnularSector` (a ring), its own fill and its own stroke (the background-coloured outline on
6
+ * rings, none on the disc or a full turn); per-node picking, tooltips and
7
+ * drilling go through `event.item`. The clockwise sweep cuts each sector's
8
+ * angle (geometry). Names are `label` nodes, one per sector
9
+ * whose name fits.
10
+ */
11
+ import type { Point } from "@sophistry/core/geometry";
12
+ import type { RequiredUnless } from "../data/channels";
13
+ import type { HierarchyDrillProps } from "./drill";
14
+ import type { HierarchyChartBaseProps, HierarchyFocusSpec, HierarchyTransitionProps } from "./shared";
15
+ /** @category Charts */
16
+ export interface SunburstBaseProps<T> extends HierarchyChartBaseProps<T>, HierarchyTransitionProps<T>, HierarchyDrillProps<T> {
17
+ /** Centre of the chart. Defaults to the origin. */
18
+ center?: Point;
19
+ /**
20
+ * Outer radius.
21
+ * @default 1
22
+ */
23
+ radius?: number;
24
+ /**
25
+ * Draw the root as a disc in the centre; `false` leaves a hole of the same size.
26
+ * @default true
27
+ */
28
+ root?: boolean;
29
+ /** Outline between the sectors. Defaults to the theme background. */
30
+ stroke?: string;
31
+ /**
32
+ * Outline width.
33
+ * @default 0.02
34
+ */
35
+ strokeWidth?: number;
36
+ /**
37
+ * Zoom into a node: it becomes the centre disc and its descendants open out round the whole
38
+ * turn while the rest fades. A path of names below the root (`["a"]`), a predicate, or `{ from,
39
+ * to, t }` for a scrubbable transition. Given, the chart is controlled: taps only call
40
+ * `onFocusChange`. Defaults to the root.
41
+ */
42
+ focus?: HierarchyFocusSpec<T>;
43
+ }
44
+ /**
45
+ * Props of {@link sunburst}: `value` is required unless the tree's nodes are numbers.
46
+ *
47
+ * @category Charts
48
+ */
49
+ export type SunburstProps<T> = SunburstBaseProps<T> & RequiredUnless<T, number, "value">;
50
+ /**
51
+ * A sunburst: the partition layout in polar coordinates, the root in the centre and one ring
52
+ * per depth outward, each sector spanning exactly its children, sized by value. Draws in scene
53
+ * units, clockwise from 12 o'clock; reveals with one clockwise sweep. Supports drill-down
54
+ * `focus` and keyed transitions. The sectors are one path batch (`event.item` picks a sector).
55
+ * See {@link partitionLayout} for the layout alone.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * import { sunburst } from "@sophistry/charts";
60
+ *
61
+ * const files = {
62
+ * name: "repo",
63
+ * children: [
64
+ * { name: "src", children: [{ name: "index.ts", size: 12 }, { name: "chart.ts", size: 30 }] },
65
+ * { name: "README.md", size: 4 },
66
+ * ],
67
+ * };
68
+ * sunburst.create({ data: files, value: "size", label: "name", radius: 2, drill: true });
69
+ * ```
70
+ *
71
+ * @see https://sophistry.dev/reference/chart-catalogue/#hierarchies
72
+ * @category Charts
73
+ */
74
+ export declare const sunburst: import("@sophistry/core").Definition<SunburstBaseProps<any>, import("@sophistry/core/internal").CompositeNode<SunburstBaseProps<any>>, keyof SunburstBaseProps<any>>;
75
+ //# sourceMappingURL=sunburst.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sunburst.d.ts","sourceRoot":"","sources":["../../src/hierarchy/sunburst.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAMtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAMnD,OAAO,KAAK,EACX,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,MAAM,UAAU,CAAC;AAkBlB,uBAAuB;AACvB,MAAM,WAAW,iBAAiB,CAAC,CAAC,CACnC,SAAQ,uBAAuB,CAAC,CAAC,CAAC,EACjC,wBAAwB,CAAC,CAAC,CAAC,EAC3B,mBAAmB,CAAC,CAAC,CAAC;IACvB,mDAAmD;IACnD,MAAM,CAAC,EAAE,KAAK,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,GAClD,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AA0OpC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,QAAQ,sKAsBnB,CAAC"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * `tree`: a node-link tree (tidy tree or dendrogram).
3
+ *
4
+ * The node dots are `circle` instances of one instances node, keyed by the
5
+ * node's path of names; per-node picking, tooltips and drilling go through
6
+ * `event.item`. The links are one path batch (each an open polyline with
7
+ * its branch's stroke and its own opacity); a link draws in along its
8
+ * length with its item's `progress`. Names are `label` nodes, one per named node; with drill
9
+ * or tooltips on, a name answers the same tap as its dot.
10
+ *
11
+ * Work is cached in steps: each end's depth fit is measured once
12
+ * per layout, a keyed-transition frame re-places nodes without re-fitting,
13
+ * and a zoom frame refits only the focused subtrees.
14
+ */
15
+ import type { Point } from "@sophistry/core/geometry";
16
+ import type { Channel } from "../data/channels";
17
+ import type { TreeLayoutKind, TreeLinkShape } from "../math/tree";
18
+ import type { HierarchyDrillProps } from "./drill";
19
+ import type { HierarchyChartBaseProps, HierarchyFocusSpec, HierarchyTransitionProps } from "./shared";
20
+ /** @category Charts */
21
+ export interface TreeProps<T> extends HierarchyChartBaseProps<T>, HierarchyTransitionProps<T>, HierarchyDrillProps<T> {
22
+ /** Width of the whole chart, labels included. */
23
+ width: number;
24
+ /** Height of the whole chart, labels included. */
25
+ height: number;
26
+ /** Centre of the chart. Defaults to the origin. */
27
+ center?: Point;
28
+ /**
29
+ * `"horizontal"`: root at the left, siblings top to bottom. `"vertical"`: root at the top,
30
+ * siblings left to right. `"radial"`: root in the centre, siblings clockwise from 12 o'clock
31
+ * (parents are named in the tooltip only).
32
+ * @default "horizontal"
33
+ */
34
+ orientation?: "horizontal" | "vertical" | "radial";
35
+ /**
36
+ * A node's height above the leaves (a dendrogram's merge distance): places nodes along the
37
+ * depth axis by it instead of one level per depth. Leaves default to 0. Pairs with
38
+ * `layout: "cluster"`. See {@link hierarchyTreeLayout}.
39
+ */
40
+ distance?: Channel<T, number>;
41
+ /**
42
+ * `"tidy"`: a tidy tree, one depth per level. `"cluster"`: a dendrogram, every leaf aligned at
43
+ * the far side.
44
+ * @default "tidy"
45
+ */
46
+ layout?: TreeLayoutKind;
47
+ /**
48
+ * How links are drawn: `"curve"` (a smooth cubic) or `"elbow"` (a right-angled bracket).
49
+ * Defaults to `"curve"` for the tidy layout, `"elbow"` for cluster.
50
+ */
51
+ link?: TreeLinkShape;
52
+ /**
53
+ * Gap between neighbouring nodes with different parents, relative to the gap between siblings.
54
+ * @default 2
55
+ */
56
+ separation?: number;
57
+ /**
58
+ * Radius of the node dots; 0 hides them.
59
+ * @default 0.06
60
+ */
61
+ nodeRadius?: number;
62
+ /**
63
+ * Stroke width of the links.
64
+ * @default 0.025
65
+ */
66
+ linkWidth?: number;
67
+ /**
68
+ * Opacity of the links, 0..1.
69
+ * @default 0.6
70
+ */
71
+ linkOpacity?: number;
72
+ /**
73
+ * A leaf's value, shown in the tooltip only (it never changes the geometry). Parents sum their
74
+ * leaves; omitted, a node's value is its leaf count.
75
+ */
76
+ value?: Channel<T, number>;
77
+ /**
78
+ * Order siblings by descending value.
79
+ * @default false
80
+ */
81
+ sort?: boolean;
82
+ /**
83
+ * Fill opacity of the node dots, 0..1.
84
+ * @default 1
85
+ */
86
+ fillOpacity?: number;
87
+ /**
88
+ * Draw node names: leaves past the leaf, parents beside the node.
89
+ * @default true
90
+ */
91
+ labels?: boolean;
92
+ /**
93
+ * Zoom into a subtree: the focused node moves to the root side and its descendants fill the box
94
+ * while the rest fade out. A path of names below the root (`["c"]`), a predicate, or `{ from,
95
+ * to, t }` for a scrubbable transition. Given, the chart is controlled: taps only call
96
+ * `onFocusChange`. Defaults to the root.
97
+ */
98
+ focus?: HierarchyFocusSpec<T>;
99
+ }
100
+ /**
101
+ * A node-link tree: a tidy tree or a dendrogram, nodes as dots joined to their parents by
102
+ * curved or elbow links, in a `width × height` box with room for names. Supports radial
103
+ * layout, merge distances, drill-down `focus`, and keyed transitions between trees. The dots
104
+ * are one instances node (`event.item` picks a node), the links one path batch. See
105
+ * {@link hierarchyTreeLayout} and {@link treeLink} for the geometry alone.
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * import { tree } from "@sophistry/charts";
110
+ *
111
+ * const org = {
112
+ * name: "CEO",
113
+ * children: [
114
+ * { name: "CTO", children: [{ name: "Platform" }, { name: "Apps" }] },
115
+ * { name: "CFO" },
116
+ * ],
117
+ * };
118
+ * tree.create({ data: org, label: "name", width: 8, height: 4, layout: "cluster", tooltip: true });
119
+ * ```
120
+ *
121
+ * @see https://sophistry.dev/reference/chart-catalogue/#hierarchies
122
+ * @category Charts
123
+ */
124
+ export declare const tree: import("@sophistry/core").Definition<TreeProps<any>, import("@sophistry/core/internal").CompositeNode<TreeProps<any>>, keyof TreeProps<any>>;
125
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/hierarchy/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAWH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAItD,OAAO,KAAK,EAA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