@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
@@ -0,0 +1,185 @@
1
+ function _array_like_to_array(arr, len) {
2
+ if (len == null || len > arr.length) len = arr.length;
3
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
+ return arr2;
5
+ }
6
+ function _array_with_holes(arr) {
7
+ if (Array.isArray(arr)) return arr;
8
+ }
9
+ function _iterable_to_array_limit(arr, i) {
10
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
11
+ if (_i == null) return;
12
+ var _arr = [];
13
+ var _n = true;
14
+ var _d = false;
15
+ var _s, _e;
16
+ try {
17
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
18
+ _arr.push(_s.value);
19
+ if (i && _arr.length === i) break;
20
+ }
21
+ } catch (err) {
22
+ _d = true;
23
+ _e = err;
24
+ } finally{
25
+ try {
26
+ if (!_n && _i["return"] != null) _i["return"]();
27
+ } finally{
28
+ if (_d) throw _e;
29
+ }
30
+ }
31
+ return _arr;
32
+ }
33
+ function _non_iterable_rest() {
34
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
35
+ }
36
+ function _sliced_to_array(arr, i) {
37
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
38
+ }
39
+ function _unsupported_iterable_to_array(o, minLen) {
40
+ if (!o) return;
41
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
42
+ var n = Object.prototype.toString.call(o).slice(8, -1);
43
+ if (n === "Object" && o.constructor) n = o.constructor.name;
44
+ if (n === "Map" || n === "Set") return Array.from(n);
45
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
46
+ }
47
+ /**
48
+ Automatic maximum zoom scale (#85): how far a chart can zoom depends on
49
+ what it draws. A network of a few large nodes needs little zoom, while a
50
+ detailed map should be able to zoom all the way into its smallest path.
51
+
52
+ @module
53
+ */ import { pathBounds } from "@d3plus/math";
54
+ import { areaPath, linePath } from "@d3plus/render";
55
+ /**
56
+ Width/height of each measurable piece of a scene node's own geometry
57
+ (before its transform). A Line/Area series spans the whole chart, so its
58
+ detail is the segment between consecutive data points rather than the
59
+ series' own extent.
60
+ */ function nodeSizes(node) {
61
+ var pts = node.interactionPoints;
62
+ if (pts && pts.length > 1) {
63
+ var sizes = [];
64
+ for(var i = 1; i < pts.length; i++)sizes.push([
65
+ Math.abs(pts[i].x - pts[i - 1].x),
66
+ Math.abs(pts[i].y - pts[i - 1].y)
67
+ ]);
68
+ return sizes;
69
+ }
70
+ var size = nodeSize(node);
71
+ return size ? [
72
+ size
73
+ ] : [];
74
+ }
75
+ /** Width/height of a scene node's own geometry (before its transform). */ function nodeSize(node) {
76
+ switch(node.type){
77
+ case "rect":
78
+ case "image":
79
+ return [
80
+ node.width,
81
+ node.height
82
+ ];
83
+ case "circle":
84
+ return [
85
+ node.r * 2,
86
+ node.r * 2
87
+ ];
88
+ case "path":
89
+ {
90
+ var b = pathBounds(node.d);
91
+ return [
92
+ b.width,
93
+ b.height
94
+ ];
95
+ }
96
+ case "line":
97
+ {
98
+ var b1 = pathBounds(linePath(node));
99
+ return [
100
+ b1.width,
101
+ b1.height
102
+ ];
103
+ }
104
+ case "area":
105
+ {
106
+ var b2 = pathBounds(areaPath(node));
107
+ return [
108
+ b2.width,
109
+ b2.height
110
+ ];
111
+ }
112
+ default:
113
+ return null;
114
+ }
115
+ }
116
+ /**
117
+ The zoom scale at which the chart's smallest data shape fills the chart
118
+ area (less `padding` on each side, matching `zoomToBounds`), floored at 1.
119
+
120
+ Data shapes are the top-level datum-bearing nodes of `_chartScene` (a
121
+ Line/Area series is measured per segment — see `nodeSizes`). Chart
122
+ decorations (axes, gridlines, radar spokes, …) are nested in groups, text
123
+ labels scale with the shapes they annotate, and `::hit` nodes duplicate
124
+ the geometry of the shape they belong to, so none of those are measured.
125
+
126
+ @param nodes The chart's `_chartScene`.
127
+ @param width Chart-area width.
128
+ @param height Chart-area height.
129
+ @param padding Pixel padding kept around a shape zoomed to fill the area.
130
+ @param baseScale Any scale the chart's own transform already applies.
131
+ */ export function autoZoomMax(nodes, width, height, padding) {
132
+ var baseScale = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1;
133
+ var fitW = Math.max(1, width - padding * 2), fitH = Math.max(1, height - padding * 2);
134
+ var max = 1;
135
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
136
+ try {
137
+ for(var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
138
+ var node = _step.value;
139
+ var _ref;
140
+ var _node_transform;
141
+ if (node.datum === undefined || node.type === "group" || node.type === "text") continue;
142
+ if (String(node.key).endsWith("::hit")) continue;
143
+ var s = baseScale * ((_ref = (_node_transform = node.transform) === null || _node_transform === void 0 ? void 0 : _node_transform.scale) !== null && _ref !== void 0 ? _ref : 1);
144
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
145
+ try {
146
+ for(var _iterator1 = nodeSizes(node)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
147
+ var _step_value = _sliced_to_array(_step1.value, 2), w = _step_value[0], h = _step_value[1];
148
+ // A zero-width (or -height) shape only constrains the other dimension;
149
+ // one with no extent at all can't be zoomed into.
150
+ var k = Math.min(w > 0 ? fitW / (w * s) : Infinity, h > 0 ? fitH / (h * s) : Infinity);
151
+ if (Number.isFinite(k) && k > max) max = k;
152
+ }
153
+ } catch (err) {
154
+ _didIteratorError1 = true;
155
+ _iteratorError1 = err;
156
+ } finally{
157
+ try {
158
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
159
+ _iterator1.return();
160
+ }
161
+ } finally{
162
+ if (_didIteratorError1) {
163
+ throw _iteratorError1;
164
+ }
165
+ }
166
+ }
167
+ }
168
+ } catch (err) {
169
+ _didIteratorError = true;
170
+ _iteratorError = err;
171
+ } finally{
172
+ try {
173
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
174
+ _iterator.return();
175
+ }
176
+ } finally{
177
+ if (_didIteratorError) {
178
+ throw _iteratorError;
179
+ }
180
+ }
181
+ }
182
+ return max;
183
+ }
184
+
185
+ //# sourceMappingURL=zoomExtent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/features/zoomExtent.ts"],"sourcesContent":["/**\n Automatic maximum zoom scale (#85): how far a chart can zoom depends on\n what it draws. A network of a few large nodes needs little zoom, while a\n detailed map should be able to zoom all the way into its smallest path.\n\n @module\n*/\n\nimport {pathBounds} from \"@d3plus/math\";\nimport {areaPath, linePath} from \"@d3plus/render\";\nimport type {SceneNode} from \"@d3plus/render\";\n\n/**\n Width/height of each measurable piece of a scene node's own geometry\n (before its transform). A Line/Area series spans the whole chart, so its\n detail is the segment between consecutive data points rather than the\n series' own extent.\n*/\nfunction nodeSizes(node: SceneNode): [number, number][] {\n const pts = node.interactionPoints;\n if (pts && pts.length > 1) {\n const sizes: [number, number][] = [];\n for (let i = 1; i < pts.length; i++)\n sizes.push([Math.abs(pts[i].x - pts[i - 1].x), Math.abs(pts[i].y - pts[i - 1].y)]);\n return sizes;\n }\n const size = nodeSize(node);\n return size ? [size] : [];\n}\n\n/** Width/height of a scene node's own geometry (before its transform). */\nfunction nodeSize(node: SceneNode): [number, number] | null {\n switch (node.type) {\n case \"rect\":\n case \"image\":\n return [node.width, node.height];\n case \"circle\":\n return [node.r * 2, node.r * 2];\n case \"path\": {\n const b = pathBounds(node.d);\n return [b.width, b.height];\n }\n case \"line\": {\n const b = pathBounds(linePath(node));\n return [b.width, b.height];\n }\n case \"area\": {\n const b = pathBounds(areaPath(node));\n return [b.width, b.height];\n }\n default:\n return null;\n }\n}\n\n/**\n The zoom scale at which the chart's smallest data shape fills the chart\n area (less `padding` on each side, matching `zoomToBounds`), floored at 1.\n\n Data shapes are the top-level datum-bearing nodes of `_chartScene` (a\n Line/Area series is measured per segment — see `nodeSizes`). Chart\n decorations (axes, gridlines, radar spokes, …) are nested in groups, text\n labels scale with the shapes they annotate, and `::hit` nodes duplicate\n the geometry of the shape they belong to, so none of those are measured.\n\n @param nodes The chart's `_chartScene`.\n @param width Chart-area width.\n @param height Chart-area height.\n @param padding Pixel padding kept around a shape zoomed to fill the area.\n @param baseScale Any scale the chart's own transform already applies.\n*/\nexport function autoZoomMax(\n nodes: SceneNode[],\n width: number,\n height: number,\n padding: number,\n baseScale: number = 1,\n): number {\n const fitW = Math.max(1, width - padding * 2),\n fitH = Math.max(1, height - padding * 2);\n let max = 1;\n for (const node of nodes) {\n if (node.datum === undefined || node.type === \"group\" || node.type === \"text\") continue;\n if (String(node.key).endsWith(\"::hit\")) continue;\n const s = baseScale * (node.transform?.scale ?? 1);\n for (const [w, h] of nodeSizes(node)) {\n // A zero-width (or -height) shape only constrains the other dimension;\n // one with no extent at all can't be zoomed into.\n const k = Math.min(w > 0 ? fitW / (w * s) : Infinity, h > 0 ? fitH / (h * s) : Infinity);\n if (Number.isFinite(k) && k > max) max = k;\n }\n }\n return max;\n}\n"],"names":["pathBounds","areaPath","linePath","nodeSizes","node","pts","interactionPoints","length","sizes","i","push","Math","abs","x","y","size","nodeSize","type","width","height","r","b","d","autoZoomMax","nodes","padding","baseScale","fitW","max","fitH","datum","undefined","String","key","endsWith","s","transform","scale","w","h","k","min","Infinity","Number","isFinite"],"mappings":"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"}
@@ -6,12 +6,38 @@ var tileAttributions = [
6
6
  ],
7
7
  text: "© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, © <a href='https://carto.com/attribution' target='_blank'>CARTO</a>"
8
8
  },
9
+ {
10
+ matches: [
11
+ "tile.openstreetmap.org"
12
+ ],
13
+ text: "© <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors"
14
+ },
15
+ {
16
+ matches: [
17
+ "openstreetmap.fr/hot"
18
+ ],
19
+ text: "© <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, tiles by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>"
20
+ },
21
+ {
22
+ matches: [
23
+ "stadiamaps.com"
24
+ ],
25
+ text: "© <a href='https://stadiamaps.com/' target='_blank'>Stadia Maps</a> © <a href='https://openmaptiles.org/' target='_blank'>OpenMapTiles</a> © <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors"
26
+ },
9
27
  {
10
28
  matches: [
11
29
  "opentopomap.org"
12
30
  ],
13
31
  text: "© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors"
14
32
  },
33
+ {
34
+ // Esri's Canvas basemaps (the default); their service credits, plus Esri's own.
35
+ matches: [
36
+ "World_Light_Gray_Base",
37
+ "World_Dark_Gray_Base"
38
+ ],
39
+ text: "Powered by <a href='https://www.esri.com/' target='_blank'>Esri</a> | Esri, HERE, Garmin, © <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, and the GIS user community"
40
+ },
15
41
  {
16
42
  matches: [
17
43
  "arcgisonline.com"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/charts/helpers/tileAttributions.ts"],"sourcesContent":["interface TileAttribution {\n matches: string[];\n text: string;\n}\n\nconst tileAttributions: TileAttribution[] = [\n {\n matches: [\"cartodb\", \"cartocdn\"],\n text: \"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, © <a href='https://carto.com/attribution' target='_blank'>CARTO</a>\",\n },\n {\n matches: [\"opentopomap.org\"],\n text: \"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors\",\n },\n {\n matches: [\"arcgisonline.com\"],\n text: \"Powered by <a href='https://developers.arcgis.com/terms/attribution/' target='_blank'>Esri</a>\",\n },\n {\n matches: [\"/watercolor/\"],\n text: \"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright' target='_blank'>ODbL</a>.\",\n },\n {\n matches: [\"stamen-tiles\", \"stamen.com\"],\n text: \"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://creativecommons.org/licenses/by-sa/3.0' target='_blank'>CC BY SA</a>.\",\n },\n];\n\nexport default tileAttributions;\n"],"names":["tileAttributions","matches","text"],"mappings":"AAKA,IAAMA,mBAAsC;IAC1C;QACEC,SAAS;YAAC;YAAW;SAAW;QAChCC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAkB;QAC5BC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAmB;QAC7BC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAe;QACzBC,MAAM;IACR;IACA;QACED,SAAS;YAAC;YAAgB;SAAa;QACvCC,MAAM;IACR;CACD;AAED,eAAeF,iBAAiB"}
1
+ {"version":3,"sources":["../../../../src/charts/helpers/tileAttributions.ts"],"sourcesContent":["interface TileAttribution {\n matches: string[];\n text: string;\n}\n\nconst tileAttributions: TileAttribution[] = [\n {\n matches: [\"cartodb\", \"cartocdn\"],\n text: \"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, © <a href='https://carto.com/attribution' target='_blank'>CARTO</a>\",\n },\n {\n matches: [\"tile.openstreetmap.org\"],\n text: \"© <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors\",\n },\n {\n matches: [\"openstreetmap.fr/hot\"],\n text: \"© <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, tiles by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>\",\n },\n {\n matches: [\"stadiamaps.com\"],\n text: \"© <a href='https://stadiamaps.com/' target='_blank'>Stadia Maps</a> © <a href='https://openmaptiles.org/' target='_blank'>OpenMapTiles</a> © <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors\",\n },\n {\n matches: [\"opentopomap.org\"],\n text: \"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors\",\n },\n {\n // Esri's Canvas basemaps (the default); their service credits, plus Esri's own.\n matches: [\"World_Light_Gray_Base\", \"World_Dark_Gray_Base\"],\n text: \"Powered by <a href='https://www.esri.com/' target='_blank'>Esri</a> | Esri, HERE, Garmin, © <a href='https://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, and the GIS user community\",\n },\n {\n matches: [\"arcgisonline.com\"],\n text: \"Powered by <a href='https://developers.arcgis.com/terms/attribution/' target='_blank'>Esri</a>\",\n },\n {\n matches: [\"/watercolor/\"],\n text: \"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright' target='_blank'>ODbL</a>.\",\n },\n {\n matches: [\"stamen-tiles\", \"stamen.com\"],\n text: \"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://creativecommons.org/licenses/by-sa/3.0' target='_blank'>CC BY SA</a>.\",\n },\n];\n\nexport default tileAttributions;\n"],"names":["tileAttributions","matches","text"],"mappings":"AAKA,IAAMA,mBAAsC;IAC1C;QACEC,SAAS;YAAC;YAAW;SAAW;QAChCC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAyB;QACnCC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAuB;QACjCC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAiB;QAC3BC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAkB;QAC5BC,MAAM;IACR;IACA;QACE,gFAAgF;QAChFD,SAAS;YAAC;YAAyB;SAAuB;QAC1DC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAmB;QAC7BC,MAAM;IACR;IACA;QACED,SAAS;YAAC;SAAe;QACzBC,MAAM;IACR;IACA;QACED,SAAS;YAAC;YAAgB;SAAa;QACvCC,MAAM;IACR;CACD;AAED,eAAeF,iBAAiB"}
@@ -2,8 +2,10 @@ export { default as AreaPlot } from "./AreaPlot/index.js";
2
2
  export { default as BarChart } from "./BarChart/index.js";
3
3
  export { default as BoxWhisker } from "./BoxWhisker/index.js";
4
4
  export { default as BumpChart } from "./BumpChart/index.js";
5
+ export { default as Chord } from "./Chord/index.js";
5
6
  export { default as Donut } from "./Donut/index.js";
6
7
  export { default as Geomap } from "./Geomap/index.js";
8
+ export { default as Histogram } from "./Histogram/index.js";
7
9
  export { default as LinePlot } from "./LinePlot/index.js";
8
10
  export { default as Matrix } from "./Matrix/index.js";
9
11
  export { default as Network } from "./Network/index.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/charts/index.ts"],"sourcesContent":["export {default as AreaPlot} from \"./AreaPlot/index.js\";\nexport {default as BarChart} from \"./BarChart/index.js\";\nexport {default as BoxWhisker} from \"./BoxWhisker/index.js\";\nexport {default as BumpChart} from \"./BumpChart/index.js\";\nexport {default as Donut} from \"./Donut/index.js\";\nexport {default as Geomap} from \"./Geomap/index.js\";\nexport {default as LinePlot} from \"./LinePlot/index.js\";\nexport {default as Matrix} from \"./Matrix/index.js\";\nexport {default as Network} from \"./Network/index.js\";\nexport {default as Pack} from \"./Pack/index.js\";\nexport {default as Pie} from \"./Pie/index.js\";\nexport {default as Plot} from \"./Plot/index.js\";\nexport {default as Priestley} from \"./Priestley/index.js\";\nexport {default as Radar} from \"./Radar/index.js\";\nexport {default as RadialMatrix} from \"./RadialMatrix/index.js\";\nexport {default as Rings} from \"./Rings/index.js\";\nexport {default as Sankey} from \"./Sankey/index.js\";\nexport {default as StackedArea} from \"./StackedArea/index.js\";\nexport {default as Tree} from \"./Tree/index.js\";\nexport {default as Treemap} from \"./Treemap/index.js\";\nexport {default as Viz} from \"./viz/Viz.js\";\n"],"names":["default","AreaPlot","BarChart","BoxWhisker","BumpChart","Donut","Geomap","LinePlot","Matrix","Network","Pack","Pie","Plot","Priestley","Radar","RadialMatrix","Rings","Sankey","StackedArea","Tree","Treemap","Viz"],"mappings":"AAAA,SAAQA,WAAWC,QAAQ,QAAO,sBAAsB;AACxD,SAAQD,WAAWE,QAAQ,QAAO,sBAAsB;AACxD,SAAQF,WAAWG,UAAU,QAAO,wBAAwB;AAC5D,SAAQH,WAAWI,SAAS,QAAO,uBAAuB;AAC1D,SAAQJ,WAAWK,KAAK,QAAO,mBAAmB;AAClD,SAAQL,WAAWM,MAAM,QAAO,oBAAoB;AACpD,SAAQN,WAAWO,QAAQ,QAAO,sBAAsB;AACxD,SAAQP,WAAWQ,MAAM,QAAO,oBAAoB;AACpD,SAAQR,WAAWS,OAAO,QAAO,qBAAqB;AACtD,SAAQT,WAAWU,IAAI,QAAO,kBAAkB;AAChD,SAAQV,WAAWW,GAAG,QAAO,iBAAiB;AAC9C,SAAQX,WAAWY,IAAI,QAAO,kBAAkB;AAChD,SAAQZ,WAAWa,SAAS,QAAO,uBAAuB;AAC1D,SAAQb,WAAWc,KAAK,QAAO,mBAAmB;AAClD,SAAQd,WAAWe,YAAY,QAAO,0BAA0B;AAChE,SAAQf,WAAWgB,KAAK,QAAO,mBAAmB;AAClD,SAAQhB,WAAWiB,MAAM,QAAO,oBAAoB;AACpD,SAAQjB,WAAWkB,WAAW,QAAO,yBAAyB;AAC9D,SAAQlB,WAAWmB,IAAI,QAAO,kBAAkB;AAChD,SAAQnB,WAAWoB,OAAO,QAAO,qBAAqB;AACtD,SAAQpB,WAAWqB,GAAG,QAAO,eAAe"}
1
+ {"version":3,"sources":["../../../src/charts/index.ts"],"sourcesContent":["export {default as AreaPlot} from \"./AreaPlot/index.js\";\nexport {default as BarChart} from \"./BarChart/index.js\";\nexport {default as BoxWhisker} from \"./BoxWhisker/index.js\";\nexport {default as BumpChart} from \"./BumpChart/index.js\";\nexport {default as Chord} from \"./Chord/index.js\";\nexport {default as Donut} from \"./Donut/index.js\";\nexport {default as Geomap} from \"./Geomap/index.js\";\nexport {default as Histogram} from \"./Histogram/index.js\";\nexport {default as LinePlot} from \"./LinePlot/index.js\";\nexport {default as Matrix} from \"./Matrix/index.js\";\nexport {default as Network} from \"./Network/index.js\";\nexport {default as Pack} from \"./Pack/index.js\";\nexport {default as Pie} from \"./Pie/index.js\";\nexport {default as Plot} from \"./Plot/index.js\";\nexport {default as Priestley} from \"./Priestley/index.js\";\nexport {default as Radar} from \"./Radar/index.js\";\nexport {default as RadialMatrix} from \"./RadialMatrix/index.js\";\nexport {default as Rings} from \"./Rings/index.js\";\nexport {default as Sankey} from \"./Sankey/index.js\";\nexport {default as StackedArea} from \"./StackedArea/index.js\";\nexport {default as Tree} from \"./Tree/index.js\";\nexport {default as Treemap} from \"./Treemap/index.js\";\nexport {default as Viz} from \"./viz/Viz.js\";\n"],"names":["default","AreaPlot","BarChart","BoxWhisker","BumpChart","Chord","Donut","Geomap","Histogram","LinePlot","Matrix","Network","Pack","Pie","Plot","Priestley","Radar","RadialMatrix","Rings","Sankey","StackedArea","Tree","Treemap","Viz"],"mappings":"AAAA,SAAQA,WAAWC,QAAQ,QAAO,sBAAsB;AACxD,SAAQD,WAAWE,QAAQ,QAAO,sBAAsB;AACxD,SAAQF,WAAWG,UAAU,QAAO,wBAAwB;AAC5D,SAAQH,WAAWI,SAAS,QAAO,uBAAuB;AAC1D,SAAQJ,WAAWK,KAAK,QAAO,mBAAmB;AAClD,SAAQL,WAAWM,KAAK,QAAO,mBAAmB;AAClD,SAAQN,WAAWO,MAAM,QAAO,oBAAoB;AACpD,SAAQP,WAAWQ,SAAS,QAAO,uBAAuB;AAC1D,SAAQR,WAAWS,QAAQ,QAAO,sBAAsB;AACxD,SAAQT,WAAWU,MAAM,QAAO,oBAAoB;AACpD,SAAQV,WAAWW,OAAO,QAAO,qBAAqB;AACtD,SAAQX,WAAWY,IAAI,QAAO,kBAAkB;AAChD,SAAQZ,WAAWa,GAAG,QAAO,iBAAiB;AAC9C,SAAQb,WAAWc,IAAI,QAAO,kBAAkB;AAChD,SAAQd,WAAWe,SAAS,QAAO,uBAAuB;AAC1D,SAAQf,WAAWgB,KAAK,QAAO,mBAAmB;AAClD,SAAQhB,WAAWiB,YAAY,QAAO,0BAA0B;AAChE,SAAQjB,WAAWkB,KAAK,QAAO,mBAAmB;AAClD,SAAQlB,WAAWmB,MAAM,QAAO,oBAAoB;AACpD,SAAQnB,WAAWoB,WAAW,QAAO,yBAAyB;AAC9D,SAAQpB,WAAWqB,IAAI,QAAO,kBAAkB;AAChD,SAAQrB,WAAWsB,OAAO,QAAO,qBAAqB;AACtD,SAAQtB,WAAWuB,GAAG,QAAO,eAAe"}
@@ -0,0 +1,159 @@
1
+ /**
2
+ `resolveDrillMorph(viz)` — resolves the one-shot drill-down morph state
3
+ armed by `clickShape`'s forward capture or a Back click's reunion lookup
4
+ (see `events/click.shape.ts`, `viz/vizDefaults.ts`, `viz/Viz.ts`) into the
5
+ `_resolvedEnterFrom`/`_resolvedExitTo` boxes `_drawSceneToTarget` passes to
6
+ `drawScene`, using the *current* draw's `_bodyRect`/`_chartScene` — the
7
+ ones the layout/paint step just produced.
8
+
9
+ Chart-family-agnostic: every emitted rect/circle node already carries
10
+ `.datum`/`.index` (Treemap/Pack hand-built, or Plot's Shape-based), so the
11
+ Back-click reunion lookup needs no per-chart code — beyond unwrapping the
12
+ datum the same way every other interaction handler does (see
13
+ `unwrapDatum` below). Call once per draw, after `_draw()`/post-draw
14
+ features and before `_drawSceneToTarget()` (`runVizPipeline`) — by then
15
+ `_bodyRect`/`_chartScene` reflect the new frame, and both pending fields
16
+ are cleared unconditionally so a later, unrelated repaint (hover, resize,
17
+ legend toggle) never inherits a stale morph.
18
+ */ import { pathBounds } from "@d3plus/math";
19
+ import { areaPath, isFlipEligible } from "@d3plus/render";
20
+ /**
21
+ A flip-eligible node's geometry as a plain bounding box — every type
22
+ `isFlipEligible` (render package) approves: rect, circle, the `AreaNode`
23
+ type, and a `path` node stamped `shapeType: "Area"` (StackedArea/
24
+ AreaPlot's actual band representation). Shared with `click.shape.ts`'s
25
+ forward capture, which needs the identical conversion for the clicked node.
26
+ */ export function nodeRect(node) {
27
+ if (!isFlipEligible(node)) return null;
28
+ if (node.type === "rect") return {
29
+ x: node.x,
30
+ y: node.y,
31
+ width: node.width,
32
+ height: node.height
33
+ };
34
+ if (node.type === "circle") return {
35
+ x: node.cx - node.r,
36
+ y: node.cy - node.r,
37
+ width: node.r * 2,
38
+ height: node.r * 2
39
+ };
40
+ if (node.type === "area") return pathBounds(areaPath(node));
41
+ // Only reached for shapeType === "Area" — isFlipEligible excludes every
42
+ // other path (a plain path, or a Sankey Link) above.
43
+ if (node.type === "path") return pathBounds(node.d);
44
+ return null;
45
+ }
46
+ /**
47
+ Unwraps a node's raw `.datum` to the source row `groupBy` accessors
48
+ expect — mirroring `Viz._interactionDatum`'s exact rule, since that's
49
+ what originally produced `reunion.groupId` (via clickShape's `filterId`).
50
+ Treemap/Pack stamp `.datum` with the plain merged row directly; a Plot
51
+ shape's `.datum` is the wrapped record `{data, i, …internal fields}` —
52
+ unwrapping only on a truthy `.data` avoids misreading a plain row that
53
+ happens to have its own unrelated `data` field.
54
+ */ function unwrapDatum(datum) {
55
+ var raw = datum;
56
+ return raw && raw.data ? raw.data : raw;
57
+ }
58
+ /** The index paired with an unwrapped datum — `_interactionDatum`'s same precedence: the wrapper's own `.i` first, else the node's `.index`. */ function unwrappedIndex(datum, nodeIndex) {
59
+ var raw = datum;
60
+ return raw && typeof raw.i === "number" ? raw.i : nodeIndex !== null && nodeIndex !== void 0 ? nodeIndex : 0;
61
+ }
62
+ /**
63
+ Finds the first rect/circle node satisfying `matches`, searching group
64
+ children recursively — needed because `_chartScene` isn't always a flat
65
+ list: Treemap/Pack emit cells directly at the top level, but the
66
+ paint-driven Plot family nests its bars/points inside a `plot-zoom-content`
67
+ group alongside sibling axis groups.
68
+ */ function findReunionNode(nodes, matches) {
69
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
70
+ try {
71
+ for(var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
72
+ var n = _step.value;
73
+ if (isFlipEligible(n) && matches(n)) return n;
74
+ if (n.type === "group" && n.children.length) {
75
+ var found = findReunionNode(n.children, matches);
76
+ if (found) return found;
77
+ }
78
+ }
79
+ } catch (err) {
80
+ _didIteratorError = true;
81
+ _iteratorError = err;
82
+ } finally{
83
+ try {
84
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
85
+ _iterator.return();
86
+ }
87
+ } finally{
88
+ if (_didIteratorError) {
89
+ throw _iteratorError;
90
+ }
91
+ }
92
+ }
93
+ return undefined;
94
+ }
95
+ export function resolveDrillMorph(viz) {
96
+ var origin = viz._pendingEnterOrigin;
97
+ viz._pendingEnterOrigin = undefined;
98
+ if (origin && viz._bodyRect) {
99
+ var b = viz._bodyRect;
100
+ viz._resolvedEnterFrom = {
101
+ x: b.x + origin.fx * b.width,
102
+ y: b.y + origin.fy * b.height,
103
+ width: origin.fw * b.width,
104
+ height: origin.fh * b.height
105
+ };
106
+ // The entering nodes' own (fresh, just-laid-out) geometry is already
107
+ // expressed within this SAME frame — collapseTo's proportional remap
108
+ // (Treemap cells, Pack circles, Pie wedges) reads each one's position
109
+ // within it, not just the target box itself.
110
+ viz._resolvedEnterFromBody = b;
111
+ // The clicked node itself is now excluded by the new filter, so it's in
112
+ // this draw's exit set — remove it instantly rather than letting it
113
+ // animate its own collapse on top of the children replacing it.
114
+ viz._resolvedInstantExitKey = origin.key;
115
+ } else {
116
+ viz._resolvedEnterFrom = undefined;
117
+ viz._resolvedEnterFromBody = undefined;
118
+ viz._resolvedInstantExitKey = undefined;
119
+ }
120
+ var reunion = viz._pendingExitReunion;
121
+ viz._pendingExitReunion = undefined;
122
+ if (reunion && viz._chartScene) {
123
+ var _nodeRect;
124
+ var _viz_schema_groupBy;
125
+ var accessor = (_viz_schema_groupBy = viz.schema.groupBy) === null || _viz_schema_groupBy === void 0 ? void 0 : _viz_schema_groupBy[reunion.groupDepth];
126
+ var match = accessor ? findReunionNode(viz._chartScene, function(n) {
127
+ var d = unwrapDatum(n.datum);
128
+ return d !== undefined && accessor(d, unwrappedIndex(n.datum, n.index)) === reunion.groupId;
129
+ }) : undefined;
130
+ // Not found (thresholded away, filtered out, etc.) degrades to a plain
131
+ // fade — never throws.
132
+ viz._resolvedExitTo = match ? (_nodeRect = nodeRect(match)) !== null && _nodeRect !== void 0 ? _nodeRect : undefined : undefined;
133
+ // The exiting nodes' own geometry is frozen from the OLD (pre-click)
134
+ // draw, captured at the moment Back was clicked — passed through as-is,
135
+ // no cross-frame math needed (unlike _resolvedEnterFrom's fractions,
136
+ // this was never normalized against a different frame to begin with).
137
+ viz._resolvedExitToBody = reunion.body;
138
+ // A match means the reappearing parent stands in for its whole former
139
+ // child set: it starts at the FULL size those children currently occupy
140
+ // (reunion.body — the old, pre-Back body rect) and animates down to its
141
+ // own real target (reunionEnterKey/reunionEnterFrom), while the vanishing
142
+ // children drop immediately (instantExitAll) instead of a cross-fade —
143
+ // the mirror of the forward click's entering children starting confined
144
+ // within the clicked parent's box (instantExitKey handles that
145
+ // direction's parent). No match (degraded fade above) keeps the plain
146
+ // animated exit too — there's no specific node to swap in for.
147
+ viz._resolvedReunionEnterKey = match === null || match === void 0 ? void 0 : match.key;
148
+ viz._resolvedReunionEnterFrom = match ? reunion.body : undefined;
149
+ viz._resolvedInstantExitAll = Boolean(match);
150
+ } else {
151
+ viz._resolvedExitTo = undefined;
152
+ viz._resolvedExitToBody = undefined;
153
+ viz._resolvedReunionEnterKey = undefined;
154
+ viz._resolvedReunionEnterFrom = undefined;
155
+ viz._resolvedInstantExitAll = undefined;
156
+ }
157
+ }
158
+
159
+ //# sourceMappingURL=drillMorph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/charts/pipeline/drillMorph.ts"],"sourcesContent":["/**\n `resolveDrillMorph(viz)` — resolves the one-shot drill-down morph state\n armed by `clickShape`'s forward capture or a Back click's reunion lookup\n (see `events/click.shape.ts`, `viz/vizDefaults.ts`, `viz/Viz.ts`) into the\n `_resolvedEnterFrom`/`_resolvedExitTo` boxes `_drawSceneToTarget` passes to\n `drawScene`, using the *current* draw's `_bodyRect`/`_chartScene` — the\n ones the layout/paint step just produced.\n\n Chart-family-agnostic: every emitted rect/circle node already carries\n `.datum`/`.index` (Treemap/Pack hand-built, or Plot's Shape-based), so the\n Back-click reunion lookup needs no per-chart code — beyond unwrapping the\n datum the same way every other interaction handler does (see\n `unwrapDatum` below). Call once per draw, after `_draw()`/post-draw\n features and before `_drawSceneToTarget()` (`runVizPipeline`) — by then\n `_bodyRect`/`_chartScene` reflect the new frame, and both pending fields\n are cleared unconditionally so a later, unrelated repaint (hover, resize,\n legend toggle) never inherits a stale morph.\n*/\n\nimport {pathBounds} from \"@d3plus/math\";\nimport {areaPath, isFlipEligible} from \"@d3plus/render\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport type {SceneNode, TransitionRect} from \"@d3plus/render\";\nimport type {VizInstance as Viz} from \"../viz/vizTypes.js\";\n\n/**\n A flip-eligible node's geometry as a plain bounding box — every type\n `isFlipEligible` (render package) approves: rect, circle, the `AreaNode`\n type, and a `path` node stamped `shapeType: \"Area\"` (StackedArea/\n AreaPlot's actual band representation). Shared with `click.shape.ts`'s\n forward capture, which needs the identical conversion for the clicked node.\n*/\nexport function nodeRect(node: SceneNode): TransitionRect | null {\n if (!isFlipEligible(node)) return null;\n if (node.type === \"rect\") return {x: node.x, y: node.y, width: node.width, height: node.height};\n if (node.type === \"circle\")\n return {x: node.cx - node.r, y: node.cy - node.r, width: node.r * 2, height: node.r * 2};\n if (node.type === \"area\") return pathBounds(areaPath(node));\n // Only reached for shapeType === \"Area\" — isFlipEligible excludes every\n // other path (a plain path, or a Sankey Link) above.\n if (node.type === \"path\") return pathBounds(node.d);\n return null;\n}\n\n/**\n Unwraps a node's raw `.datum` to the source row `groupBy` accessors\n expect — mirroring `Viz._interactionDatum`'s exact rule, since that's\n what originally produced `reunion.groupId` (via clickShape's `filterId`).\n Treemap/Pack stamp `.datum` with the plain merged row directly; a Plot\n shape's `.datum` is the wrapped record `{data, i, …internal fields}` —\n unwrapping only on a truthy `.data` avoids misreading a plain row that\n happens to have its own unrelated `data` field.\n*/\nfunction unwrapDatum(datum: unknown): DataPoint | undefined {\n const raw = datum as {data?: DataPoint} | undefined;\n return raw && raw.data ? raw.data : (raw as DataPoint | undefined);\n}\n\n/** The index paired with an unwrapped datum — `_interactionDatum`'s same precedence: the wrapper's own `.i` first, else the node's `.index`. */\nfunction unwrappedIndex(datum: unknown, nodeIndex: number | undefined): number {\n const raw = datum as {i?: number} | undefined;\n return raw && typeof raw.i === \"number\" ? raw.i : (nodeIndex ?? 0);\n}\n\n/**\n Finds the first rect/circle node satisfying `matches`, searching group\n children recursively — needed because `_chartScene` isn't always a flat\n list: Treemap/Pack emit cells directly at the top level, but the\n paint-driven Plot family nests its bars/points inside a `plot-zoom-content`\n group alongside sibling axis groups.\n*/\nfunction findReunionNode(nodes: SceneNode[], matches: (n: SceneNode) => boolean): SceneNode | undefined {\n for (const n of nodes) {\n if (isFlipEligible(n) && matches(n)) return n;\n if (n.type === \"group\" && n.children.length) {\n const found = findReunionNode(n.children, matches);\n if (found) return found;\n }\n }\n return undefined;\n}\n\nexport function resolveDrillMorph(viz: Viz): void {\n const origin = viz._pendingEnterOrigin;\n viz._pendingEnterOrigin = undefined;\n if (origin && viz._bodyRect) {\n const b = viz._bodyRect;\n viz._resolvedEnterFrom = {\n x: b.x + origin.fx * b.width,\n y: b.y + origin.fy * b.height,\n width: origin.fw * b.width,\n height: origin.fh * b.height,\n };\n // The entering nodes' own (fresh, just-laid-out) geometry is already\n // expressed within this SAME frame — collapseTo's proportional remap\n // (Treemap cells, Pack circles, Pie wedges) reads each one's position\n // within it, not just the target box itself.\n viz._resolvedEnterFromBody = b;\n // The clicked node itself is now excluded by the new filter, so it's in\n // this draw's exit set — remove it instantly rather than letting it\n // animate its own collapse on top of the children replacing it.\n viz._resolvedInstantExitKey = origin.key;\n } else {\n viz._resolvedEnterFrom = undefined;\n viz._resolvedEnterFromBody = undefined;\n viz._resolvedInstantExitKey = undefined;\n }\n\n const reunion = viz._pendingExitReunion;\n viz._pendingExitReunion = undefined;\n if (reunion && viz._chartScene) {\n const accessor = viz.schema.groupBy?.[reunion.groupDepth];\n const match = accessor\n ? findReunionNode(viz._chartScene, n => {\n const d = unwrapDatum(n.datum);\n return d !== undefined && accessor(d, unwrappedIndex(n.datum, n.index)) === reunion.groupId;\n })\n : undefined;\n // Not found (thresholded away, filtered out, etc.) degrades to a plain\n // fade — never throws.\n viz._resolvedExitTo = match ? (nodeRect(match) ?? undefined) : undefined;\n // The exiting nodes' own geometry is frozen from the OLD (pre-click)\n // draw, captured at the moment Back was clicked — passed through as-is,\n // no cross-frame math needed (unlike _resolvedEnterFrom's fractions,\n // this was never normalized against a different frame to begin with).\n viz._resolvedExitToBody = reunion.body;\n // A match means the reappearing parent stands in for its whole former\n // child set: it starts at the FULL size those children currently occupy\n // (reunion.body — the old, pre-Back body rect) and animates down to its\n // own real target (reunionEnterKey/reunionEnterFrom), while the vanishing\n // children drop immediately (instantExitAll) instead of a cross-fade —\n // the mirror of the forward click's entering children starting confined\n // within the clicked parent's box (instantExitKey handles that\n // direction's parent). No match (degraded fade above) keeps the plain\n // animated exit too — there's no specific node to swap in for.\n viz._resolvedReunionEnterKey = match?.key;\n viz._resolvedReunionEnterFrom = match ? reunion.body : undefined;\n viz._resolvedInstantExitAll = Boolean(match);\n } else {\n viz._resolvedExitTo = undefined;\n viz._resolvedExitToBody = undefined;\n viz._resolvedReunionEnterKey = undefined;\n viz._resolvedReunionEnterFrom = undefined;\n viz._resolvedInstantExitAll = undefined;\n }\n}\n"],"names":["pathBounds","areaPath","isFlipEligible","nodeRect","node","type","x","y","width","height","cx","r","cy","d","unwrapDatum","datum","raw","data","unwrappedIndex","nodeIndex","i","findReunionNode","nodes","matches","n","children","length","found","undefined","resolveDrillMorph","viz","origin","_pendingEnterOrigin","_bodyRect","b","_resolvedEnterFrom","fx","fy","fw","fh","_resolvedEnterFromBody","_resolvedInstantExitKey","key","reunion","_pendingExitReunion","_chartScene","accessor","schema","groupBy","groupDepth","match","index","groupId","_resolvedExitTo","_resolvedExitToBody","body","_resolvedReunionEnterKey","_resolvedReunionEnterFrom","_resolvedInstantExitAll","Boolean"],"mappings":"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"}
@@ -6,12 +6,40 @@ function _array_like_to_array(arr, len) {
6
6
  function _array_without_holes(arr) {
7
7
  if (Array.isArray(arr)) return _array_like_to_array(arr);
8
8
  }
9
+ function _define_property(obj, key, value) {
10
+ if (key in obj) {
11
+ Object.defineProperty(obj, key, {
12
+ value: value,
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true
16
+ });
17
+ } else {
18
+ obj[key] = value;
19
+ }
20
+ return obj;
21
+ }
9
22
  function _iterable_to_array(iter) {
10
23
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
11
24
  }
12
25
  function _non_iterable_spread() {
13
26
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14
27
  }
28
+ function _object_spread(target) {
29
+ for(var i = 1; i < arguments.length; i++){
30
+ var source = arguments[i] != null ? arguments[i] : {};
31
+ var ownKeys = Object.keys(source);
32
+ if (typeof Object.getOwnPropertySymbols === "function") {
33
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
34
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
35
+ }));
36
+ }
37
+ ownKeys.forEach(function(key) {
38
+ _define_property(target, key, source[key]);
39
+ });
40
+ }
41
+ return target;
42
+ }
15
43
  function _to_consumable_array(arr) {
16
44
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
17
45
  }
@@ -60,7 +88,7 @@ function _unsupported_iterable_to_array(o, minLen) {
60
88
  @param transformFn Optional builder for `_chartTransform`. Default:
61
89
  margin-origin (`{x: margin.left, y: margin.top}`).
62
90
  */ import { runStages } from "./stages.js";
63
- import { marginOriginTransform } from "../features/chartGeometry.js";
91
+ import { chartBounds, marginOriginTransform } from "../features/chartGeometry.js";
64
92
  import { isPaintDriven } from "../definition/ChartDefinition.js";
65
93
  export function runChartDraw(viz, def, stage, transformFn) {
66
94
  // Invariant: this helper OWNS `_chartScene` for the current draw — it
@@ -104,6 +132,12 @@ export function runChartDraw(viz, def, stage, transformFn) {
104
132
  viz._chartScene = _to_consumable_array(stagePushed).concat(_to_consumable_array(emitted));
105
133
  viz._chartTransform = transformFn ? transformFn(viz) : marginOriginTransform(viz);
106
134
  viz._chartClip = def.chartClip ? def.chartClip(viz) : undefined;
135
+ // The box the drill-down morph transition (enterFrom/exitTo) measures its
136
+ // fractions against — see ChartDefinition.chartBodyRect.
137
+ viz._bodyRect = def.chartBodyRect ? def.chartBodyRect(viz) : _object_spread({
138
+ x: 0,
139
+ y: 0
140
+ }, chartBounds(viz));
107
141
  }
108
142
 
109
143
  //# sourceMappingURL=runChartDraw.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/charts/pipeline/runChartDraw.ts"],"sourcesContent":["/**\n `runChartDraw(viz, def, stage, transform?)` — collapses the canonical\n chart-subclass `_draw` body into a single call.\n\n Every Viz-extending chart subclass (Tree, Pie, Pack, Treemap, Matrix,\n RadialMatrix, Priestley, Network, Rings, Geomap, Radar) has the same\n three-line sequence after `super._draw(callback)`:\n\n const {shapeData} = runStages({viz: this}, [layoutStage]);\n this._chartScene = def.emit({viz: this, shapeData});\n this._chartTransform = { ... };\n\n This helper inlines that. The chart's `_draw` becomes:\n\n _draw(callback) {\n super._draw(callback);\n runChartDraw(this, myDef, applyMyLayout);\n return this;\n }\n\n For charts that compute a non-default `_chartTransform` (Pie centers,\n Radar centers, etc.), pass a third arg that returns the transform.\n\n Doesn't reach into chart-specific stash patterns (e.g. Pack writes\n `_packOffsetX`/`_packOffsetY` from its stage; the transform fn can\n read those off `viz` if needed).\n\n @param viz The chart instance (`this` from `_draw`).\n @param def The chart's `ChartDefinition` (e.g. `treeDef`, `pieDef`).\n @param stage The chart-specific layout `TransformStage`.\n @param transformFn Optional builder for `_chartTransform`. Default:\n margin-origin (`{x: margin.left, y: margin.top}`).\n*/\n\nimport {runStages} from \"./stages.js\";\nimport {marginOriginTransform} from \"../features/chartGeometry.js\";\n\nimport type {DataPoint} from \"@d3plus/data\";\nimport type {Transform} from \"@d3plus/render\";\nimport type {ChartDefinition} from \"../definition/ChartDefinition.js\";\nimport {isPaintDriven} from \"../definition/ChartDefinition.js\";\nimport type {TransformStage, VizContext} from \"./stages.js\";\nimport type {VizInstance as Viz} from \"../viz/vizTypes.js\";\n\nexport function runChartDraw(\n viz: Viz,\n def: ChartDefinition,\n stage: TransformStage,\n transformFn?: (viz: Viz) => Transform | undefined,\n): void {\n // Invariant: this helper OWNS `_chartScene` for the current draw — it\n // overwrites with `def.emit(ctx)`. The Plot family takes a different\n // flow: `Plot._paint` populates `_chartScene` directly from `plotPaint`\n // (which builds the scene from its paint context), and paint-driven defs\n // carry no `emit`. Calling `runChartDraw` on a paint-driven chart would\n // clobber that scene. The ChartDefinition.paintDriven discriminant is the\n // structural signal — failing loud so future contributors who try to\n // \"unify\" Plot with runChartDraw can't silently clobber the chart scene.\n if (isPaintDriven(def)) {\n throw new Error(\n `runChartDraw cannot drive ${def.name} — it's a paint-driven chart ` +\n \"(ChartDefinition.paintDriven=true). Paint-driven charts (BarChart, \" +\n \"AreaPlot, LinePlot, BumpChart, StackedArea, BoxWhisker, Plot) rely \" +\n \"on Plot._paint to populate _chartScene imperatively; their _draw \" +\n \"should NOT call runChartDraw.\",\n );\n }\n // Reset _chartScene BEFORE the stage so its body has a known starting\n // point for any decoration nodes it pushes (axes, grids, spokes).\n viz._chartScene = [];\n const ctx = runStages({viz}, [stage]);\n if (!Array.isArray(viz._chartScene)) {\n // A stage reassigned `viz._chartScene` to a non-array (or replaced\n // it with undefined). Without this guard, the silent `[]` fallback\n // would discard the stage's intent — and the comment at the\n // concat below promises \"decorations are preserved\". Fail loud so\n // accidental reassignment surfaces instead of stealth-dropping\n // axis/grid nodes.\n throw new Error(\n `runChartDraw: stage for ${def.name} replaced viz._chartScene with ` +\n `a non-array value (got ${typeof viz._chartScene}). Stages should ` +\n \"use `(v._chartScene ||= []).push(...)` rather than reassigning.\",\n );\n }\n const stagePushed = viz._chartScene.slice();\n // ctx.shapeData is the generic layout bag (`unknown[]`); ChartEmit reads it\n // as DataPoint[] — each chart's layout stage produced rows it understands.\n const emitted = def.emit(ctx as VizContext & {shapeData?: DataPoint[]});\n // Preserve decorations the stage pushed (Matrix/Priestley/Radar/\n // RadialMatrix push axis/grid groups via `(v._chartScene ||= []).push`)\n // by concatenating them with the emit output. Without this, the\n // overwrite at the line below would silently discard every\n // decoration — Matrix renders bare cells with no row/column axes.\n // Stage decorations come FIRST so emit shapes paint on top.\n viz._chartScene = [...stagePushed, ...emitted];\n viz._chartTransform = transformFn\n ? transformFn(viz)\n : marginOriginTransform(viz);\n viz._chartClip = def.chartClip ? def.chartClip(viz) : undefined;\n}\n"],"names":["runStages","marginOriginTransform","isPaintDriven","runChartDraw","viz","def","stage","transformFn","Error","name","_chartScene","ctx","Array","isArray","stagePushed","slice","emitted","emit","_chartTransform","_chartClip","chartClip","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,GAEA,SAAQA,SAAS,QAAO,cAAc;AACtC,SAAQC,qBAAqB,QAAO,+BAA+B;AAKnE,SAAQC,aAAa,QAAO,mCAAmC;AAI/D,OAAO,SAASC,aACdC,GAAQ,EACRC,GAAoB,EACpBC,KAAqB,EACrBC,WAAiD;IAEjD,sEAAsE;IACtE,qEAAqE;IACrE,wEAAwE;IACxE,yEAAyE;IACzE,wEAAwE;IACxE,0EAA0E;IAC1E,qEAAqE;IACrE,yEAAyE;IACzE,IAAIL,cAAcG,MAAM;QACtB,MAAM,IAAIG,MACR,AAAC,6BAAqC,OAATH,IAAII,IAAI,EAAC,mCACtC,wEACA,wEACA,sEACA;IAEJ;IACA,sEAAsE;IACtE,kEAAkE;IAClEL,IAAIM,WAAW,GAAG,EAAE;IACpB,IAAMC,MAAMX,UAAU;QAACI,KAAAA;IAAG,GAAG;QAACE;KAAM;IACpC,IAAI,CAACM,MAAMC,OAAO,CAACT,IAAIM,WAAW,GAAG;QACnC,mEAAmE;QACnE,mEAAmE;QACnE,4DAA4D;QAC5D,kEAAkE;QAClE,+DAA+D;QAC/D,mBAAmB;QACnB,MAAM,IAAIF,MACR,AAAC,2BAAmC,OAATH,IAAII,IAAI,EAAC,qCACpC,AAAC,0BAAgD,OAAvB,SAAOL,IAAIM,WAAW,GAAC,uBACjD;IAEJ;IACA,IAAMI,cAAcV,IAAIM,WAAW,CAACK,KAAK;IACzC,4EAA4E;IAC5E,2EAA2E;IAC3E,IAAMC,UAAUX,IAAIY,IAAI,CAACN;IACzB,iEAAiE;IACjE,wEAAwE;IACxE,gEAAgE;IAChE,2DAA2D;IAC3D,kEAAkE;IAClE,4DAA4D;IAC5DP,IAAIM,WAAW,GAAG,AAAC,qBAAGI,oBAAa,qBAAGE;IACtCZ,IAAIc,eAAe,GAAGX,cAClBA,YAAYH,OACZH,sBAAsBG;IAC1BA,IAAIe,UAAU,GAAGd,IAAIe,SAAS,GAAGf,IAAIe,SAAS,CAAChB,OAAOiB;AACxD"}
1
+ {"version":3,"sources":["../../../../src/charts/pipeline/runChartDraw.ts"],"sourcesContent":["/**\n `runChartDraw(viz, def, stage, transform?)` — collapses the canonical\n chart-subclass `_draw` body into a single call.\n\n Every Viz-extending chart subclass (Tree, Pie, Pack, Treemap, Matrix,\n RadialMatrix, Priestley, Network, Rings, Geomap, Radar) has the same\n three-line sequence after `super._draw(callback)`:\n\n const {shapeData} = runStages({viz: this}, [layoutStage]);\n this._chartScene = def.emit({viz: this, shapeData});\n this._chartTransform = { ... };\n\n This helper inlines that. The chart's `_draw` becomes:\n\n _draw(callback) {\n super._draw(callback);\n runChartDraw(this, myDef, applyMyLayout);\n return this;\n }\n\n For charts that compute a non-default `_chartTransform` (Pie centers,\n Radar centers, etc.), pass a third arg that returns the transform.\n\n Doesn't reach into chart-specific stash patterns (e.g. Pack writes\n `_packOffsetX`/`_packOffsetY` from its stage; the transform fn can\n read those off `viz` if needed).\n\n @param viz The chart instance (`this` from `_draw`).\n @param def The chart's `ChartDefinition` (e.g. `treeDef`, `pieDef`).\n @param stage The chart-specific layout `TransformStage`.\n @param transformFn Optional builder for `_chartTransform`. Default:\n margin-origin (`{x: margin.left, y: margin.top}`).\n*/\n\nimport {runStages} from \"./stages.js\";\nimport {chartBounds, marginOriginTransform} from \"../features/chartGeometry.js\";\n\nimport type {DataPoint} from \"@d3plus/data\";\nimport type {Transform} from \"@d3plus/render\";\nimport type {ChartDefinition} from \"../definition/ChartDefinition.js\";\nimport {isPaintDriven} from \"../definition/ChartDefinition.js\";\nimport type {TransformStage, VizContext} from \"./stages.js\";\nimport type {VizInstance as Viz} from \"../viz/vizTypes.js\";\n\nexport function runChartDraw(\n viz: Viz,\n def: ChartDefinition,\n stage: TransformStage,\n transformFn?: (viz: Viz) => Transform | undefined,\n): void {\n // Invariant: this helper OWNS `_chartScene` for the current draw — it\n // overwrites with `def.emit(ctx)`. The Plot family takes a different\n // flow: `Plot._paint` populates `_chartScene` directly from `plotPaint`\n // (which builds the scene from its paint context), and paint-driven defs\n // carry no `emit`. Calling `runChartDraw` on a paint-driven chart would\n // clobber that scene. The ChartDefinition.paintDriven discriminant is the\n // structural signal — failing loud so future contributors who try to\n // \"unify\" Plot with runChartDraw can't silently clobber the chart scene.\n if (isPaintDriven(def)) {\n throw new Error(\n `runChartDraw cannot drive ${def.name} — it's a paint-driven chart ` +\n \"(ChartDefinition.paintDriven=true). Paint-driven charts (BarChart, \" +\n \"AreaPlot, LinePlot, BumpChart, StackedArea, BoxWhisker, Plot) rely \" +\n \"on Plot._paint to populate _chartScene imperatively; their _draw \" +\n \"should NOT call runChartDraw.\",\n );\n }\n // Reset _chartScene BEFORE the stage so its body has a known starting\n // point for any decoration nodes it pushes (axes, grids, spokes).\n viz._chartScene = [];\n const ctx = runStages({viz}, [stage]);\n if (!Array.isArray(viz._chartScene)) {\n // A stage reassigned `viz._chartScene` to a non-array (or replaced\n // it with undefined). Without this guard, the silent `[]` fallback\n // would discard the stage's intent — and the comment at the\n // concat below promises \"decorations are preserved\". Fail loud so\n // accidental reassignment surfaces instead of stealth-dropping\n // axis/grid nodes.\n throw new Error(\n `runChartDraw: stage for ${def.name} replaced viz._chartScene with ` +\n `a non-array value (got ${typeof viz._chartScene}). Stages should ` +\n \"use `(v._chartScene ||= []).push(...)` rather than reassigning.\",\n );\n }\n const stagePushed = viz._chartScene.slice();\n // ctx.shapeData is the generic layout bag (`unknown[]`); ChartEmit reads it\n // as DataPoint[] — each chart's layout stage produced rows it understands.\n const emitted = def.emit(ctx as VizContext & {shapeData?: DataPoint[]});\n // Preserve decorations the stage pushed (Matrix/Priestley/Radar/\n // RadialMatrix push axis/grid groups via `(v._chartScene ||= []).push`)\n // by concatenating them with the emit output. Without this, the\n // overwrite at the line below would silently discard every\n // decoration — Matrix renders bare cells with no row/column axes.\n // Stage decorations come FIRST so emit shapes paint on top.\n viz._chartScene = [...stagePushed, ...emitted];\n viz._chartTransform = transformFn\n ? transformFn(viz)\n : marginOriginTransform(viz);\n viz._chartClip = def.chartClip ? def.chartClip(viz) : undefined;\n // The box the drill-down morph transition (enterFrom/exitTo) measures its\n // fractions against — see ChartDefinition.chartBodyRect.\n viz._bodyRect = def.chartBodyRect\n ? def.chartBodyRect(viz)\n : {x: 0, y: 0, ...chartBounds(viz)};\n}\n"],"names":["runStages","chartBounds","marginOriginTransform","isPaintDriven","runChartDraw","viz","def","stage","transformFn","Error","name","_chartScene","ctx","Array","isArray","stagePushed","slice","emitted","emit","_chartTransform","_chartClip","chartClip","undefined","_bodyRect","chartBodyRect","x","y"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,GAEA,SAAQA,SAAS,QAAO,cAAc;AACtC,SAAQC,WAAW,EAAEC,qBAAqB,QAAO,+BAA+B;AAKhF,SAAQC,aAAa,QAAO,mCAAmC;AAI/D,OAAO,SAASC,aACdC,GAAQ,EACRC,GAAoB,EACpBC,KAAqB,EACrBC,WAAiD;IAEjD,sEAAsE;IACtE,qEAAqE;IACrE,wEAAwE;IACxE,yEAAyE;IACzE,wEAAwE;IACxE,0EAA0E;IAC1E,qEAAqE;IACrE,yEAAyE;IACzE,IAAIL,cAAcG,MAAM;QACtB,MAAM,IAAIG,MACR,AAAC,6BAAqC,OAATH,IAAII,IAAI,EAAC,mCACtC,wEACA,wEACA,sEACA;IAEJ;IACA,sEAAsE;IACtE,kEAAkE;IAClEL,IAAIM,WAAW,GAAG,EAAE;IACpB,IAAMC,MAAMZ,UAAU;QAACK,KAAAA;IAAG,GAAG;QAACE;KAAM;IACpC,IAAI,CAACM,MAAMC,OAAO,CAACT,IAAIM,WAAW,GAAG;QACnC,mEAAmE;QACnE,mEAAmE;QACnE,4DAA4D;QAC5D,kEAAkE;QAClE,+DAA+D;QAC/D,mBAAmB;QACnB,MAAM,IAAIF,MACR,AAAC,2BAAmC,OAATH,IAAII,IAAI,EAAC,qCACpC,AAAC,0BAAgD,OAAvB,SAAOL,IAAIM,WAAW,GAAC,uBACjD;IAEJ;IACA,IAAMI,cAAcV,IAAIM,WAAW,CAACK,KAAK;IACzC,4EAA4E;IAC5E,2EAA2E;IAC3E,IAAMC,UAAUX,IAAIY,IAAI,CAACN;IACzB,iEAAiE;IACjE,wEAAwE;IACxE,gEAAgE;IAChE,2DAA2D;IAC3D,kEAAkE;IAClE,4DAA4D;IAC5DP,IAAIM,WAAW,GAAG,AAAC,qBAAGI,oBAAa,qBAAGE;IACtCZ,IAAIc,eAAe,GAAGX,cAClBA,YAAYH,OACZH,sBAAsBG;IAC1BA,IAAIe,UAAU,GAAGd,IAAIe,SAAS,GAAGf,IAAIe,SAAS,CAAChB,OAAOiB;IACtD,0EAA0E;IAC1E,yDAAyD;IACzDjB,IAAIkB,SAAS,GAAGjB,IAAIkB,aAAa,GAC7BlB,IAAIkB,aAAa,CAACnB,OAClB;QAACoB,GAAG;QAAGC,GAAG;OAAMzB,YAAYI;AAClC"}