@d3plus/core 4.3.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/README.md +7406 -3676
  2. package/es/index.js +3 -3
  3. package/es/index.js.map +1 -1
  4. package/es/internal.js +13 -2
  5. package/es/internal.js.map +1 -1
  6. package/es/src/charts/AreaPlot/index.js +1 -2
  7. package/es/src/charts/AreaPlot/index.js.map +1 -1
  8. package/es/src/charts/BarChart/index.js +9 -3
  9. package/es/src/charts/BarChart/index.js.map +1 -1
  10. package/es/src/charts/BoxWhisker/index.js +6 -2
  11. package/es/src/charts/BoxWhisker/index.js.map +1 -1
  12. package/es/src/charts/BumpChart/index.js +1 -2
  13. package/es/src/charts/BumpChart/index.js.map +1 -1
  14. package/es/src/charts/Chord/applyLayout.js +205 -0
  15. package/es/src/charts/Chord/applyLayout.js.map +1 -0
  16. package/es/src/charts/Chord/emit.js +220 -0
  17. package/es/src/charts/Chord/emit.js.map +1 -0
  18. package/es/src/charts/Chord/index.js +249 -0
  19. package/es/src/charts/Chord/index.js.map +1 -0
  20. package/es/src/charts/Geomap/applyLayout.js +17 -10
  21. package/es/src/charts/Geomap/applyLayout.js.map +1 -1
  22. package/es/src/charts/Geomap/basemapTheme.js +78 -0
  23. package/es/src/charts/Geomap/basemapTheme.js.map +1 -0
  24. package/es/src/charts/Geomap/emit.js +18 -9
  25. package/es/src/charts/Geomap/emit.js.map +1 -1
  26. package/es/src/charts/Geomap/index.js +74 -105
  27. package/es/src/charts/Geomap/index.js.map +1 -1
  28. package/es/src/charts/Histogram/binData.js +225 -0
  29. package/es/src/charts/Histogram/binData.js.map +1 -0
  30. package/es/src/charts/Histogram/index.js +271 -0
  31. package/es/src/charts/Histogram/index.js.map +1 -0
  32. package/es/src/charts/LinePlot/index.js +1 -2
  33. package/es/src/charts/LinePlot/index.js.map +1 -1
  34. package/es/src/charts/Matrix/emit.js +6 -0
  35. package/es/src/charts/Matrix/emit.js.map +1 -1
  36. package/es/src/charts/Matrix/index.js +1 -2
  37. package/es/src/charts/Matrix/index.js.map +1 -1
  38. package/es/src/charts/Network/applyLayout.js +52 -4
  39. package/es/src/charts/Network/applyLayout.js.map +1 -1
  40. package/es/src/charts/Network/emit.js +61 -27
  41. package/es/src/charts/Network/emit.js.map +1 -1
  42. package/es/src/charts/Network/index.js +40 -55
  43. package/es/src/charts/Network/index.js.map +1 -1
  44. package/es/src/charts/Pack/emit.js +40 -2
  45. package/es/src/charts/Pack/emit.js.map +1 -1
  46. package/es/src/charts/Pack/index.js +14 -2
  47. package/es/src/charts/Pack/index.js.map +1 -1
  48. package/es/src/charts/Pie/applyLayout.js +20 -2
  49. package/es/src/charts/Pie/applyLayout.js.map +1 -1
  50. package/es/src/charts/Pie/emit.js +277 -32
  51. package/es/src/charts/Pie/emit.js.map +1 -1
  52. package/es/src/charts/Pie/index.js +47 -3
  53. package/es/src/charts/Pie/index.js.map +1 -1
  54. package/es/src/charts/Plot/discreteSpan.js +42 -0
  55. package/es/src/charts/Plot/discreteSpan.js.map +1 -0
  56. package/es/src/charts/Plot/draw.js +3 -1
  57. package/es/src/charts/Plot/draw.js.map +1 -1
  58. package/es/src/charts/Plot/index.js +152 -17
  59. package/es/src/charts/Plot/index.js.map +1 -1
  60. package/es/src/charts/Plot/pipeline.js +48 -22
  61. package/es/src/charts/Plot/pipeline.js.map +1 -1
  62. package/es/src/charts/Plot/pipelineDomains.js +84 -8
  63. package/es/src/charts/Plot/pipelineDomains.js.map +1 -1
  64. package/es/src/charts/Plot/plotZoom.js +278 -0
  65. package/es/src/charts/Plot/plotZoom.js.map +1 -0
  66. package/es/src/charts/Plot/shapeDefaults.js +3 -3
  67. package/es/src/charts/Plot/shapeDefaults.js.map +1 -1
  68. package/es/src/charts/Plot/sharedHover.js +431 -0
  69. package/es/src/charts/Plot/sharedHover.js.map +1 -0
  70. package/es/src/charts/Plot/sharedHoverScene.js +230 -0
  71. package/es/src/charts/Plot/sharedHoverScene.js.map +1 -0
  72. package/es/src/charts/Plot/sharedTooltip.js +163 -0
  73. package/es/src/charts/Plot/sharedTooltip.js.map +1 -0
  74. package/es/src/charts/Plot/stackShareLabels.js +137 -0
  75. package/es/src/charts/Plot/stackShareLabels.js.map +1 -0
  76. package/es/src/charts/Plot/stackShareTooltip.js +31 -0
  77. package/es/src/charts/Plot/stackShareTooltip.js.map +1 -0
  78. package/es/src/charts/Plot/trendLines.js +367 -0
  79. package/es/src/charts/Plot/trendLines.js.map +1 -0
  80. package/es/src/charts/Plot/trendScene.js +220 -0
  81. package/es/src/charts/Plot/trendScene.js.map +1 -0
  82. package/es/src/charts/Plot/trendTooltip.js +160 -0
  83. package/es/src/charts/Plot/trendTooltip.js.map +1 -0
  84. package/es/src/charts/Priestley/emit.js +36 -3
  85. package/es/src/charts/Priestley/emit.js.map +1 -1
  86. package/es/src/charts/Priestley/index.js +1 -2
  87. package/es/src/charts/Priestley/index.js.map +1 -1
  88. package/es/src/charts/Radar/emit.js +4 -1
  89. package/es/src/charts/Radar/emit.js.map +1 -1
  90. package/es/src/charts/Radar/index.js +16 -4
  91. package/es/src/charts/Radar/index.js.map +1 -1
  92. package/es/src/charts/RadialMatrix/emit.js +6 -0
  93. package/es/src/charts/RadialMatrix/emit.js.map +1 -1
  94. package/es/src/charts/RadialMatrix/index.js +18 -3
  95. package/es/src/charts/RadialMatrix/index.js.map +1 -1
  96. package/es/src/charts/Rings/applyLayout.js +72 -116
  97. package/es/src/charts/Rings/applyLayout.js.map +1 -1
  98. package/es/src/charts/Rings/emit.js +75 -10
  99. package/es/src/charts/Rings/emit.js.map +1 -1
  100. package/es/src/charts/Rings/index.js +24 -5
  101. package/es/src/charts/Rings/index.js.map +1 -1
  102. package/es/src/charts/Rings/ringsSizing.js +189 -0
  103. package/es/src/charts/Rings/ringsSizing.js.map +1 -0
  104. package/es/src/charts/Sankey/emit.js +55 -11
  105. package/es/src/charts/Sankey/emit.js.map +1 -1
  106. package/es/src/charts/Sankey/index.js +8 -2
  107. package/es/src/charts/Sankey/index.js.map +1 -1
  108. package/es/src/charts/StackedArea/index.js +9 -3
  109. package/es/src/charts/StackedArea/index.js.map +1 -1
  110. package/es/src/charts/Tree/emit.js +10 -4
  111. package/es/src/charts/Tree/emit.js.map +1 -1
  112. package/es/src/charts/Tree/index.js +6 -5
  113. package/es/src/charts/Tree/index.js.map +1 -1
  114. package/es/src/charts/Treemap/emit.js +56 -3
  115. package/es/src/charts/Treemap/emit.js.map +1 -1
  116. package/es/src/charts/Treemap/index.js +1 -2
  117. package/es/src/charts/Treemap/index.js.map +1 -1
  118. package/es/src/charts/definition/ChartDefinition.js.map +1 -1
  119. package/es/src/charts/definition/makeChart.js +8 -1
  120. package/es/src/charts/definition/makeChart.js.map +1 -1
  121. package/es/src/charts/drawSteps/backControl.js +85 -0
  122. package/es/src/charts/drawSteps/backControl.js.map +1 -0
  123. package/es/src/charts/drawSteps/bottomRightControls.js +193 -0
  124. package/es/src/charts/drawSteps/bottomRightControls.js.map +1 -0
  125. package/es/src/charts/drawSteps/bottomRightControlsMarkup.js +161 -0
  126. package/es/src/charts/drawSteps/bottomRightControlsMarkup.js.map +1 -0
  127. package/es/src/charts/drawSteps/controlButtonStyle.js +108 -0
  128. package/es/src/charts/drawSteps/controlButtonStyle.js.map +1 -0
  129. package/es/src/charts/drawSteps/minimap.js +395 -0
  130. package/es/src/charts/drawSteps/minimap.js.map +1 -0
  131. package/es/src/charts/drawSteps/minimapMarkup.js +147 -0
  132. package/es/src/charts/drawSteps/minimapMarkup.js.map +1 -0
  133. package/es/src/charts/drawSteps/searchControls.js +358 -0
  134. package/es/src/charts/drawSteps/searchControls.js.map +1 -0
  135. package/es/src/charts/drawSteps/searchControlsMarkup.js +430 -0
  136. package/es/src/charts/drawSteps/searchControlsMarkup.js.map +1 -0
  137. package/es/src/charts/drawSteps/tableView.js +173 -0
  138. package/es/src/charts/drawSteps/tableView.js.map +1 -0
  139. package/es/src/charts/drawSteps/tableViewControl.js +39 -0
  140. package/es/src/charts/drawSteps/tableViewControl.js.map +1 -0
  141. package/es/src/charts/drawSteps/tableViewMarkup.js +647 -0
  142. package/es/src/charts/drawSteps/tableViewMarkup.js.map +1 -0
  143. package/es/src/charts/drawSteps/topLeftControls.js +73 -0
  144. package/es/src/charts/drawSteps/topLeftControls.js.map +1 -0
  145. package/es/src/charts/drawSteps/topLeftControlsMarkup.js +227 -0
  146. package/es/src/charts/drawSteps/topLeftControlsMarkup.js.map +1 -0
  147. package/es/src/charts/drawSteps/zoomControls.js +317 -175
  148. package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
  149. package/es/src/charts/drawSteps/zoomControlsMarkup.js +280 -0
  150. package/es/src/charts/drawSteps/zoomControlsMarkup.js.map +1 -0
  151. package/es/src/charts/events/click.shape.js +24 -1
  152. package/es/src/charts/events/click.shape.js.map +1 -1
  153. package/es/src/charts/events/mouseenter.js +3 -0
  154. package/es/src/charts/events/mouseenter.js.map +1 -1
  155. package/es/src/charts/events/mouseleave.js +3 -0
  156. package/es/src/charts/events/mouseleave.js.map +1 -1
  157. package/es/src/charts/events/mousemove.shape.js +2 -0
  158. package/es/src/charts/events/mousemove.shape.js.map +1 -1
  159. package/es/src/charts/features/attributionFeature.js +137 -0
  160. package/es/src/charts/features/attributionFeature.js.map +1 -0
  161. package/es/src/charts/features/axes.js +24 -9
  162. package/es/src/charts/features/axes.js.map +1 -1
  163. package/es/src/charts/features/chartGeometry.js +16 -2
  164. package/es/src/charts/features/chartGeometry.js.map +1 -1
  165. package/es/src/charts/features/edgeArrows.js +155 -0
  166. package/es/src/charts/features/edgeArrows.js.map +1 -0
  167. package/es/src/charts/features/emitHelpers.js +32 -0
  168. package/es/src/charts/features/emitHelpers.js.map +1 -1
  169. package/es/src/charts/features/ensureZoomDom.js +63 -12
  170. package/es/src/charts/features/ensureZoomDom.js.map +1 -1
  171. package/es/src/charts/features/features.js +89 -112
  172. package/es/src/charts/features/features.js.map +1 -1
  173. package/es/src/charts/features/featuresLegend.js +53 -17
  174. package/es/src/charts/features/featuresLegend.js.map +1 -1
  175. package/es/src/charts/features/plotPaint.js +81 -29
  176. package/es/src/charts/features/plotPaint.js.map +1 -1
  177. package/es/src/charts/features/shapeEmit.js +20 -2
  178. package/es/src/charts/features/shapeEmit.js.map +1 -1
  179. package/es/src/charts/features/zoomExtent.js +185 -0
  180. package/es/src/charts/features/zoomExtent.js.map +1 -0
  181. package/es/src/charts/helpers/tileAttributions.js +26 -0
  182. package/es/src/charts/helpers/tileAttributions.js.map +1 -1
  183. package/es/src/charts/index.js +2 -0
  184. package/es/src/charts/index.js.map +1 -1
  185. package/es/src/charts/pipeline/drillMorph.js +159 -0
  186. package/es/src/charts/pipeline/drillMorph.js.map +1 -0
  187. package/es/src/charts/pipeline/runChartDraw.js +35 -1
  188. package/es/src/charts/pipeline/runChartDraw.js.map +1 -1
  189. package/es/src/charts/pipeline/runVizPipeline.js +49 -15
  190. package/es/src/charts/pipeline/runVizPipeline.js.map +1 -1
  191. package/es/src/charts/pipeline/vizDrawPure.js +52 -6
  192. package/es/src/charts/pipeline/vizDrawPure.js.map +1 -1
  193. package/es/src/charts/viz/Viz.js +103 -59
  194. package/es/src/charts/viz/Viz.js.map +1 -1
  195. package/es/src/charts/viz/VizBase.js +186 -5
  196. package/es/src/charts/viz/VizBase.js.map +1 -1
  197. package/es/src/charts/viz/VizBaseConfig.js +41 -3
  198. package/es/src/charts/viz/VizBaseConfig.js.map +1 -1
  199. package/es/src/charts/viz/ordinalColor.js +2 -2
  200. package/es/src/charts/viz/ordinalColor.js.map +1 -1
  201. package/es/src/charts/viz/vizDefaults.js +270 -58
  202. package/es/src/charts/viz/vizDefaults.js.map +1 -1
  203. package/es/src/charts/viz/vizRender.js +54 -4
  204. package/es/src/charts/viz/vizRender.js.map +1 -1
  205. package/es/src/charts/viz/vizTypes.js.map +1 -1
  206. package/es/src/charts/viz/vizVisibility.js +145 -0
  207. package/es/src/charts/viz/vizVisibility.js.map +1 -0
  208. package/es/src/components/Axis/Axis.js +18 -9
  209. package/es/src/components/Axis/Axis.js.map +1 -1
  210. package/es/src/components/Axis/axisLayoutLabels.js +2 -1
  211. package/es/src/components/Axis/axisLayoutLabels.js.map +1 -1
  212. package/es/src/components/Axis/axisRender.js +5 -1
  213. package/es/src/components/Axis/axisRender.js.map +1 -1
  214. package/es/src/components/ColorScale/ColorScale.js +11 -11
  215. package/es/src/components/ColorScale/ColorScale.js.map +1 -1
  216. package/es/src/components/ColorScale/colorScaleScale.js +22 -10
  217. package/es/src/components/ColorScale/colorScaleScale.js.map +1 -1
  218. package/es/src/components/Legend/Legend.js +8 -5
  219. package/es/src/components/Legend/Legend.js.map +1 -1
  220. package/es/src/components/Legend/legendConfig.js +87 -21
  221. package/es/src/components/Legend/legendConfig.js.map +1 -1
  222. package/es/src/components/Legend/legendRender.js +29 -22
  223. package/es/src/components/Legend/legendRender.js.map +1 -1
  224. package/es/src/components/SizeLegend/SizeLegend.js +411 -0
  225. package/es/src/components/SizeLegend/SizeLegend.js.map +1 -0
  226. package/es/src/components/SizeLegend/sizeLegendLayout.js +285 -0
  227. package/es/src/components/SizeLegend/sizeLegendLayout.js.map +1 -0
  228. package/es/src/components/Timeline/timelineConfig.js +8 -4
  229. package/es/src/components/Timeline/timelineConfig.js.map +1 -1
  230. package/es/src/components/Timeline/timelineRender.js +1 -2
  231. package/es/src/components/Timeline/timelineRender.js.map +1 -1
  232. package/es/src/components/Tooltip.js +27 -7
  233. package/es/src/components/Tooltip.js.map +1 -1
  234. package/es/src/components/index.js +1 -0
  235. package/es/src/components/index.js.map +1 -1
  236. package/es/src/shapes/Box.js +4 -2
  237. package/es/src/shapes/Box.js.map +1 -1
  238. package/es/src/shapes/Shape.js +1 -1
  239. package/es/src/shapes/Shape.js.map +1 -1
  240. package/es/src/shapes/Whisker.js +3 -2
  241. package/es/src/shapes/Whisker.js.map +1 -1
  242. package/es/src/shapes/validateShapeConfig.js +141 -0
  243. package/es/src/shapes/validateShapeConfig.js.map +1 -0
  244. package/es/src/utils/BaseClass.js +134 -4
  245. package/es/src/utils/BaseClass.js.map +1 -1
  246. package/es/src/utils/D3plusConfig.js.map +1 -1
  247. package/es/src/utils/configDefault.js +17 -0
  248. package/es/src/utils/configDefault.js.map +1 -0
  249. package/es/src/utils/configPrep.js +2 -1
  250. package/es/src/utils/configPrep.js.map +1 -1
  251. package/es/src/utils/configWarnings.js +37 -0
  252. package/es/src/utils/configWarnings.js.map +1 -0
  253. package/es/src/utils/index.js +1 -0
  254. package/es/src/utils/index.js.map +1 -1
  255. package/package.json +13 -11
  256. package/types/index.d.ts +4 -4
  257. package/types/internal.d.ts +16 -2
  258. package/types/src/charts/BarChart/index.d.ts +2 -1
  259. package/types/src/charts/Chord/applyLayout.d.ts +43 -0
  260. package/types/src/charts/Chord/emit.d.ts +10 -0
  261. package/types/src/charts/Chord/index.d.ts +19 -0
  262. package/types/src/charts/Geomap/applyLayout.d.ts +9 -1
  263. package/types/src/charts/Geomap/basemapTheme.d.ts +35 -0
  264. package/types/src/charts/Histogram/binData.d.ts +37 -0
  265. package/types/src/charts/Histogram/index.d.ts +14 -0
  266. package/types/src/charts/Network/applyLayout.d.ts +8 -0
  267. package/types/src/charts/Plot/discreteSpan.d.ts +9 -0
  268. package/types/src/charts/Plot/index.d.ts +51 -3
  269. package/types/src/charts/Plot/pipeline.d.ts +14 -0
  270. package/types/src/charts/Plot/plotZoom.d.ts +65 -0
  271. package/types/src/charts/Plot/sharedHover.d.ts +79 -0
  272. package/types/src/charts/Plot/sharedHoverScene.d.ts +11 -0
  273. package/types/src/charts/Plot/sharedTooltip.d.ts +26 -0
  274. package/types/src/charts/Plot/stackShareLabels.d.ts +21 -0
  275. package/types/src/charts/Plot/stackShareTooltip.d.ts +9 -0
  276. package/types/src/charts/Plot/trendLines.d.ts +70 -0
  277. package/types/src/charts/Plot/trendScene.d.ts +18 -0
  278. package/types/src/charts/Plot/trendTooltip.d.ts +19 -0
  279. package/types/src/charts/Rings/applyLayout.d.ts +9 -0
  280. package/types/src/charts/Rings/ringsSizing.d.ts +49 -0
  281. package/types/src/charts/StackedArea/index.d.ts +2 -1
  282. package/types/src/charts/definition/ChartDefinition.d.ts +33 -1
  283. package/types/src/charts/definition/makeChart.d.ts +2 -1
  284. package/types/src/charts/drawSteps/backControl.d.ts +29 -0
  285. package/types/src/charts/drawSteps/bottomRightControls.d.ts +26 -0
  286. package/types/src/charts/drawSteps/bottomRightControlsMarkup.d.ts +108 -0
  287. package/types/src/charts/drawSteps/controlButtonStyle.d.ts +45 -0
  288. package/types/src/charts/drawSteps/minimap.d.ts +19 -0
  289. package/types/src/charts/drawSteps/minimapMarkup.d.ts +45 -0
  290. package/types/src/charts/drawSteps/searchControls.d.ts +3 -0
  291. package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +111 -0
  292. package/types/src/charts/drawSteps/tableView.d.ts +23 -0
  293. package/types/src/charts/drawSteps/tableViewControl.d.ts +21 -0
  294. package/types/src/charts/drawSteps/tableViewMarkup.d.ts +119 -0
  295. package/types/src/charts/drawSteps/topLeftControls.d.ts +32 -0
  296. package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +72 -0
  297. package/types/src/charts/drawSteps/zoomControls.d.ts +48 -8
  298. package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +138 -0
  299. package/types/src/charts/features/attributionFeature.d.ts +21 -0
  300. package/types/src/charts/features/axes.d.ts +1 -1
  301. package/types/src/charts/features/chartGeometry.d.ts +9 -3
  302. package/types/src/charts/features/edgeArrows.d.ts +92 -0
  303. package/types/src/charts/features/emitHelpers.d.ts +19 -0
  304. package/types/src/charts/features/ensureZoomDom.d.ts +6 -2
  305. package/types/src/charts/features/features.d.ts +32 -17
  306. package/types/src/charts/features/featuresLegend.d.ts +15 -0
  307. package/types/src/charts/features/plotPaint.d.ts +40 -2
  308. package/types/src/charts/features/zoomExtent.d.ts +25 -0
  309. package/types/src/charts/index.d.ts +2 -0
  310. package/types/src/charts/pipeline/drillMorph.d.ts +29 -0
  311. package/types/src/charts/pipeline/runVizPipeline.d.ts +14 -3
  312. package/types/src/charts/viz/Viz.d.ts +18 -1
  313. package/types/src/charts/viz/VizBase.d.ts +99 -4
  314. package/types/src/charts/viz/VizBaseConfig.d.ts +25 -3
  315. package/types/src/charts/viz/vizDefaults.d.ts +155 -0
  316. package/types/src/charts/viz/vizTypes.d.ts +204 -4
  317. package/types/src/charts/viz/vizVisibility.d.ts +34 -0
  318. package/types/src/components/Axis/Axis.d.ts +2 -0
  319. package/types/src/components/Legend/legendRender.d.ts +8 -2
  320. package/types/src/components/SizeLegend/SizeLegend.d.ts +107 -0
  321. package/types/src/components/SizeLegend/sizeLegendLayout.d.ts +101 -0
  322. package/types/src/components/Tooltip.d.ts +18 -3
  323. package/types/src/components/index.d.ts +1 -0
  324. package/types/src/shapes/validateShapeConfig.d.ts +10 -0
  325. package/types/src/utils/BaseClass.d.ts +15 -1
  326. package/types/src/utils/D3plusConfig.d.ts +200 -8
  327. package/types/src/utils/configDefault.d.ts +11 -0
  328. package/types/src/utils/configWarnings.d.ts +28 -0
  329. package/types/src/utils/index.d.ts +2 -1
  330. package/umd/d3plus-core.full.js +44507 -35766
  331. package/umd/d3plus-core.full.js.map +1 -1
  332. package/umd/d3plus-core.full.min.js +7073 -4410
  333. package/umd/d3plus-core.js +16718 -9634
  334. package/umd/d3plus-core.js.map +1 -1
  335. package/umd/d3plus-core.min.js +4615 -2322
@@ -9,6 +9,7 @@
9
9
  is implementation detail of the rendering pipeline and may change in any
10
10
  minor release. Import it knowingly.
11
11
  */
12
+ export { applyChordLayout } from "./src/charts/Chord/applyLayout.js";
12
13
  export { applyGeomapLayout } from "./src/charts/Geomap/applyLayout.js";
13
14
  export { applyMatrixLayout } from "./src/charts/Matrix/applyLayout.js";
14
15
  export { applyNetworkLayout } from "./src/charts/Network/applyLayout.js";
@@ -21,7 +22,10 @@ export { applyRadarLayout } from "./src/charts/Radar/applyLayout.js";
21
22
  export { applyRadialMatrixLayout } from "./src/charts/RadialMatrix/applyLayout.js";
22
23
  export { applyTreeLayout } from "./src/charts/Tree/applyLayout.js";
23
24
  export { applyTreemapLayout } from "./src/charts/Treemap/applyLayout.js";
25
+ export { default as binData } from "./src/charts/Histogram/binData.js";
26
+ export { chordDef } from "./src/charts/Chord/index.js";
24
27
  export { geomapDef } from "./src/charts/Geomap/index.js";
28
+ export { histogramDef } from "./src/charts/Histogram/index.js";
25
29
  export { matrixDef } from "./src/charts/Matrix/index.js";
26
30
  export { networkDef } from "./src/charts/Network/index.js";
27
31
  export { ringsDef } from "./src/charts/Rings/index.js";
@@ -35,7 +39,7 @@ export { treeDef } from "./src/charts/Tree/index.js";
35
39
  export { treemapDef } from "./src/charts/Treemap/index.js";
36
40
  export { createFluent, installFluent } from "./src/fluent.js";
37
41
  export { runStages } from "./src/charts/pipeline/stages.js";
38
- export { runVizPipeline } from "./src/charts/pipeline/runVizPipeline.js";
42
+ export { runPostDrawFeatures, runVizPipeline } from "./src/charts/pipeline/runVizPipeline.js";
39
43
  export { resolveSpec } from "./src/charts/pipeline/resolveSpec.js";
40
44
  export { vizDraw } from "./src/charts/pipeline/vizDraw.js";
41
45
  export { vizDrawPure } from "./src/charts/pipeline/vizDrawPure.js";
@@ -44,7 +48,16 @@ export { vizPreDrawPure, vizPostThresholdCtx } from "./src/charts/pipeline/vizPr
44
48
  export { plotEmit, plotPaint } from "./src/charts/features/plotPaint.js";
45
49
  export { renderAxes } from "./src/charts/features/axes.js";
46
50
  export { computeAxisLayout, measureAxis } from "./src/components/Axis/Axis.js";
47
- export { backFeature, colorScaleFeature, legendFeature, runLayout, subtitleFeature, timelineFeature, titleFeature, totalFeature, } from "./src/charts/features/features.js";
51
+ export { colorScaleFeature, legendFeature, runLayout, subtitleFeature, timelineFeature, titleFeature, totalFeature, } from "./src/charts/features/features.js";
52
+ export { getTopLeftContributions, topLeftControlsFeature, TOP_LEFT_CONTRIBUTORS, } from "./src/charts/drawSteps/topLeftControls.js";
53
+ export { backContribution } from "./src/charts/drawSteps/backControl.js";
54
+ export { BOTTOM_RIGHT_CONTRIBUTORS, bottomRightControlsFeature, reserveBottomRight, sizeLegendContribution, } from "./src/charts/drawSteps/bottomRightControls.js";
55
+ export { bottomRightClearance, bottomRightControlsBox, bottomRightControlsDrop, bottomRightControlsInset, bottomRightControlsShortfall, } from "./src/charts/drawSteps/bottomRightControlsMarkup.js";
56
+ export type { BottomRightBox, BottomRightContribution } from "./src/charts/drawSteps/bottomRightControlsMarkup.js";
57
+ export { computeSizeLegend, defaultSizeLegendValues, zoomSizeLegendScale, } from "./src/components/SizeLegend/sizeLegendLayout.js";
58
+ export type { SizeLegendLayout, SizeLegendScale, SizeLegendSize } from "./src/components/SizeLegend/sizeLegendLayout.js";
59
+ export { tableViewContribution } from "./src/charts/drawSteps/tableViewControl.js";
60
+ export { searchContribution } from "./src/charts/drawSteps/searchControls.js";
48
61
  export type { ResolvedSpec } from "./src/charts/pipeline/resolveSpec.js";
49
62
  export type { VizContext } from "./src/charts/pipeline/vizContext.js";
50
63
  export type { VizPreDrawResult } from "./src/charts/pipeline/vizPreDrawPure.js";
@@ -52,3 +65,4 @@ export type { PlotMeasureResult, PlotPaintContext } from "./src/charts/features/
52
65
  export type { ShapeLike, VizLike } from "./src/charts/features/emitHelpers.js";
53
66
  export type { VizInstance, VizRenderer } from "./src/charts/viz/vizTypes.js";
54
67
  export type { AxisLayout, AxisLayoutResult } from "./src/components/Axis/Axis.js";
68
+ export type { Contribution } from "./src/charts/drawSteps/topLeftControlsMarkup.js";
@@ -4,7 +4,8 @@
4
4
  import type { ChartDefinition } from "../definition/ChartDefinition.js";
5
5
  export declare const barChartDef: ChartDefinition;
6
6
  /**
7
- Creates a bar chart based on an array of data.
7
+ Creates a bar chart based on an array of data. When stacked, each bar's
8
+ fraction of its stack total is available to tooltip accessors as `share`.
8
9
  */
9
10
  declare const _default: new () => any;
10
11
  export default _default;
@@ -0,0 +1,43 @@
1
+ /**
2
+ `applyChordLayout` — Chord's chart-specific layout stage. Resolves nodes +
3
+ links into a square flow matrix, runs the d3-chord layout (directed by
4
+ default), builds the arc (group) + ribbon (chord) path generators, computes
5
+ per-node label geometry, and stashes `chordCtx` + `nodeLookup` + `adjacency`
6
+ on `viz.ctx`.
7
+
8
+ Geometry is generated at the origin (0,0), like Pie/Donut — the chart is
9
+ centered by `chordDef.chartTransform`.
10
+ */
11
+ import type { Chord, ChordGroup, Chords } from "d3-chord";
12
+ import type { DataPoint } from "@d3plus/data";
13
+ import type { TransformStage } from "../pipeline/stages.js";
14
+ /** A single laid-out Chord node (group), accreted across the layout passes. */
15
+ export interface ChordNode {
16
+ __d3plus__: true;
17
+ data: DataPoint;
18
+ node: DataPoint;
19
+ i: number;
20
+ id: string | number;
21
+ shape: string;
22
+ /** The d3-chord group for this node, set once the layout runs. */
23
+ group?: ChordGroup;
24
+ /** Label anchor point (on the outer radius, centered coords). */
25
+ labelX?: number;
26
+ labelY?: number;
27
+ labelRotate?: number;
28
+ labelAnchor?: "start" | "end";
29
+ labelBounds?: {
30
+ x: number;
31
+ y: number;
32
+ width: number;
33
+ height: number;
34
+ };
35
+ }
36
+ /** Everything `chordEmit` needs, stashed on `viz.ctx.chordCtx`. */
37
+ export interface ChordCtx {
38
+ nodes: ChordNode[];
39
+ chords: Chords;
40
+ arcFn: (d: ChordGroup) => string;
41
+ ribbonFn: (d: Chord) => string;
42
+ }
43
+ export declare const applyChordLayout: TransformStage;
@@ -0,0 +1,10 @@
1
+ /**
2
+ `chordEmit` — ribbon Paths (chords) + arc Paths (groups) + rotated group
3
+ labels, from `chordCtx` stashed on `viz.ctx`. Emits flat SceneNodes directly.
4
+
5
+ Ribbons are emitted first so the arcs paint on top of their attach points.
6
+ Ribbon fill is resolved against the *source* node so each flow reads as
7
+ leaving its origin; arc fill is the node's own color.
8
+ */
9
+ import type { ChartEmit } from "../definition/ChartDefinition.js";
10
+ export declare const chordEmit: ChartEmit;
@@ -0,0 +1,19 @@
1
+ /**
2
+ Chord — d3-chord relationship diagram.
3
+
4
+ Groups (nodes) are laid out as arcs around a circle; ribbons (chords) connect
5
+ them, sized by the flow (link value) between each pair. Built on the same
6
+ nodes/links data model as Network, Rings, and Sankey.
7
+
8
+ Implementation files in this folder:
9
+ - `applyLayout.ts` — node/link resolution → flow matrix → d3-chord layout +
10
+ arc/ribbon generators + label geometry.
11
+ - `emit.ts` — ribbon Paths + arc Paths + rotated group labels.
12
+ */
13
+ import type { ChartDefinition } from "../definition/ChartDefinition.js";
14
+ export declare const chordDef: ChartDefinition;
15
+ /**
16
+ Creates a Chord diagram based on a defined set of nodes and links.
17
+ */
18
+ declare const _default: new () => any;
19
+ export default _default;
@@ -3,5 +3,13 @@
3
3
  topojson → feature conversion + filter, builds the d3-geo path
4
4
  generator, fits the projection, and stashes `geomapCtx` on `viz.ctx`.
5
5
  */
6
- import type { TransformStage } from "../pipeline/stages.js";
6
+ import type { DataPoint } from "@d3plus/data";
7
+ import type { TransformStage, VizContext } from "../pipeline/stages.js";
8
+ import type { SizeLegendScale } from "../../components/SizeLegend/sizeLegendLayout.js";
9
+ type GeomapViz = VizContext["viz"];
10
+ /** The rows drawn as points: those whose `point` accessor returns coordinates. */
11
+ export declare function geomapPointData(v: GeomapViz): DataPoint[];
12
+ /** The point radius scale: `pointSizeScale` over the points' `pointSize` extent, onto `[pointSizeMin, pointSizeMax]`. */
13
+ export declare function geomapPointSizeScale(v: GeomapViz, pointData: DataPoint[]): SizeLegendScale;
7
14
  export declare const applyGeomapLayout: TransformStage;
15
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ Light/dark basemaps. `tileUrl` and `ocean` accept either one value or a
3
+ `{light, dark}` pair; a pair resolves against the chart's backdrop each
4
+ draw, and the chart redraws when that backdrop flips.
5
+
6
+ @module
7
+ */
8
+ import type { VizInstance } from "../viz/vizTypes.js";
9
+ /** A value, or one per page theme. */
10
+ export type Themed<T> = T | {
11
+ light: T;
12
+ dark: T;
13
+ };
14
+ /** Esri's Canvas basemaps: muted, nearly label-free bases for data overlays. */
15
+ export declare const DEFAULT_TILE_URL: Themed<string>;
16
+ /** The Canvas basemaps' own water colors, so the ocean around the tiles matches. */
17
+ export declare const DEFAULT_OCEAN: Themed<string>;
18
+ /** Picks a themed value's light or dark side. */
19
+ export declare function resolveThemed<T>(value: Themed<T>, dark: boolean): T;
20
+ /** Whether a Geomap has any themed value that depends on the backdrop. */
21
+ export declare function isThemed(viz: VizInstance): boolean;
22
+ /**
23
+ Whether the chart sits on a dark backdrop: the first non-transparent
24
+ background among its ancestors, or — when none sets one — the browser's
25
+ own page canvas, which is dark only when the page opts into a dark
26
+ `color-scheme` and the system prefers dark. Server renders are light.
27
+ */
28
+ export declare function pageIsDark(viz: VizInstance): boolean;
29
+ /**
30
+ Redraws the chart when its backdrop changes theme: on a system theme
31
+ change, or when the page flips a theme class/attribute/style on <html>
32
+ or <body> (how most theme toggles work). Installed once per chart, and
33
+ only while it uses a `{light, dark}` pair.
34
+ */
35
+ export declare function watchPageTheme(viz: VizInstance): void;
@@ -0,0 +1,37 @@
1
+ import type { DataPoint } from "@d3plus/data";
2
+ /** A d3-array threshold generator: `(values, min, max) → count | edges`. */
3
+ export type ThresholdGenerator = (values: ArrayLike<number>, min: number, max: number) => number | number[];
4
+ /** How bin heights are normalized. */
5
+ export type BinNormalize = "count" | "density" | "relative";
6
+ export interface BinOptions {
7
+ /** Numeric observation accessor. */
8
+ value: (d: DataPoint, i: number) => unknown;
9
+ /** Series key for a row; rows sharing a key are binned together. */
10
+ group?: (d: DataPoint, i: number) => string;
11
+ /** Bin count, explicit edges, or a threshold generator. */
12
+ thresholds?: number | number[] | ThresholdGenerator;
13
+ /** `[min, max]` to bin across; defaults to the values' extent. */
14
+ domain?: [number, number];
15
+ /** Uniform bin width; overrides `thresholds`. */
16
+ width?: number;
17
+ /** `"count"` (default), `"density"` (area sums to 1), or `"relative"` (heights sum to 1). */
18
+ normalize?: BinNormalize;
19
+ }
20
+ /** One bin of one group. Carries the group's first row's fields. */
21
+ export interface BinRow extends DataPoint {
22
+ /** Bin start (inclusive). */
23
+ x0: number;
24
+ /** Bin end (exclusive, except for the last bin). */
25
+ x1: number;
26
+ /** Bin midpoint. */
27
+ x: number;
28
+ /** Observations in this group's bin. */
29
+ count: number;
30
+ /** The normalized height. */
31
+ y: number;
32
+ }
33
+ /**
34
+ Bins `rows` by `options.value`. Non-finite values are dropped. Every group
35
+ gets a row for every bin (empty bins included, so stacks line up).
36
+ */
37
+ export default function binData(rows: DataPoint[], options: BinOptions): BinRow[];
@@ -0,0 +1,14 @@
1
+ /**
2
+ Histogram — BarChart-style Plot that bins raw observations along a linear
3
+ x axis, one contiguous bar per bin, stacking series by `groupBy`.
4
+ */
5
+ import type { ChartDefinition } from "../definition/ChartDefinition.js";
6
+ export declare const histogramDef: ChartDefinition;
7
+ /**
8
+ Creates a histogram from an array of raw observations: the `value` of each
9
+ row is binned along a linear x axis, and bar heights show each bin's
10
+ count (or density / relative frequency via `binNormalize`). Series set by
11
+ `groupBy` share bin edges and are stacked.
12
+ */
13
+ declare const _default: new () => any;
14
+ export default _default;
@@ -7,4 +7,12 @@
7
7
  `viz.ctx` for the click/hover handlers installed by `setup`.
8
8
  */
9
9
  import type { TransformStage } from "../pipeline/stages.js";
10
+ import type { SizeLegendScale } from "../../components/SizeLegend/sizeLegendLayout.js";
11
+ /**
12
+ Network's size-legend scale for a chart area of `width` × `height`: the
13
+ same node set, positions, and fitted radius scale the layout builds, run
14
+ on a scratch copy of the nodes. The fit only shrinks as the area does, so
15
+ the layout's final radii never exceed this estimate's.
16
+ */
17
+ export declare function networkSizeLegendScale(v: Parameters<TransformStage>[0]["viz"], width: number, height: number): SizeLegendScale | null;
10
18
  export declare const applyNetworkLayout: TransformStage;
@@ -0,0 +1,9 @@
1
+ import type { VizInstance } from "../viz/vizTypes.js";
2
+ /** Whether `axis` is a span-valued discrete axis. */
3
+ export declare function isSpanAxis(viz: VizInstance, axis: string): boolean;
4
+ /** `[start, end]` of a formatted Plot row (reads its source `data`). */
5
+ export declare function rowSpan(viz: VizInstance, row: Record<string, unknown>): [number, number];
6
+ /** The `[min start, max end]` domain covering every row's span. */
7
+ export declare function spanDomain(viz: VizInstance, rows: Record<string, unknown>[]): number[];
8
+ /** Every unique span boundary, ascending — the tick values for a span axis. */
9
+ export declare function spanEdges(viz: VizInstance, rows: Record<string, unknown>[]): number[];
@@ -1,5 +1,7 @@
1
1
  import { type StackOffsetFn, type StackOrderFn, type StackOrderInput } from "./stackHelpers.js";
2
- import { type PlotPaintContext } from "../features/plotPaint.js";
2
+ import type { PlotPaintContext } from "../features/plotPaint.js";
3
+ import { type ZoomState } from "./plotZoom.js";
4
+ import { type TrendLineType } from "./trendLines.js";
3
5
  import Viz from "../viz/Viz.js";
4
6
  import type { InteractionPoint, PickResult, Scene, SceneEvent } from "@d3plus/render";
5
7
  import type { DataPoint } from "@d3plus/data";
@@ -12,6 +14,8 @@ type PlotAccessorArg = string | PlotAccessor;
12
14
  Creates an x/y plot based on an array of data.
13
15
  */
14
16
  export default class Plot extends Viz {
17
+ _trendLine: TrendLineType;
18
+ _trendLineConfig: Record<string, unknown>;
15
19
  /**
16
20
  Invoked when creating a new class instance, and sets any default parameters.
17
21
  @private
@@ -63,16 +67,30 @@ export default class Plot extends Viz {
63
67
  /**
64
68
  Picks the interaction point closest to a surface-local cursor position
65
69
  along the discrete axis. `event.point` is post-zoom surface space while the
66
- points are in pre-zoom content space (they live under the `viz-zoom`
67
- group), so the cursor is un-zoomed by `_zoomTransform` before comparing.
70
+ points are in chart content space (under the `viz-zoom` group and then
71
+ the chart's own `viz-chart-body` transform), so the cursor is un-zoomed
72
+ by `_zoomTransform` and offset by `_chartTransform` before comparing.
68
73
  @private
69
74
  */
70
75
  _nearestInteractionPoint(points: InteractionPoint[], point: [number, number]): InteractionPoint | null;
76
+ /**
77
+ Drives the shared multi-series tooltip + crosshair: while the pointer is
78
+ inside the plot area, snaps to the nearest discrete position and, when
79
+ two or more series share it, shows them all in one tooltip (suppressing
80
+ the single-shape tooltip). Clears on leaving the plot area or the chart.
81
+ @private
82
+ */
83
+ _sharedHover(event: SceneEvent): void;
71
84
  /**
72
85
  Extends the draw behavior of the abstract Viz class.
73
86
  @private
74
87
  */
75
88
  _draw(callback?: () => void): VizInstance;
89
+ /**
90
+ The bubble radius scale, for the size legend (see `plotSizeLegendScale`).
91
+ @private
92
+ */
93
+ _sizeLegendScale(): import("../../../internal.js").SizeLegendScale | null;
76
94
  /**
77
95
  Paint phase: production axis rendering, shape buffer setup, and shape
78
96
  emission with event handlers. Receives all cross-phase locals from
@@ -80,6 +98,13 @@ export default class Plot extends Viz {
80
98
  scope beyond the explicit context).
81
99
  */
82
100
  _paint(pCtx: PlotPaintContext): this;
101
+ /**
102
+ Zooms by rescaling the plot's linear axes instead of scaling the
103
+ rendered picture (see `Plot/plotZoom.ts`). Returns false when no axis
104
+ is linear, so the plot falls back to picture zoom.
105
+ @private
106
+ */
107
+ _zoomRescale(t: ZoomState, duration?: number): boolean;
83
108
  /**
84
109
  Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc).
85
110
 
@@ -131,6 +156,29 @@ export default class Plot extends Viz {
131
156
  The behavior to be used when calculating the position and size of each shape's label(s). The value passed can either be the _String_ name of the behavior to be used for all shapes, or an accessor _Function_ that will be provided each data point and will be expected to return the behavior to be used for that data point. The availability and options for this method depend on the default logic for each Shape. As an example, the values "outside" or "inside" can be set for Bar shapes, whose "auto" default will calculate the best position dynamically based on the available space.
132
157
  */
133
158
  labelPosition(_?: string | ((d: DataPoint, i: number) => string)): this | ((d: DataPoint, i: number) => string);
159
+ /**
160
+ Paint for the shared tooltip's crosshair guide line (`stroke`,
161
+ `strokeWidth`, `strokeDasharray`, `strokeOpacity`, …). Merged into the
162
+ current config.
163
+ */
164
+ crosshairConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
165
+ /**
166
+ Draws an automatic trend line fit to the plotted data: `true` (or `"linear"`) for a least-squares line, or one of `"exponential"`, `"logarithmic"`, `"power"`, or `"polynomial"`. By default each series gets its own line in its color; see `trendLineConfig` for grouping, a confidence band, and styling. On a chart with a discrete axis, the line runs along that axis, fitting categories by their order. Set to `false` (the default) to remove.
167
+ */
168
+ trendLine(_?: TrendLineType): this | TrendLineType;
169
+ /**
170
+ Options for the trend lines drawn by `trendLine`, merged into the current config:
171
+ - `group`: `"series"` (default) fits one line per series, colored to match it; `"all"` fits a single line to every point.
172
+ - `order`: the polynomial degree when `trendLine` is `"polynomial"` (default `2`).
173
+ - `confidence`: draws a confidence band around a linear fit (default `false`).
174
+ - `confidenceLevel`: the band's confidence level (default `0.95`).
175
+ - `confidenceConfig`: Area shape config for the band (default `{fillOpacity: 0.15}`; fill defaults to the line color).
176
+ - `tooltip`: shows the fitted equation and R² when hovering a line (default `true`).
177
+ - Any other key (`stroke`, `strokeWidth`, `strokeDasharray`, …) styles the Line shape.
178
+
179
+ Stacked charts always fit one line to the stack totals.
180
+ */
181
+ trendLineConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
134
182
  /**
135
183
  Shape config for the Circle shapes drawn by the lineMarkers method.
136
184
  */
@@ -1,7 +1,21 @@
1
1
  import type { ChartDefinition } from "../definition/ChartDefinition.js";
2
2
  import type { TransformStage } from "../pipeline/stages.js";
3
+ import type { D3Scale } from "../../utils/index.js";
4
+ import type { SizeLegendScale } from "../../components/SizeLegend/sizeLegendLayout.js";
3
5
  export { computePlotInitialDomains } from "./pipelineDomains.js";
4
6
  export { measurePlotLineLabels } from "./pipelineLineLabels.js";
7
+ /**
8
+ The bubble radius scale: `sizeScale` over the extent of `sizes`, ranging
9
+ from `sizeMin` (capped at half of `sizeMax`) to `sizeMax`. A single-value
10
+ extent maps everything to `sizeMax`.
11
+ */
12
+ export declare function plotSizeScale(viz: Parameters<TransformStage>[0]["viz"], sizes: number[]): D3Scale;
13
+ /**
14
+ Plot's size-legend scale, available before layout: the same scale
15
+ `formatPlotData` builds, over the plottable rows. Null when there's no
16
+ `size` accessor or none of those rows draws as a circle.
17
+ */
18
+ export declare function plotSizeLegendScale(viz: Parameters<TransformStage>[0]["viz"]): SizeLegendScale | null;
5
19
  /**
6
20
  `formatPlotData` — first stage of Plot's chart-specific pipeline. Detects
7
21
  time axes (sets viz._xTime / _x2Time / _yTime / _y2Time), maps the
@@ -0,0 +1,65 @@
1
+ /**
2
+ Axis-rescaling zoom for the Plot family (#780).
3
+
4
+ Rather than scaling the rendered picture (how every other chart zooms), a
5
+ Plot keeps its axes in place and rescales the domain of each simple linear
6
+ axis, then repaints its axes and shapes at the new scale. Discrete, time,
7
+ and log axes stay fixed — a bar chart zooms and pans along its value axis
8
+ only. The d3-zoom behavior and controls are shared with every other chart
9
+ (`drawSteps/zoomControls.ts`); `zoomed()` hands each transform to
10
+ `Plot._zoomRescale`, which lands here.
11
+
12
+ @module
13
+ */
14
+ import type { SceneNode } from "@d3plus/render";
15
+ import type { PlotMeasureResult, PlotPaintContext } from "../features/plotPaint.js";
16
+ import type { VizInstance as Viz } from "../viz/vizTypes.js";
17
+ type AxisName = "x" | "x2" | "y" | "y2";
18
+ /** The invertible piece of an axis's d3 scale the rescale needs. */
19
+ interface LinearScale {
20
+ (value: number): number;
21
+ domain(): number[];
22
+ range(): number[];
23
+ invert(value: number): number;
24
+ }
25
+ /** A continuous transform in surface space, as d3-zoom reports it. */
26
+ export interface ZoomState {
27
+ k: number;
28
+ x: number;
29
+ y: number;
30
+ }
31
+ /** The unzoomed draw a zoom rescales from. */
32
+ export interface PlotZoomBase {
33
+ pCtx: PlotPaintContext;
34
+ layout: PlotMeasureResult;
35
+ chartTransform: {
36
+ x: number;
37
+ y: number;
38
+ };
39
+ scales: Partial<Record<AxisName, LinearScale>>;
40
+ labelSpace: Partial<Record<AxisName, number>>;
41
+ }
42
+ /**
43
+ Paints a Plot at its natural (unzoomed) scale and records what a zoom
44
+ needs to rescale from. When a zoom is already in effect (the chart was
45
+ re-rendered mid-zoom), the plot is immediately repainted at that zoom so
46
+ the view doesn't snap back.
47
+ */
48
+ export declare function paintZoomablePlot(viz: Viz, pCtx: PlotPaintContext, current?: ZoomState): SceneNode[];
49
+ /**
50
+ Repaints the plot for a zoom transform. Returns the new chart scene, or
51
+ `undefined` when the plot has no linear axis to rescale (it then falls
52
+ back to picture zoom like any other chart). The content is clipped to the
53
+ plot rect unless the view is at its natural scale (or `keepClip` is set),
54
+ where shapes drawn at the domain edges would otherwise be cut off.
55
+ */
56
+ export declare function rescalePlot(viz: Viz, t: ZoomState, keepClip?: boolean): SceneNode[] | undefined;
57
+ /**
58
+ Repaints the plot for a zoom transform, animated over `duration`. An
59
+ animated return to the natural scale from a zoomed view keeps the clip until the transition
60
+ settles, so shapes tweening back in from outside the plot don't paint
61
+ over the axes on the way; the clip is then dropped with an instant
62
+ repaint.
63
+ */
64
+ export declare function zoomPlot(viz: Viz, t: ZoomState, duration: number): SceneNode[] | undefined;
65
+ export {};
@@ -0,0 +1,79 @@
1
+ /**
2
+ Shared multi-series tooltip + crosshair for Plot charts (#779): while the
3
+ pointer is over the plot area, snap to the nearest discrete-axis position
4
+ and list every series' value there in one tooltip, with a guide line drawn
5
+ through that position.
6
+ */
7
+ import type { DataPoint } from "@d3plus/data";
8
+ import type { InteractionPoint, SceneEvent, SceneNode } from "@d3plus/render";
9
+ import type { VizInstance } from "../viz/vizTypes.js";
10
+ /** One series' entry in the shared tooltip. */
11
+ export interface SharedRow {
12
+ id: string;
13
+ name: string;
14
+ value: number;
15
+ color?: string;
16
+ /** The mark's shape type, which picks the row's swatch (dot vs. square). */
17
+ shape?: string;
18
+ datum: DataPoint;
19
+ index: number;
20
+ }
21
+ /**
22
+ The resolved shared hover: the snapped discrete position (pixel + data
23
+ value) and its rows. `stack` holds the column's stacked-bar rows
24
+ (highlighted together) and every stacked-bar row in the chart, when the
25
+ column has bars; `markers` the column's Line points; `layer` puts the
26
+ crosshair in front of the marks when the chart has areas, else behind.
27
+ */
28
+ export interface SharedHover {
29
+ /** "shared": every series at the column; "single": one hovered mark. */
30
+ mode: "shared" | "single";
31
+ axis: "x" | "y";
32
+ px: number;
33
+ value: unknown;
34
+ rows: SharedRow[];
35
+ markers: {
36
+ datum: DataPoint;
37
+ x: number;
38
+ y: number;
39
+ }[];
40
+ layer: "back" | "front";
41
+ stack?: {
42
+ rows: Set<DataPoint>;
43
+ bars: Set<DataPoint>;
44
+ };
45
+ }
46
+ export type ShapeNode = SceneNode & {
47
+ shapeType?: string;
48
+ interactionGroup?: string;
49
+ interactionPoints?: InteractionPoint[];
50
+ interactive?: boolean;
51
+ datum?: DataPoint;
52
+ paint?: {
53
+ stroke?: unknown;
54
+ fill?: unknown;
55
+ };
56
+ children?: SceneNode[];
57
+ };
58
+ /**
59
+ Converts a surface-local pointer position into chart content space: undoes
60
+ the `viz-zoom` group's `_zoomTransform`, then the `viz-chart-body` group's
61
+ `_chartTransform`.
62
+ */
63
+ export declare function contentPoint(viz: VizInstance, point: [number, number]): [number, number];
64
+ /**
65
+ Whether a scene node is a data mark the shared tooltip reads: Line/Area
66
+ series and other single marks, but Bars only when stacked (side-by-side
67
+ bars keep the single-bar tooltip).
68
+ */
69
+ export declare function sharedMark(viz: VizInstance, node: ShapeNode): boolean;
70
+ /** Whether the chart scene holds any mark the shared tooltip reads. */
71
+ export declare function hasSharedMarks(viz: VizInstance): boolean;
72
+ /**
73
+ Plot's `_sharedHover`: snaps the tooltip to the hovered discrete position
74
+ (see `resolveHover`), hiding its arrow and drawing a crosshair through it —
75
+ one tooltip for every series ("shared"), or the hovered mark's x/y values
76
+ ("single"). Replaces the default shape tooltip while active; clears on
77
+ leaving the plot area (or the mark) or the chart.
78
+ */
79
+ export declare function handleSharedHover(viz: VizInstance, event: SceneEvent): void;
@@ -0,0 +1,11 @@
1
+ import type { Scene } from "@d3plus/render";
2
+ import type { VizInstance } from "../viz/vizTypes.js";
3
+ /**
4
+ Adds the snapped hover's scene nodes to the chart body group (content
5
+ space, so they track zoom): with `tooltipShared`, a transparent hover
6
+ surface behind the marks, so the SVG backend receives pointer events over
7
+ empty plot space; and — while a hover is active — the crosshair and the
8
+ hovered Line markers, inside the zoom-clipped plot content when the chart
9
+ is zoomable.
10
+ */
11
+ export declare function appendSharedHoverNodes(viz: VizInstance, scene: Scene): void;
@@ -0,0 +1,26 @@
1
+ import type { SceneEvent } from "@d3plus/render";
2
+ import type { VizInstance } from "../viz/vizTypes.js";
3
+ import type { SharedHover } from "./sharedHover.js";
4
+ /**
5
+ Holds the tooltip's own arrow/thead/tbody to restore once the snapped
6
+ hover ends (see `restoreTooltip`), so the next legend or default tooltip
7
+ isn't left with these rows — and resets thead/tbody to them before each
8
+ render so rows never accumulate.
9
+ */
10
+ export declare function prepareTooltip(viz: VizInstance): any;
11
+ /** Puts back what `prepareTooltip` held. */
12
+ export declare function restoreTooltip(viz: VizInstance): void;
13
+ /**
14
+ The shared tooltip: title from the continuous axis, a header row naming
15
+ the hovered discrete value, then one `[name, value]` row per series, the
16
+ name led by a swatch in its series stroke. User `tooltipConfig` styles
17
+ apply first; the shared title/rows win.
18
+ */
19
+ export declare function renderSharedTooltip(viz: VizInstance, hover: SharedHover, event: SceneEvent): void;
20
+ /**
21
+ The single-mark tooltip (one series, `tooltipShared(false)`, or a
22
+ side-by-side bar): the default title (the mark's label, unless
23
+ `tooltipConfig` sets one), its x and y values, then any rows the chart's
24
+ `tooltipConfig` adds.
25
+ */
26
+ export declare function renderSingleTooltip(viz: VizInstance, hover: SharedHover, event: SceneEvent): void;
@@ -0,0 +1,21 @@
1
+ import type { Shape } from "../../shapes/index.js";
2
+ import type { VizInstance } from "../viz/vizTypes.js";
3
+ /** A label bounds box, as returned by a shape's `labelBounds`. */
4
+ interface Box {
5
+ height: number;
6
+ width: number;
7
+ x: number;
8
+ y: number;
9
+ }
10
+ /**
11
+ Splits a label box into a name box and a share band beneath it. Their
12
+ padding overlaps so the bottom-aligned name and top-aligned share meet at
13
+ one line. Returns null when the box is too short to split.
14
+ */
15
+ export declare function splitShareBox(b: Box, padding: number): [Box, Box] | null;
16
+ /**
17
+ Adds a share line to each stacked Bar label on `s`. Labels a user
18
+ already returns as an array (their own multi-line layout) are left alone.
19
+ */
20
+ export declare function applyStackShareLabels(viz: VizInstance, s: Shape): void;
21
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { DataPoint } from "@d3plus/data";
2
+ import type { VizInstance } from "../viz/vizTypes.js";
3
+ /**
4
+ A `tooltipConfig` default whose `tbody` resolves per hover, so the Share
5
+ row only appears while the chart is stacked.
6
+ */
7
+ export declare function stackShareTooltipConfig(viz: VizInstance): {
8
+ tbody: () => ((() => any) | ((_d: DataPoint, _i: number, x: Record<string, unknown>) => string))[][];
9
+ };