@d3plus/core 3.1.6 → 4.0.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 (579) hide show
  1. package/README.md +9922 -78537
  2. package/es/index.js +8 -0
  3. package/es/index.js.map +1 -1
  4. package/es/internal.js +54 -0
  5. package/es/internal.js.map +1 -0
  6. package/es/src/charts/AreaPlot/index.js +36 -0
  7. package/es/src/charts/AreaPlot/index.js.map +1 -0
  8. package/es/src/charts/BarChart/index.js +48 -0
  9. package/es/src/charts/BarChart/index.js.map +1 -0
  10. package/es/src/charts/BoxWhisker/index.js +52 -0
  11. package/es/src/charts/BoxWhisker/index.js.map +1 -0
  12. package/es/src/charts/BumpChart/index.js +81 -0
  13. package/es/src/charts/BumpChart/index.js.map +1 -0
  14. package/es/src/charts/Donut/index.js +42 -0
  15. package/es/src/charts/Donut/index.js.map +1 -0
  16. package/es/src/charts/Geomap/applyLayout.js +208 -0
  17. package/es/src/charts/Geomap/applyLayout.js.map +1 -0
  18. package/es/src/charts/Geomap/emit.js +169 -0
  19. package/es/src/charts/Geomap/emit.js.map +1 -0
  20. package/es/src/charts/Geomap/index.js +521 -0
  21. package/es/src/charts/Geomap/index.js.map +1 -0
  22. package/es/src/charts/LinePlot/index.js +32 -0
  23. package/es/src/charts/LinePlot/index.js.map +1 -0
  24. package/es/src/charts/Matrix/applyLayout.js +92 -0
  25. package/es/src/charts/Matrix/applyLayout.js.map +1 -0
  26. package/es/src/charts/Matrix/emit.js +44 -0
  27. package/es/src/charts/Matrix/emit.js.map +1 -0
  28. package/es/src/charts/Matrix/index.js +154 -0
  29. package/es/src/charts/Matrix/index.js.map +1 -0
  30. package/es/src/charts/Network/applyLayout.js +322 -0
  31. package/es/src/charts/Network/applyLayout.js.map +1 -0
  32. package/es/src/charts/Network/emit.js +273 -0
  33. package/es/src/charts/Network/emit.js.map +1 -0
  34. package/es/src/charts/Network/index.js +422 -0
  35. package/es/src/charts/Network/index.js.map +1 -0
  36. package/es/src/charts/Pack/applyLayout.js +46 -0
  37. package/es/src/charts/Pack/applyLayout.js.map +1 -0
  38. package/es/src/charts/Pack/emit.js +116 -0
  39. package/es/src/charts/Pack/emit.js.map +1 -0
  40. package/es/src/charts/Pack/index.js +194 -0
  41. package/es/src/charts/Pack/index.js.map +1 -0
  42. package/es/src/charts/Pack/recursionCircles.js +18 -0
  43. package/es/src/charts/Pack/recursionCircles.js.map +1 -0
  44. package/es/src/charts/Pie/applyLayout.js +44 -0
  45. package/es/src/charts/Pie/applyLayout.js.map +1 -0
  46. package/es/src/charts/Pie/emit.js +111 -0
  47. package/es/src/charts/Pie/emit.js.map +1 -0
  48. package/es/src/charts/Pie/index.js +134 -0
  49. package/es/src/charts/Pie/index.js.map +1 -0
  50. package/es/src/charts/Plot/draw.js +424 -0
  51. package/es/src/charts/Plot/draw.js.map +1 -0
  52. package/es/src/charts/Plot/index.js +827 -0
  53. package/es/src/charts/Plot/index.js.map +1 -0
  54. package/es/src/charts/Plot/labelPlacement.js +36 -0
  55. package/es/src/charts/Plot/labelPlacement.js.map +1 -0
  56. package/es/src/charts/Plot/pipeline.js +594 -0
  57. package/es/src/charts/Plot/pipeline.js.map +1 -0
  58. package/es/src/charts/Plot/pipelineDomains.js +254 -0
  59. package/es/src/charts/Plot/pipelineDomains.js.map +1 -0
  60. package/es/src/charts/Plot/pipelineLineLabels.js +210 -0
  61. package/es/src/charts/Plot/pipelineLineLabels.js.map +1 -0
  62. package/es/src/charts/Plot/shapeDefaults.js +189 -0
  63. package/es/src/charts/Plot/shapeDefaults.js.map +1 -0
  64. package/es/src/charts/Plot/stackHelpers.js +52 -0
  65. package/es/src/charts/Plot/stackHelpers.js.map +1 -0
  66. package/es/src/charts/Priestley/applyLayout.js +121 -0
  67. package/es/src/charts/Priestley/applyLayout.js.map +1 -0
  68. package/es/src/charts/Priestley/emit.js +129 -0
  69. package/es/src/charts/Priestley/emit.js.map +1 -0
  70. package/es/src/charts/Priestley/index.js +97 -0
  71. package/es/src/charts/Priestley/index.js.map +1 -0
  72. package/es/src/charts/Radar/applyLayout.js +326 -0
  73. package/es/src/charts/Radar/applyLayout.js.map +1 -0
  74. package/es/src/charts/Radar/emit.js +28 -0
  75. package/es/src/charts/Radar/emit.js.map +1 -0
  76. package/es/src/charts/Radar/index.js +98 -0
  77. package/es/src/charts/Radar/index.js.map +1 -0
  78. package/es/src/charts/RadialMatrix/applyLayout.js +132 -0
  79. package/es/src/charts/RadialMatrix/applyLayout.js.map +1 -0
  80. package/es/src/charts/RadialMatrix/emit.js +33 -0
  81. package/es/src/charts/RadialMatrix/emit.js.map +1 -0
  82. package/es/src/charts/RadialMatrix/index.js +144 -0
  83. package/es/src/charts/RadialMatrix/index.js.map +1 -0
  84. package/es/src/charts/Rings/applyLayout.js +508 -0
  85. package/es/src/charts/Rings/applyLayout.js.map +1 -0
  86. package/es/src/charts/Rings/emit.js +222 -0
  87. package/es/src/charts/Rings/emit.js.map +1 -0
  88. package/es/src/charts/Rings/index.js +245 -0
  89. package/es/src/charts/Rings/index.js.map +1 -0
  90. package/es/src/charts/Sankey/applyLayout.js +107 -0
  91. package/es/src/charts/Sankey/applyLayout.js.map +1 -0
  92. package/es/src/charts/Sankey/emit.js +134 -0
  93. package/es/src/charts/Sankey/emit.js.map +1 -0
  94. package/es/src/charts/Sankey/index.js +219 -0
  95. package/es/src/charts/Sankey/index.js.map +1 -0
  96. package/es/src/charts/StackedArea/index.js +27 -0
  97. package/es/src/charts/StackedArea/index.js.map +1 -0
  98. package/es/src/charts/Tree/applyLayout.js +233 -0
  99. package/es/src/charts/Tree/applyLayout.js.map +1 -0
  100. package/es/src/charts/Tree/emit.js +257 -0
  101. package/es/src/charts/Tree/emit.js.map +1 -0
  102. package/es/src/charts/Tree/index.js +105 -0
  103. package/es/src/charts/Tree/index.js.map +1 -0
  104. package/es/src/charts/Treemap/applyLayout.js +85 -0
  105. package/es/src/charts/Treemap/applyLayout.js.map +1 -0
  106. package/es/src/charts/Treemap/emit.js +141 -0
  107. package/es/src/charts/Treemap/emit.js.map +1 -0
  108. package/es/src/charts/Treemap/index.js +177 -0
  109. package/es/src/charts/Treemap/index.js.map +1 -0
  110. package/es/src/charts/Treemap/thresholdFunction.js +112 -0
  111. package/es/src/charts/Treemap/thresholdFunction.js.map +1 -0
  112. package/es/src/charts/definition/ChartDefinition.js +12 -0
  113. package/es/src/charts/definition/ChartDefinition.js.map +1 -0
  114. package/es/src/charts/definition/applyDefinition.js +107 -0
  115. package/es/src/charts/definition/applyDefinition.js.map +1 -0
  116. package/es/src/charts/definition/makeChart.js +153 -0
  117. package/es/src/charts/definition/makeChart.js.map +1 -0
  118. package/es/src/charts/drawSteps/zoomControls.js +231 -96
  119. package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
  120. package/es/src/charts/events/click.legend.js +2 -2
  121. package/es/src/charts/events/click.legend.js.map +1 -1
  122. package/es/src/charts/events/click.shape.js +5 -5
  123. package/es/src/charts/events/click.shape.js.map +1 -1
  124. package/es/src/charts/events/mouseenter.js +20 -1
  125. package/es/src/charts/events/mouseenter.js.map +1 -1
  126. package/es/src/charts/events/mouseleave.js +19 -4
  127. package/es/src/charts/events/mouseleave.js.map +1 -1
  128. package/es/src/charts/events/mousemove.legend.js +10 -10
  129. package/es/src/charts/events/mousemove.legend.js.map +1 -1
  130. package/es/src/charts/events/mousemove.shape.js +14 -8
  131. package/es/src/charts/events/mousemove.shape.js.map +1 -1
  132. package/es/src/charts/events/touchstart.body.js.map +1 -1
  133. package/es/src/charts/features/axes.js +432 -0
  134. package/es/src/charts/features/axes.js.map +1 -0
  135. package/es/src/charts/features/chartGeometry.js +66 -0
  136. package/es/src/charts/features/chartGeometry.js.map +1 -0
  137. package/es/src/charts/features/colorScaleBucket.js +92 -0
  138. package/es/src/charts/features/colorScaleBucket.js.map +1 -0
  139. package/es/src/charts/features/emitHelpers.js +217 -0
  140. package/es/src/charts/features/emitHelpers.js.map +1 -0
  141. package/es/src/charts/features/ensureZoomDom.js +71 -0
  142. package/es/src/charts/features/ensureZoomDom.js.map +1 -0
  143. package/es/src/charts/features/features.js +650 -0
  144. package/es/src/charts/features/features.js.map +1 -0
  145. package/es/src/charts/features/featuresLegend.js +180 -0
  146. package/es/src/charts/features/featuresLegend.js.map +1 -0
  147. package/es/src/charts/features/legendLabel.js +12 -0
  148. package/es/src/charts/features/legendLabel.js.map +1 -0
  149. package/es/src/charts/features/lineLabels.js +154 -0
  150. package/es/src/charts/features/lineLabels.js.map +1 -0
  151. package/es/src/charts/features/plotPaint.js +512 -0
  152. package/es/src/charts/features/plotPaint.js.map +1 -0
  153. package/es/src/charts/features/shapeEmit.js +273 -0
  154. package/es/src/charts/features/shapeEmit.js.map +1 -0
  155. package/es/src/charts/helpers/matrixData.js +3 -3
  156. package/es/src/charts/helpers/matrixData.js.map +1 -1
  157. package/es/src/charts/index.js +21 -21
  158. package/es/src/charts/index.js.map +1 -1
  159. package/es/src/charts/pipeline/resolveSpec.js +44 -0
  160. package/es/src/charts/pipeline/resolveSpec.js.map +1 -0
  161. package/es/src/charts/pipeline/runChartDraw.js +109 -0
  162. package/es/src/charts/pipeline/runChartDraw.js.map +1 -0
  163. package/es/src/charts/pipeline/runVizPipeline.js +84 -0
  164. package/es/src/charts/pipeline/runVizPipeline.js.map +1 -0
  165. package/es/src/charts/pipeline/stages.js +103 -0
  166. package/es/src/charts/pipeline/stages.js.map +1 -0
  167. package/es/src/charts/pipeline/vizContext.js +29 -0
  168. package/es/src/charts/pipeline/vizContext.js.map +1 -0
  169. package/es/src/charts/pipeline/vizDraw.js +37 -0
  170. package/es/src/charts/pipeline/vizDraw.js.map +1 -0
  171. package/es/src/charts/pipeline/vizDrawPure.js +174 -0
  172. package/es/src/charts/pipeline/vizDrawPure.js.map +1 -0
  173. package/es/src/charts/pipeline/vizPreDraw.js +145 -0
  174. package/es/src/charts/pipeline/vizPreDraw.js.map +1 -0
  175. package/es/src/charts/pipeline/vizPreDrawPure.js +279 -0
  176. package/es/src/charts/pipeline/vizPreDrawPure.js.map +1 -0
  177. package/es/src/charts/plotBuffers/Bar.js +4 -4
  178. package/es/src/charts/plotBuffers/Bar.js.map +1 -1
  179. package/es/src/charts/plotBuffers/Box.js +4 -4
  180. package/es/src/charts/plotBuffers/Box.js.map +1 -1
  181. package/es/src/charts/plotBuffers/Circle.js +2 -2
  182. package/es/src/charts/plotBuffers/Circle.js.map +1 -1
  183. package/es/src/charts/plotBuffers/Line.js +5 -5
  184. package/es/src/charts/plotBuffers/Line.js.map +1 -1
  185. package/es/src/charts/plotBuffers/Rect.js +2 -2
  186. package/es/src/charts/plotBuffers/Rect.js.map +1 -1
  187. package/es/src/charts/plotBuffers/discreteBuffer.js +1 -2
  188. package/es/src/charts/plotBuffers/discreteBuffer.js.map +1 -1
  189. package/es/src/charts/plotBuffers/numericBuffer.js +1 -2
  190. package/es/src/charts/plotBuffers/numericBuffer.js.map +1 -1
  191. package/es/src/charts/viz/Viz.js +985 -0
  192. package/es/src/charts/viz/Viz.js.map +1 -0
  193. package/es/src/charts/viz/VizBase.js +447 -0
  194. package/es/src/charts/viz/VizBase.js.map +1 -0
  195. package/es/src/charts/viz/VizBaseConfig.js +504 -0
  196. package/es/src/charts/viz/VizBaseConfig.js.map +1 -0
  197. package/es/src/charts/viz/interactionOpacity.js +247 -0
  198. package/es/src/charts/viz/interactionOpacity.js.map +1 -0
  199. package/es/src/charts/viz/ordinalColor.js +71 -0
  200. package/es/src/charts/viz/ordinalColor.js.map +1 -0
  201. package/es/src/charts/viz/trailCatchup.js +127 -0
  202. package/es/src/charts/viz/trailCatchup.js.map +1 -0
  203. package/es/src/charts/viz/vizDefaults.js +602 -0
  204. package/es/src/charts/viz/vizDefaults.js.map +1 -0
  205. package/es/src/charts/viz/vizRender.js +251 -0
  206. package/es/src/charts/viz/vizRender.js.map +1 -0
  207. package/es/src/charts/viz/vizTypes.js +28 -0
  208. package/es/src/charts/viz/vizTypes.js.map +1 -0
  209. package/es/src/components/Axis/Axis.js +691 -0
  210. package/es/src/components/Axis/Axis.js.map +1 -0
  211. package/es/src/components/Axis/AxisBottom.js.map +1 -0
  212. package/es/src/components/Axis/AxisLeft.js.map +1 -0
  213. package/es/src/components/Axis/AxisRight.js.map +1 -0
  214. package/es/src/components/Axis/AxisTop.js.map +1 -0
  215. package/es/src/components/Axis/axisLayout.js +208 -0
  216. package/es/src/components/Axis/axisLayout.js.map +1 -0
  217. package/es/src/components/Axis/axisLayoutLabels.js +177 -0
  218. package/es/src/components/Axis/axisLayoutLabels.js.map +1 -0
  219. package/es/src/components/Axis/axisLayoutScale.js +374 -0
  220. package/es/src/components/Axis/axisLayoutScale.js.map +1 -0
  221. package/es/src/components/Axis/axisRender.js +535 -0
  222. package/es/src/components/Axis/axisRender.js.map +1 -0
  223. package/es/src/components/ColorScale/ColorScale.js +506 -0
  224. package/es/src/components/ColorScale/ColorScale.js.map +1 -0
  225. package/es/src/components/ColorScale/colorScaleRender.js +277 -0
  226. package/es/src/components/ColorScale/colorScaleRender.js.map +1 -0
  227. package/es/src/components/ColorScale/colorScaleScale.js +274 -0
  228. package/es/src/components/ColorScale/colorScaleScale.js.map +1 -0
  229. package/es/src/components/Legend/Legend.js +445 -0
  230. package/es/src/components/Legend/Legend.js.map +1 -0
  231. package/es/src/components/Legend/legendConfig.js +87 -0
  232. package/es/src/components/Legend/legendConfig.js.map +1 -0
  233. package/es/src/components/Legend/legendRender.js +245 -0
  234. package/es/src/components/Legend/legendRender.js.map +1 -0
  235. package/es/src/components/Message.js.map +1 -1
  236. package/es/src/components/TextBox.js +639 -453
  237. package/es/src/components/TextBox.js.map +1 -1
  238. package/es/src/components/Timeline/Timeline.js +674 -0
  239. package/es/src/components/Timeline/Timeline.js.map +1 -0
  240. package/es/src/components/Timeline/timelineConfig.js +115 -0
  241. package/es/src/components/Timeline/timelineConfig.js.map +1 -0
  242. package/es/src/components/Timeline/timelineRender.js +267 -0
  243. package/es/src/components/Timeline/timelineRender.js.map +1 -0
  244. package/es/src/components/Tooltip.js +288 -249
  245. package/es/src/components/Tooltip.js.map +1 -1
  246. package/es/src/components/index.js +8 -8
  247. package/es/src/components/index.js.map +1 -1
  248. package/es/src/fluent.js +265 -0
  249. package/es/src/fluent.js.map +1 -0
  250. package/es/src/shapes/Area.js +96 -114
  251. package/es/src/shapes/Area.js.map +1 -1
  252. package/es/src/shapes/Bar.js +71 -86
  253. package/es/src/shapes/Bar.js.map +1 -1
  254. package/es/src/shapes/Box.js +295 -190
  255. package/es/src/shapes/Box.js.map +1 -1
  256. package/es/src/shapes/Circle.js +72 -31
  257. package/es/src/shapes/Circle.js.map +1 -1
  258. package/es/src/shapes/Image.js +164 -85
  259. package/es/src/shapes/Image.js.map +1 -1
  260. package/es/src/shapes/Line.js +51 -94
  261. package/es/src/shapes/Line.js.map +1 -1
  262. package/es/src/shapes/Path.js +33 -41
  263. package/es/src/shapes/Path.js.map +1 -1
  264. package/es/src/shapes/Rect.js +86 -37
  265. package/es/src/shapes/Rect.js.map +1 -1
  266. package/es/src/shapes/Shape.js +655 -678
  267. package/es/src/shapes/Shape.js.map +1 -1
  268. package/es/src/shapes/Whisker.js +156 -61
  269. package/es/src/shapes/Whisker.js.map +1 -1
  270. package/es/src/shapes/buildLabelData.js +70 -0
  271. package/es/src/shapes/buildLabelData.js.map +1 -0
  272. package/es/src/shapes/emitLabels.js +84 -0
  273. package/es/src/shapes/emitLabels.js.map +1 -0
  274. package/es/src/shapes/hitAreaNode.js +37 -0
  275. package/es/src/shapes/hitAreaNode.js.map +1 -0
  276. package/es/src/shapes/sceneSort.js +57 -0
  277. package/es/src/shapes/sceneSort.js.map +1 -0
  278. package/es/src/shapes/shapeConfig.js +31 -0
  279. package/es/src/shapes/shapeConfig.js.map +1 -0
  280. package/es/src/utils/BaseClass.js +35 -19
  281. package/es/src/utils/BaseClass.js.map +1 -1
  282. package/es/src/utils/D3Scale.js +16 -0
  283. package/es/src/utils/D3Scale.js.map +1 -0
  284. package/es/src/utils/D3plusConfig.js.map +1 -1
  285. package/es/src/utils/configPrep.js +8 -3
  286. package/es/src/utils/configPrep.js.map +1 -1
  287. package/es/src/utils/getProp.js +1 -1
  288. package/es/src/utils/getProp.js.map +1 -1
  289. package/es/src/utils/index.js +1 -0
  290. package/es/src/utils/index.js.map +1 -1
  291. package/es/src/utils/paintComponentScene.js +59 -0
  292. package/es/src/utils/paintComponentScene.js.map +1 -0
  293. package/es/umd-entry.js +16 -0
  294. package/es/umd-entry.js.map +1 -0
  295. package/package.json +14 -9
  296. package/types/index.d.ts +3 -1
  297. package/types/internal.d.ts +54 -0
  298. package/types/src/charts/AreaPlot/index.d.ts +10 -0
  299. package/types/src/charts/BarChart/index.d.ts +10 -0
  300. package/types/src/charts/BoxWhisker/index.d.ts +11 -0
  301. package/types/src/charts/BumpChart/index.d.ts +11 -0
  302. package/types/src/charts/ChartDefinition.d.ts +75 -0
  303. package/types/src/charts/Donut/index.d.ts +13 -0
  304. package/types/src/charts/Geomap/applyLayout.d.ts +7 -0
  305. package/types/src/charts/Geomap/emit.d.ts +7 -0
  306. package/types/src/charts/Geomap/index.d.ts +14 -0
  307. package/types/src/charts/Geomap.d.ts +6 -0
  308. package/types/src/charts/LinePlot/index.d.ts +10 -0
  309. package/types/src/charts/Matrix/applyLayout.d.ts +9 -0
  310. package/types/src/charts/Matrix/emit.d.ts +6 -0
  311. package/types/src/charts/Matrix/index.d.ts +14 -0
  312. package/types/src/charts/Matrix.d.ts +0 -26
  313. package/types/src/charts/Network/applyLayout.d.ts +10 -0
  314. package/types/src/charts/Network/emit.d.ts +6 -0
  315. package/types/src/charts/Network/index.d.ts +7 -0
  316. package/types/src/charts/Network.d.ts +0 -24
  317. package/types/src/charts/Pack/applyLayout.d.ts +16 -0
  318. package/types/src/charts/Pack/emit.d.ts +6 -0
  319. package/types/src/charts/Pack/index.d.ts +15 -0
  320. package/types/src/charts/Pack/recursionCircles.d.ts +7 -0
  321. package/types/src/charts/Pack.d.ts +0 -13
  322. package/types/src/charts/Pie/applyLayout.d.ts +8 -0
  323. package/types/src/charts/Pie/emit.d.ts +5 -0
  324. package/types/src/charts/Pie/index.d.ts +14 -0
  325. package/types/src/charts/Pie.d.ts +0 -27
  326. package/types/src/charts/Plot/draw.d.ts +2 -0
  327. package/types/src/charts/Plot/index.d.ts +167 -0
  328. package/types/src/charts/Plot/labelPlacement.d.ts +15 -0
  329. package/types/src/charts/Plot/pipeline.d.ts +70 -0
  330. package/types/src/charts/Plot/pipelineDomains.d.ts +2 -0
  331. package/types/src/charts/Plot/pipelineLineLabels.d.ts +2 -0
  332. package/types/src/charts/Plot/shapeDefaults.d.ts +64 -0
  333. package/types/src/charts/Plot/stackHelpers.d.ts +24 -0
  334. package/types/src/charts/Plot.d.ts +23 -72
  335. package/types/src/charts/Priestley/applyLayout.d.ts +21 -0
  336. package/types/src/charts/Priestley/emit.d.ts +6 -0
  337. package/types/src/charts/Priestley/index.d.ts +14 -0
  338. package/types/src/charts/Radar/applyLayout.d.ts +10 -0
  339. package/types/src/charts/Radar/emit.d.ts +7 -0
  340. package/types/src/charts/Radar/index.d.ts +14 -0
  341. package/types/src/charts/RadialMatrix/applyLayout.d.ts +11 -0
  342. package/types/src/charts/RadialMatrix/emit.d.ts +6 -0
  343. package/types/src/charts/RadialMatrix/index.d.ts +14 -0
  344. package/types/src/charts/RadialMatrix.d.ts +0 -15
  345. package/types/src/charts/Rings/applyLayout.d.ts +2 -0
  346. package/types/src/charts/Rings/emit.d.ts +7 -0
  347. package/types/src/charts/Rings/index.d.ts +15 -0
  348. package/types/src/charts/Rings.d.ts +0 -13
  349. package/types/src/charts/Sankey/applyLayout.d.ts +7 -0
  350. package/types/src/charts/Sankey/emit.d.ts +6 -0
  351. package/types/src/charts/Sankey/index.d.ts +7 -0
  352. package/types/src/charts/Sankey.d.ts +0 -4
  353. package/types/src/charts/StackedArea/index.d.ts +10 -0
  354. package/types/src/charts/Tree/applyLayout.d.ts +2 -0
  355. package/types/src/charts/Tree/emit.d.ts +7 -0
  356. package/types/src/charts/Tree/index.d.ts +14 -0
  357. package/types/src/charts/Tree.d.ts +0 -16
  358. package/types/src/charts/Treemap/applyLayout.d.ts +16 -0
  359. package/types/src/charts/Treemap/emit.d.ts +6 -0
  360. package/types/src/charts/Treemap/index.d.ts +18 -0
  361. package/types/src/charts/Treemap/thresholdFunction.d.ts +25 -0
  362. package/types/src/charts/Treemap.d.ts +4 -13
  363. package/types/src/charts/Viz.d.ts +49 -361
  364. package/types/src/charts/VizBase.d.ts +158 -0
  365. package/types/src/charts/VizBaseConfig.d.ts +148 -0
  366. package/types/src/charts/applyDefinition.d.ts +13 -0
  367. package/types/src/charts/axes.d.ts +134 -0
  368. package/types/src/charts/chartGeometry.d.ts +58 -0
  369. package/types/src/charts/definition/ChartDefinition.d.ts +84 -0
  370. package/types/src/charts/definition/applyDefinition.d.ts +13 -0
  371. package/types/src/charts/definition/makeChart.d.ts +22 -0
  372. package/types/src/charts/drawSteps/zoomControls.d.ts +25 -5
  373. package/types/src/charts/emitHelpers.d.ts +122 -0
  374. package/types/src/charts/ensureZoomDom.d.ts +39 -0
  375. package/types/src/charts/events/click.legend.d.ts +1 -1
  376. package/types/src/charts/events/click.shape.d.ts +1 -1
  377. package/types/src/charts/events/mouseenter.d.ts +1 -1
  378. package/types/src/charts/events/mouseleave.d.ts +1 -1
  379. package/types/src/charts/events/mousemove.legend.d.ts +1 -1
  380. package/types/src/charts/events/mousemove.shape.d.ts +1 -1
  381. package/types/src/charts/events/touchstart.body.d.ts +1 -1
  382. package/types/src/charts/factories.d.ts +73 -0
  383. package/types/src/charts/features/axes.d.ts +134 -0
  384. package/types/src/charts/features/chartGeometry.d.ts +58 -0
  385. package/types/src/charts/features/colorScaleBucket.d.ts +43 -0
  386. package/types/src/charts/features/colorScaleBucketShare.d.ts +16 -0
  387. package/types/src/charts/features/emitHelpers.d.ts +123 -0
  388. package/types/src/charts/features/ensureZoomDom.d.ts +39 -0
  389. package/types/src/charts/features/features.d.ts +152 -0
  390. package/types/src/charts/features/featuresLegend.d.ts +12 -0
  391. package/types/src/charts/features/legendLabel.d.ts +11 -0
  392. package/types/src/charts/features/lineLabels.d.ts +40 -0
  393. package/types/src/charts/features/plotPaint.d.ts +233 -0
  394. package/types/src/charts/features/shapeEmit.d.ts +61 -0
  395. package/types/src/charts/features.d.ts +152 -0
  396. package/types/src/charts/featuresLegend.d.ts +12 -0
  397. package/types/src/charts/helpers/matrixData.d.ts +1 -1
  398. package/types/src/charts/index.d.ts +21 -21
  399. package/types/src/charts/legendLabel.d.ts +11 -0
  400. package/types/src/charts/lineLabels.d.ts +40 -0
  401. package/types/src/charts/makeChart.d.ts +22 -0
  402. package/types/src/charts/pipeline/resolveSpec.d.ts +51 -0
  403. package/types/src/charts/pipeline/runChartDraw.d.ts +38 -0
  404. package/types/src/charts/pipeline/runVizPipeline.d.ts +31 -0
  405. package/types/src/charts/pipeline/stages.d.ts +160 -0
  406. package/types/src/charts/pipeline/vizContext.d.ts +45 -0
  407. package/types/src/charts/pipeline/vizDraw.d.ts +25 -0
  408. package/types/src/charts/pipeline/vizDrawPure.d.ts +46 -0
  409. package/types/src/charts/pipeline/vizPreDraw.d.ts +22 -0
  410. package/types/src/charts/pipeline/vizPreDrawPure.d.ts +68 -0
  411. package/types/src/charts/plotBuffers/Bar.d.ts +6 -5
  412. package/types/src/charts/plotBuffers/Box.d.ts +6 -5
  413. package/types/src/charts/plotBuffers/Circle.d.ts +6 -5
  414. package/types/src/charts/plotBuffers/Line.d.ts +6 -5
  415. package/types/src/charts/plotBuffers/Rect.d.ts +6 -5
  416. package/types/src/charts/plotBuffers/discreteBuffer.d.ts +2 -1
  417. package/types/src/charts/plotBuffers/numericBuffer.d.ts +2 -1
  418. package/types/src/charts/plotPaint.d.ts +233 -0
  419. package/types/src/charts/resolveSpec.d.ts +50 -0
  420. package/types/src/charts/runChartDraw.d.ts +38 -0
  421. package/types/src/charts/runVizPipeline.d.ts +31 -0
  422. package/types/src/charts/shapeEmit.d.ts +61 -0
  423. package/types/src/charts/stages.d.ts +117 -0
  424. package/types/src/charts/viz/Viz.d.ts +111 -0
  425. package/types/src/charts/viz/VizBase.d.ts +160 -0
  426. package/types/src/charts/viz/VizBaseConfig.d.ts +156 -0
  427. package/types/src/charts/viz/interactionOpacity.d.ts +23 -0
  428. package/types/src/charts/viz/ordinalColor.d.ts +14 -0
  429. package/types/src/charts/viz/trailCatchup.d.ts +14 -0
  430. package/types/src/charts/viz/vizDefaults.d.ts +8 -0
  431. package/types/src/charts/viz/vizRender.d.ts +8 -0
  432. package/types/src/charts/viz/vizTypes.d.ts +250 -0
  433. package/types/src/charts/vizContext.d.ts +46 -0
  434. package/types/src/charts/vizDefaults.d.ts +8 -0
  435. package/types/src/charts/vizDraw.d.ts +25 -0
  436. package/types/src/charts/vizDrawPure.d.ts +17 -0
  437. package/types/src/charts/vizPreDraw.d.ts +22 -0
  438. package/types/src/charts/vizPreDrawPure.d.ts +40 -0
  439. package/types/src/charts/vizRender.d.ts +8 -0
  440. package/types/src/charts/vizTypes.d.ts +202 -0
  441. package/types/src/components/Axis/Axis.d.ts +182 -0
  442. package/types/src/components/Axis/AxisBottom.d.ts +11 -0
  443. package/types/src/components/Axis/AxisLeft.d.ts +11 -0
  444. package/types/src/components/Axis/AxisRight.d.ts +11 -0
  445. package/types/src/components/Axis/AxisTop.d.ts +11 -0
  446. package/types/src/components/Axis/axisLayout.d.ts +29 -0
  447. package/types/src/components/Axis/axisLayoutLabels.d.ts +70 -0
  448. package/types/src/components/Axis/axisLayoutScale.d.ts +14 -0
  449. package/types/src/components/Axis/axisRender.d.ts +68 -0
  450. package/types/src/components/Axis.d.ts +68 -194
  451. package/types/src/components/ColorScale/ColorScale.d.ts +100 -0
  452. package/types/src/components/ColorScale/colorScaleRender.d.ts +15 -0
  453. package/types/src/components/ColorScale/colorScaleScale.d.ts +19 -0
  454. package/types/src/components/ColorScale.d.ts +1 -129
  455. package/types/src/components/Legend/Legend.d.ts +95 -0
  456. package/types/src/components/Legend/legendConfig.d.ts +7 -0
  457. package/types/src/components/Legend/legendRender.d.ts +16 -0
  458. package/types/src/components/Legend.d.ts +9 -73
  459. package/types/src/components/TextBox.d.ts +25 -218
  460. package/types/src/components/Timeline/Timeline.d.ts +118 -0
  461. package/types/src/components/Timeline/timelineConfig.d.ts +6 -0
  462. package/types/src/components/Timeline/timelineRender.d.ts +24 -0
  463. package/types/src/components/Timeline.d.ts +7 -81
  464. package/types/src/components/Tooltip.d.ts +20 -200
  465. package/types/src/components/axisLayout.d.ts +27 -0
  466. package/types/src/components/axisLayoutLabels.d.ts +42 -0
  467. package/types/src/components/axisLayoutScale.d.ts +12 -0
  468. package/types/src/components/axisRender.d.ts +65 -0
  469. package/types/src/components/colorScaleRender.d.ts +15 -0
  470. package/types/src/components/colorScaleScale.d.ts +19 -0
  471. package/types/src/components/index.d.ts +8 -8
  472. package/types/src/components/legendConfig.d.ts +7 -0
  473. package/types/src/components/legendRender.d.ts +16 -0
  474. package/types/src/components/timelineConfig.d.ts +6 -0
  475. package/types/src/components/timelineRender.d.ts +14 -0
  476. package/types/src/fluent.d.ts +94 -0
  477. package/types/src/shapes/Area.d.ts +15 -27
  478. package/types/src/shapes/Bar.d.ts +13 -33
  479. package/types/src/shapes/Box.d.ts +17 -56
  480. package/types/src/shapes/Circle.d.ts +11 -17
  481. package/types/src/shapes/Image.d.ts +18 -84
  482. package/types/src/shapes/Line.d.ts +12 -22
  483. package/types/src/shapes/Path.d.ts +12 -19
  484. package/types/src/shapes/Rect.d.ts +11 -27
  485. package/types/src/shapes/Shape.d.ts +46 -257
  486. package/types/src/shapes/Whisker.d.ts +15 -42
  487. package/types/src/shapes/buildLabelData.d.ts +50 -0
  488. package/types/src/shapes/emitLabels.d.ts +16 -0
  489. package/types/src/shapes/hitAreaNode.d.ts +19 -0
  490. package/types/src/shapes/sceneSort.d.ts +20 -0
  491. package/types/src/shapes/shapeConfig.d.ts +226 -0
  492. package/types/src/utils/BaseClass.d.ts +13 -7
  493. package/types/src/utils/D3Scale.d.ts +48 -0
  494. package/types/src/utils/D3plusConfig.d.ts +230 -3
  495. package/types/src/utils/configPrep.d.ts +7 -4
  496. package/types/src/utils/getProp.d.ts +3 -1
  497. package/types/src/utils/index.d.ts +3 -1
  498. package/types/src/utils/paintComponentScene.d.ts +28 -0
  499. package/types/umd-entry.d.ts +15 -0
  500. package/umd/d3plus-core.full.js +31148 -19484
  501. package/umd/d3plus-core.full.js.map +1 -1
  502. package/umd/d3plus-core.full.min.js +5309 -2944
  503. package/umd/d3plus-core.js +17379 -10578
  504. package/umd/d3plus-core.js.map +1 -1
  505. package/umd/d3plus-core.min.js +3470 -1876
  506. package/es/src/charts/AreaPlot.js +0 -85
  507. package/es/src/charts/AreaPlot.js.map +0 -1
  508. package/es/src/charts/BarChart.js +0 -92
  509. package/es/src/charts/BarChart.js.map +0 -1
  510. package/es/src/charts/BoxWhisker.js +0 -92
  511. package/es/src/charts/BoxWhisker.js.map +0 -1
  512. package/es/src/charts/BumpChart.js +0 -147
  513. package/es/src/charts/BumpChart.js.map +0 -1
  514. package/es/src/charts/Donut.js +0 -84
  515. package/es/src/charts/Donut.js.map +0 -1
  516. package/es/src/charts/Geomap.js +0 -766
  517. package/es/src/charts/Geomap.js.map +0 -1
  518. package/es/src/charts/LinePlot.js +0 -83
  519. package/es/src/charts/LinePlot.js.map +0 -1
  520. package/es/src/charts/Matrix.js +0 -341
  521. package/es/src/charts/Matrix.js.map +0 -1
  522. package/es/src/charts/Network.js +0 -796
  523. package/es/src/charts/Network.js.map +0 -1
  524. package/es/src/charts/Pack.js +0 -308
  525. package/es/src/charts/Pack.js.map +0 -1
  526. package/es/src/charts/Pie.js +0 -232
  527. package/es/src/charts/Pie.js.map +0 -1
  528. package/es/src/charts/Plot.js +0 -2114
  529. package/es/src/charts/Plot.js.map +0 -1
  530. package/es/src/charts/Priestley.js +0 -296
  531. package/es/src/charts/Priestley.js.map +0 -1
  532. package/es/src/charts/Radar.js +0 -420
  533. package/es/src/charts/Radar.js.map +0 -1
  534. package/es/src/charts/RadialMatrix.js +0 -383
  535. package/es/src/charts/RadialMatrix.js.map +0 -1
  536. package/es/src/charts/Rings.js +0 -788
  537. package/es/src/charts/Rings.js.map +0 -1
  538. package/es/src/charts/Sankey.js +0 -461
  539. package/es/src/charts/Sankey.js.map +0 -1
  540. package/es/src/charts/StackedArea.js +0 -80
  541. package/es/src/charts/StackedArea.js.map +0 -1
  542. package/es/src/charts/Tree.js +0 -347
  543. package/es/src/charts/Tree.js.map +0 -1
  544. package/es/src/charts/Treemap.js +0 -454
  545. package/es/src/charts/Treemap.js.map +0 -1
  546. package/es/src/charts/Viz.js +0 -1832
  547. package/es/src/charts/Viz.js.map +0 -1
  548. package/es/src/charts/drawSteps/drawAttribution.js +0 -16
  549. package/es/src/charts/drawSteps/drawAttribution.js.map +0 -1
  550. package/es/src/charts/drawSteps/drawBack.js +0 -24
  551. package/es/src/charts/drawSteps/drawBack.js.map +0 -1
  552. package/es/src/charts/drawSteps/drawColorScale.js +0 -75
  553. package/es/src/charts/drawSteps/drawColorScale.js.map +0 -1
  554. package/es/src/charts/drawSteps/drawLegend.js +0 -122
  555. package/es/src/charts/drawSteps/drawLegend.js.map +0 -1
  556. package/es/src/charts/drawSteps/drawSubtitle.js +0 -31
  557. package/es/src/charts/drawSteps/drawSubtitle.js.map +0 -1
  558. package/es/src/charts/drawSteps/drawTimeline.js +0 -85
  559. package/es/src/charts/drawSteps/drawTimeline.js.map +0 -1
  560. package/es/src/charts/drawSteps/drawTitle.js +0 -31
  561. package/es/src/charts/drawSteps/drawTitle.js.map +0 -1
  562. package/es/src/charts/drawSteps/drawTotal.js +0 -32
  563. package/es/src/charts/drawSteps/drawTotal.js.map +0 -1
  564. package/es/src/components/Axis.js +0 -1457
  565. package/es/src/components/Axis.js.map +0 -1
  566. package/es/src/components/AxisBottom.js.map +0 -1
  567. package/es/src/components/AxisLeft.js.map +0 -1
  568. package/es/src/components/AxisRight.js.map +0 -1
  569. package/es/src/components/AxisTop.js.map +0 -1
  570. package/es/src/components/ColorScale.js +0 -843
  571. package/es/src/components/ColorScale.js.map +0 -1
  572. package/es/src/components/Legend.js +0 -622
  573. package/es/src/components/Legend.js.map +0 -1
  574. package/es/src/components/Timeline.js +0 -695
  575. package/es/src/components/Timeline.js.map +0 -1
  576. /package/es/src/components/{AxisBottom.js → Axis/AxisBottom.js} +0 -0
  577. /package/es/src/components/{AxisLeft.js → Axis/AxisLeft.js} +0 -0
  578. /package/es/src/components/{AxisRight.js → Axis/AxisRight.js} +0 -0
  579. /package/es/src/components/{AxisTop.js → Axis/AxisTop.js} +0 -0
@@ -0,0 +1,111 @@
1
+ import type { DataPoint } from "@d3plus/data";
2
+ import type { Renderer, Scene, SceneEvent } from "@d3plus/render";
3
+ import VizBase from "./VizBase.js";
4
+ /**
5
+ Creates an x/y plot based on an array of data. See [this example](https://d3plus.org/examples/d3plus-treemap/getting-started/) for help getting started using the treemap generator.
6
+ */
7
+ export default class Viz extends VizBase {
8
+ /**
9
+ Invoked when creating a new class instance, and sets any default parameters.
10
+ @private
11
+ */
12
+ constructor();
13
+ /**
14
+ Called by draw before anything is drawn. Formats the data and performs preparations for draw.
15
+ @private
16
+ */
17
+ _preDraw(): void;
18
+ /**
19
+ Composes a backend-agnostic scene graph from the shapes/features produced
20
+ by the most recent render. Combines:
21
+ - `_chartScene` (cells from `chartDef.emit`, or `Plot._paint` for the
22
+ paint-driven Plot family) wrapped in viz-chart-cells
23
+ - `_shapes` (still used by some charts) — each shape's toScene
24
+ - chart-level components (Legend/ColorScale/Timeline) via their toScene
25
+ - `_featurePanels` (from FeatureModule layouts) wrapped in viz-features
26
+ */
27
+ toScene(): Scene;
28
+ /**
29
+ Called by render once all checks are passed.
30
+ @private
31
+ */
32
+ _draw(): void;
33
+ /**
34
+ * Applies the threshold algorithm according to the type of chart used.
35
+ * @param {Array} data The data to process.
36
+ * @private
37
+ */
38
+ _thresholdFunction(data: DataPoint[], _tree?: unknown): DataPoint[];
39
+ /**
40
+ * Detects width and height and sets SVG properties
41
+ * @private
42
+ */
43
+ _setSVGSize(width?: number, height?: number): void;
44
+ /**
45
+ Draws the visualization given the specified configuration.
46
+ @param callback Optional callback invoked after rendering completes.
47
+ */
48
+ render(callback?: () => void): this;
49
+ /**
50
+ Selects which @d3plus/render backend paints the visible output.
51
+ `"svg"` = SvgRenderer (default), `"canvas"` = CanvasRenderer.
52
+ Boolean arguments both normalize to `"svg"`.
53
+ */
54
+ renderer(): "svg" | "canvas";
55
+ renderer(_: "svg" | "canvas" | true | false): this;
56
+ /**
57
+ "full" runs the DOM enter/update/exit for every shape; "compute"
58
+ skips DOM work and only populates the scene data (`_textData`,
59
+ `_shapes[i]._select`, etc.) for `toScene()` to read. Set automatically by
60
+ `renderScene` callers; users can also opt-in.
61
+ */
62
+ renderMode(): "full" | "compute";
63
+ renderMode(_: "full" | "compute"): this;
64
+ /**
65
+ Public entry point that renders this chart through the @d3plus/render
66
+ pluggable backends. The compute pass happens via render() (in an svg
67
+ auto-created inside the target div); SvgRenderer/CanvasRenderer paints
68
+ the scene to the target. Returns `{renderer, scene}` so callers can
69
+ interact with the renderer (e.g. for picking) or read the scene data.
70
+ */
71
+ renderScene(target: Element, opts?: {
72
+ kind?: "svg" | "canvas";
73
+ }): Promise<{
74
+ renderer: Renderer;
75
+ scene: Scene;
76
+ }>;
77
+ /**
78
+ Renders this chart through the @d3plus/render pluggable backends. Called
79
+ automatically by `render()`. The compute pass draws into `this._select`
80
+ (an auto-created svg INSIDE the user's target div) — that svg is the
81
+ off-stage detached compute svg. SvgRenderer mounts to the user's target
82
+ div (the parent), as a sibling to the detached compute svg. The compute
83
+ svg's children get cleared so only the scene output is visible.
84
+ */
85
+ _drawSceneToTarget(durationOverride?: number): void;
86
+ /**
87
+ Routes a renderer pointer event to the matching `viz.schema.on` handlers.
88
+ Bridges the v4 scene-rendered path (SvgRenderer/CanvasRenderer), where
89
+ compute-mode shapes mount no per-shape DOM, so `shape.on(evt, fn)`
90
+ listeners never fire. We look up the appropriate `on` key from the picked
91
+ scene node: legend swatches route to legend handlers, chart shapes to
92
+ shape (+ shape-class-scoped) handlers, and chrome (axis/timeline/back) is
93
+ excluded. Split out of `_drawSceneToTarget` to keep that method small.
94
+ @private
95
+ */
96
+ _routeSceneEvent(event: SceneEvent): void;
97
+ /**
98
+ Coalesces interaction-driven scene repaints (hover/active dimming) into a
99
+ single paint per animation frame. A fast pointer sweep across a dense
100
+ chart fires a hover transition per shape crossed; painting each one
101
+ synchronously rebuilt the whole scene back-to-back, saturating the main
102
+ thread (~200ms stalls) so the tooltip couldn't reposition and appeared
103
+ stuck at its last spot. Only the latest hover state is visible, so the
104
+ intermediate paints are wasted — collapse them to one rAF-scheduled draw.
105
+ */
106
+ _scheduleSceneRepaint(): void;
107
+ /**
108
+ Tears down the visualization: disconnects the ResizeObserver and removes DOM event listeners. Call this when unmounting to avoid memory leaks.
109
+ */
110
+ destroy(): this;
111
+ }
@@ -0,0 +1,160 @@
1
+ import { select } from "d3-selection";
2
+ import type { DataPoint } from "@d3plus/data";
3
+ import type { D3plusConfig } from "../../utils/index.js";
4
+ import VizBaseConfig from "./VizBaseConfig.js";
5
+ /**
6
+ Second half of the fluent config accessors shared by every Viz chart
7
+ (`loadingHTML` through `zoomPadding`), extending `VizBaseConfig` which
8
+ holds the first half. Split purely so each file stays under the
9
+ `max-lines` budget; the methods remain real prototype methods, so
10
+ `BaseClass.config()` reflection and polymorphic `this` chaining are
11
+ unchanged.
12
+ */
13
+ export default class VizBase extends VizBaseConfig {
14
+ /**
15
+ The inner HTML of the status message displayed when loading AJAX requests and displaying errors. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.
16
+ */
17
+ loadingHTML(_?: string | ((viz: VizBase) => string)): this | string | ((viz: VizBase) => string);
18
+ /**
19
+ Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.
20
+ */
21
+ loadingMessage(_?: boolean): this | boolean;
22
+ /**
23
+ The color of the mask displayed underneath the status message when loading AJAX requests and displaying errors. Set to `false` to turn off the mask completely.
24
+ */
25
+ messageMask(_?: string | boolean): this | string | boolean;
26
+ /**
27
+ Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.
28
+ */
29
+ messageStyle(_?: Record<string, unknown>): this | Record<string, unknown>;
30
+ /**
31
+ The inner HTML of the status message displayed when no data is supplied to the visualization. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.
32
+ */
33
+ noDataHTML(_?: string | ((viz: VizBase) => string)): this | string | ((viz: VizBase) => string);
34
+ /**
35
+ Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.
36
+ */
37
+ noDataMessage(_?: boolean): this | boolean;
38
+ /**
39
+ If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.
40
+ */
41
+ scrollContainer(_?: string | HTMLElement | Window): this | string | HTMLElement | Window;
42
+ /**
43
+ The SVG container element as a d3 selector or DOM element. Defaults to `undefined`.
44
+ */
45
+ select(_?: string | HTMLElement): this | ReturnType<typeof select>;
46
+ /**
47
+ Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, "Rect" or "Circle"), or an accessor Function that returns the String class name to be used for each individual data point.
48
+ */
49
+ shape(_?: string | ((d: DataPoint, i: number) => string)): this | string | ((d: DataPoint, i: number) => string);
50
+ /**
51
+ Configuration object with key/value pairs applied as method calls on each shape.
52
+ */
53
+ shapeConfig(): D3plusConfig;
54
+ shapeConfig(_: D3plusConfig): this;
55
+ /**
56
+ Accessor function or string for the visualization's subtitle.
57
+ */
58
+ subtitle(_?: string | ((data: DataPoint[]) => string)): this | string | ((data: DataPoint[]) => string);
59
+ /**
60
+ Configuration object for the subtitle.
61
+ */
62
+ subtitleConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
63
+ /**
64
+ Tells the subtitle whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the subtitle appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
65
+ */
66
+ subtitlePadding(_?: boolean | (() => boolean)): this | boolean | (() => boolean);
67
+ /**
68
+ The threshold value for bucketing small data points together.
69
+ */
70
+ threshold(_?: number | ((data: DataPoint[]) => number)): this | number | ((data: DataPoint[]) => number);
71
+ /**
72
+ Accessor for the value used in the threshold algorithm.
73
+ @param key The data key used to group values for thresholding.
74
+ */
75
+ thresholdKey(key?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])): this | string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]);
76
+ /**
77
+ The label displayed for bucketed threshold items.
78
+ */
79
+ thresholdName(_?: string | ((d: DataPoint, i: number) => string)): this | string | ((d: DataPoint, i: number) => string);
80
+ /**
81
+ Accessor function or string key for the time dimension of each data point.
82
+ */
83
+ time(_?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false): this | string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
84
+ /**
85
+ Configuration object for the timeline.
86
+ */
87
+ timelineConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
88
+ /**
89
+ The starting time or range for the timeline. Can be a single Date/String, or an Array of 2 values representing the min and max.
90
+ */
91
+ timelineDefault(_?: Date | string | (Date | string)[]): this | Date[];
92
+ /**
93
+ Tells the timeline whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the timeline appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
94
+ */
95
+ timelinePadding(_?: boolean | (() => boolean)): this | boolean | (() => boolean);
96
+ /**
97
+ Accessor function or string for the visualization's title.
98
+ */
99
+ title(_?: string | ((data: DataPoint[]) => string)): this | string | ((data: DataPoint[]) => string);
100
+ /**
101
+ Configuration object for the title.
102
+ */
103
+ titleConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
104
+ /**
105
+ Tells the title whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the title appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
106
+ */
107
+ titlePadding(_?: boolean | (() => boolean)): this | boolean | (() => boolean);
108
+ /**
109
+ Whether to display tooltips on hover.
110
+ */
111
+ tooltip(_?: boolean | ((d: DataPoint, i: number) => boolean)): this | boolean | ((d: DataPoint, i: number) => boolean);
112
+ /**
113
+ Configuration object for the tooltip.
114
+ */
115
+ tooltipConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
116
+ /**
117
+ Accessor function or string key for the total value displayed in the visualization.
118
+ */
119
+ total(_?: boolean | string | ((d: DataPoint, i: number) => number)): this | boolean | string | ((d: DataPoint, i: number) => number);
120
+ /**
121
+ Configuration object for the total bar.
122
+ */
123
+ totalConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
124
+ /**
125
+ Formatter function for the value in the total bar.
126
+ */
127
+ totalFormat(_?: (d: number) => string): this | ((d: number) => string);
128
+ /**
129
+ Tells the total whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the total appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
130
+ */
131
+ totalPadding(_?: boolean | (() => boolean)): this | boolean | (() => boolean);
132
+ /**
133
+ The pixel stroke-width of the zoom brush area.
134
+ */
135
+ zoomBrushHandleSize(_?: number): this | number;
136
+ /**
137
+ An object containing CSS key/value pairs that is used to style the outer handle area of the zoom brush. Passing `false` will remove all default styling.
138
+ */
139
+ zoomBrushHandleStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
140
+ /**
141
+ An object containing CSS key/value pairs that is used to style the inner selection area of the zoom brush. Passing `false` will remove all default styling.
142
+ */
143
+ zoomBrushSelectionStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
144
+ /**
145
+ An object containing CSS key/value pairs that is used to style each zoom control button (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.
146
+ */
147
+ zoomControlStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
148
+ /**
149
+ An object containing CSS key/value pairs that is used to style each zoom control button when active (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.
150
+ */
151
+ zoomControlStyleActive(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
152
+ /**
153
+ An object containing CSS key/value pairs that is used to style each zoom control button on hover (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.
154
+ */
155
+ zoomControlStyleHover(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
156
+ /**
157
+ A pixel value to be used to pad all sides of a zoomed area.
158
+ */
159
+ zoomPadding(_?: number): this | number;
160
+ }
@@ -0,0 +1,156 @@
1
+ import type { DataPoint } from "@d3plus/data";
2
+ import { BaseClass } from "../../utils/index.js";
3
+ /**
4
+ First half of the fluent config accessors shared by every Viz chart
5
+ (`active` through `legendTooltip`). Split from `VizBase` purely so each
6
+ file stays under the `max-lines` budget; the methods remain real prototype
7
+ methods, so `BaseClass.config()` reflection and polymorphic `this` chaining
8
+ are unchanged.
9
+ */
10
+ export default class VizBaseConfig extends BaseClass {
11
+ [key: string]: any;
12
+ /**
13
+ The active callback function for highlighting shapes.
14
+ */
15
+ active(_?: ((d: DataPoint, i: number) => boolean) | false): this | ((d: DataPoint, i: number) => boolean) | false;
16
+ /**
17
+ Custom aggregation methods for each data key.
18
+ */
19
+ aggs(_?: Record<string, unknown>): this | Record<string, unknown>;
20
+ /**
21
+ Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).
22
+ */
23
+ attribution(_?: string | boolean): this | string | boolean;
24
+ /**
25
+ Configuration object for the attribution style.
26
+ */
27
+ attributionStyle(_?: Record<string, unknown>): this | Record<string, unknown>;
28
+ /**
29
+ Configuration object for the back button.
30
+ */
31
+ backConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
32
+ /**
33
+ Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.
34
+ */
35
+ color(_?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false): this | string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
36
+ /**
37
+ Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point.
38
+ */
39
+ colorScale(_?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false): this | string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
40
+ /**
41
+ A pass-through to the config method of ColorScale.
42
+ */
43
+ colorScaleConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
44
+ /**
45
+ Tells the colorScale whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the colorScale appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
46
+ */
47
+ colorScalePadding(_?: boolean | (() => boolean)): this | boolean | (() => boolean);
48
+ /**
49
+ Defines which side of the visualization to anchor the color scale. Acceptable values are `"top"`, `"bottom"`, `"left"`, `"right"`, and `false`. A `false` value will cause the color scale to not be displayed, but will still color shapes based on the scale.
50
+ */
51
+ colorScalePosition(_?: string | boolean | (() => string | boolean)): this | string | boolean | (() => string | boolean);
52
+ /**
53
+ The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.
54
+ */
55
+ colorScaleMaxSize(_?: number): this | number;
56
+ /**
57
+ The primary data array used to draw the visualization. The value passed should be an *Array* of objects or a *String* representing a filepath or URL to be loaded. The following filetypes are supported: `csv`, `tsv`, `txt`, and `json`.
58
+
59
+ If your data URL needs specific headers to be set, an Object with "url" and "headers" keys may also be passed.
60
+
61
+ Additionally, a custom formatting function can be passed as a second argument to this method. This custom function will be passed the data that has been loaded, as long as there are no errors. This function should return the final array of obejcts to be used as the primary data array. For example, some JSON APIs return the headers split from the data values to save bandwidth. These would need be joined using a custom formatter.
62
+
63
+ If you would like to specify certain configuration options based on the yet-to-be-loaded data, you can also return a full `config` object from the data formatter (including the new `data` array as a key in the object).
64
+
65
+ Defaults to an empty array (`[]`).
66
+ @param f The data array or a URL string to load data from.
67
+ */
68
+ data(_?: DataPoint[] | string | {
69
+ url: string;
70
+ headers: Record<string, string>;
71
+ }, f?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>): this | DataPoint[];
72
+ /**
73
+ If the width and/or height of a Viz is not user-defined, it is determined by the size of it's parent element. When this method is set to `true`, the Viz will listen for the `window.onresize` event and adjust it's dimensions accordingly.
74
+ */
75
+ detectResize(_?: boolean): this | boolean;
76
+ /**
77
+ When resizing the browser window, this is the millisecond delay to trigger the resize event.
78
+ */
79
+ detectResizeDelay(_?: number): this | number;
80
+ /**
81
+ Toggles whether or not the Viz should try to detect if it visible in the current viewport. When this method is set to `true`, the Viz will only be rendered when it has entered the viewport either through scrolling or if it's display or visibility is changed.
82
+ */
83
+ detectVisible(_?: boolean): this | boolean;
84
+ /**
85
+ The interval, in milliseconds, for checking if the visualization is visible on the page.
86
+ */
87
+ detectVisibleInterval(_?: number): this | number;
88
+ /**
89
+ Shows a button that allows for downloading the current visualization.
90
+ */
91
+ downloadButton(_?: boolean): this | boolean;
92
+ /**
93
+ Sets specific options of the saveElement function used when downloading the visualization.
94
+ */
95
+ downloadConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
96
+ /**
97
+ Defines which control group to add the download button into.
98
+ */
99
+ downloadPosition(_?: string): this | string;
100
+ /**
101
+ The font family used throughout the visualization.
102
+ */
103
+ fontFamily(_?: string | string[]): this | string | string[];
104
+ /**
105
+ Defines the mapping between data and shape. The value can be a String matching a key in each data point (default is "id"), or an accessor Function that returns a unique value for each data point. Additionally, an Array of these values may be provided if the visualization supports nested hierarchies.
106
+ */
107
+ groupBy(_?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | (string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]))[]): this | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])[];
108
+ /**
109
+ Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).
110
+ */
111
+ hiddenColor(_?: string | ((d: DataPoint, i: number) => string)): this | string | ((d: DataPoint, i: number) => string);
112
+ /**
113
+ Defines the opacity used for legend labels when the corresponding grouping is hidden from display (by clicking on the legend).
114
+ */
115
+ hiddenOpacity(_?: number | ((d: DataPoint, i: number) => number)): this | number | ((d: DataPoint, i: number) => number);
116
+ /**
117
+ The hover callback function for highlighting shapes on mouseover.
118
+ */
119
+ hover(_?: ((d: DataPoint, i: number) => boolean) | false): this;
120
+ /**
121
+ Persistently emphasizes the data points matching the given predicate: the
122
+ matching marks keep their color while every other mark is de-emphasized to
123
+ a neutral gray (the "emphasis" form — highlight one series, gray the rest).
124
+ Unlike `hover`/`active` (transient, opacity-based), `highlight` is a
125
+ standing state that survives pointer movement. Pass `false` to clear it.
126
+ */
127
+ highlight(_?: ((d: DataPoint, i: number) => boolean) | false): this | ((d: DataPoint, i: number) => boolean) | false | undefined;
128
+ /**
129
+ Accessor function or string key for the label of each data point.
130
+ */
131
+ label(_?: string | ((d: DataPoint, i: number) => string)): this | string | ((d: DataPoint, i: number) => string);
132
+ /**
133
+ Whether to display the legend.
134
+ */
135
+ legend(_?: boolean | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)): this | boolean | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean);
136
+ /**
137
+ Configuration object passed to the legend's config method.
138
+ */
139
+ legendConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
140
+ /**
141
+ Defines the click functionality of categorical legend squares. When set to false, clicking will hide that category and shift+clicking will solo that category. When set to true, clicking with solo that category and shift+clicking will hide that category.
142
+ */
143
+ legendFilterInvert(_?: boolean | (() => boolean)): this | boolean | (() => boolean);
144
+ /**
145
+ Tells the legend whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the legend appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
146
+ */
147
+ legendPadding(_?: boolean | (() => boolean)): this | boolean | (() => boolean);
148
+ /**
149
+ Defines which side of the visualization to anchor the legend. Expected values are `"top"`, `"bottom"`, `"left"`, and `"right"`.
150
+ */
151
+ legendPosition(_?: string | (() => string)): this | string | (() => string);
152
+ /**
153
+ Configuration object for the legend tooltip.
154
+ */
155
+ legendTooltip(_?: Record<string, unknown>): this | Record<string, unknown>;
156
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ `applyInteractionOpacity` — recomputes node alpha for hover/active state.
3
+
4
+ v4 expresses hover/active dimming as `paint.opacity` on the scene node
5
+ (see the `Paint` docs in @d3plus/render), not via DOM surgery. When a
6
+ hover or active predicate is set, this walks the chart-cell nodes and
7
+ returns clones of the non-matching ones with a reduced opacity, leaving
8
+ the originals (and the un-dimmed nodes) untouched. With no predicate set
9
+ it returns the input array unchanged, so normal renders pay nothing.
10
+ */
11
+ import type { SceneNode } from "@d3plus/render";
12
+ import type { VizInstance } from "./vizTypes.js";
13
+ /**
14
+ `applyColorScaleBucketOpacity` — dims the colorScale's sibling swatches on
15
+ hover, the way `applyInteractionOpacity` dims chart marks and legend
16
+ swatches. A swatch (and its label) is a `_isColorScaleBucket` node matched
17
+ by its bucket COLOR, not by id/value — so this only touches those nodes and
18
+ leaves the colorScale title/axis/gradient at full opacity. A swatch stays
19
+ bright when its color is "active" (its range contains a datum matching the
20
+ current hover); every other swatch dims. No-op when nothing is hovered.
21
+ */
22
+ export declare function applyColorScaleBucketOpacity(nodes: SceneNode[], viz: VizInstance): SceneNode[];
23
+ export declare function applyInteractionOpacity(nodes: SceneNode[], viz: VizInstance): SceneNode[];
@@ -0,0 +1,14 @@
1
+ import type { VizInstance } from "./vizTypes.js";
2
+ /**
3
+ Stamps `viz._ordinalColorScale` for ordinal color mode.
4
+
5
+ When `colorOrdinal` is on (and no continuous `colorScale` is set), a discrete
6
+ color field is treated as *ordered*: its distinct values take a single-hue
7
+ light→dark ramp so the color encodes the order. This walks the drawn data to
8
+ collect the distinct values in a stable order — numeric values sort
9
+ ascending; everything else keeps the order it first appears in the data
10
+ (pre-sort your data, or drive it with the existing ordering config, to
11
+ control non-numeric ramps) — then maps them onto an OKLab ramp of the
12
+ default sequential hue. Clears the scale when the mode is off.
13
+ */
14
+ export declare function configureOrdinalColor(viz: VizInstance): void;
@@ -0,0 +1,14 @@
1
+ import type { Scene, TrailCatchup } from "@d3plus/render";
2
+ import type { VizInstance } from "./vizTypes.js";
3
+ /**
4
+ On a forward jump that skips periods, compute each persistent-trail mark's
5
+ real pixel position at every skipped period, so the trail can bend through
6
+ them (via the render layer's `commitTrailCatchups`) rather than drawing one
7
+ coarse straight segment.
8
+
9
+ Cheap: `trailPersist` forces `axisPersist`, so the x/y scales are fixed across
10
+ periods — a mark's position at period P is just `_xFunc(datum_at_P)` plus a
11
+ data lookup, no re-layout. Returns [] for charts without x/y scales (e.g.
12
+ Geomap) or when the jump skips no period.
13
+ */
14
+ export declare function computeTrailCatchup(viz: VizInstance, scene: Scene, prevSeq: number, sequence: number): TrailCatchup[];
@@ -0,0 +1,8 @@
1
+ import type Viz from "./Viz.js";
2
+ /**
3
+ Seeds a fresh Viz instance's schema defaults and installs the identity-coerce
4
+ fluent accessors. Extracted from the constructor so the seeding logic stays
5
+ readable and the constructor stays under the per-function line budget.
6
+ @private
7
+ */
8
+ export declare function initVizDefaults(viz: Viz): void;
@@ -0,0 +1,8 @@
1
+ import type Viz from "./Viz.js";
2
+ /**
3
+ Draws the visualization given the specified configuration.
4
+ @param viz The Viz instance to render.
5
+ @param callback Optional callback invoked after rendering completes.
6
+ @private
7
+ */
8
+ export declare function vizRender(viz: Viz, callback?: () => void): Viz;