@d3plus/core 4.10.0 → 4.12.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 (711) hide show
  1. package/es/index.js +1 -1
  2. package/es/internal.js +178 -9
  3. package/es/src/charts/Alluvial/aggregate.js +145 -0
  4. package/es/src/charts/Alluvial/applyLayout.js +125 -0
  5. package/es/src/charts/Alluvial/dimensions.js +56 -0
  6. package/es/src/charts/Alluvial/emit.js +73 -0
  7. package/es/src/charts/Alluvial/hover.js +101 -0
  8. package/es/src/charts/Alluvial/index.js +176 -0
  9. package/es/src/charts/Alluvial/layout.js +137 -0
  10. package/es/src/charts/Alluvial/meta.js +57 -0
  11. package/es/src/charts/Alluvial/titles.js +101 -0
  12. package/es/src/charts/ArcDiagram/applyLayout.js +386 -0
  13. package/es/src/charts/ArcDiagram/arcGeometry.js +275 -0
  14. package/es/src/charts/ArcDiagram/arcLabels.js +171 -0
  15. package/es/src/charts/ArcDiagram/arcLoops.js +78 -0
  16. package/es/src/charts/ArcDiagram/emit.js +192 -0
  17. package/es/src/charts/ArcDiagram/events.js +148 -0
  18. package/es/src/charts/ArcDiagram/index.js +217 -0
  19. package/es/src/charts/BarChart/index.js +12 -7
  20. package/es/src/charts/BoxWhisker/index.js +22 -0
  21. package/es/src/charts/BubbleChart/emit.js +31 -0
  22. package/es/src/charts/BubbleChart/index.js +54 -0
  23. package/es/src/charts/Calendar/emit.js +1 -1
  24. package/es/src/charts/Calendar/index.js +5 -2
  25. package/es/src/charts/Candlestick/buffer.js +6 -4
  26. package/es/src/charts/Candlestick/index.js +6 -11
  27. package/es/src/charts/Chord/applyLayout.js +56 -69
  28. package/es/src/charts/Chord/emit.js +55 -24
  29. package/es/src/charts/Chord/index.js +14 -10
  30. package/es/src/charts/Chord/labels.js +105 -0
  31. package/es/src/charts/Donut/index.js +5 -11
  32. package/es/src/charts/Dumbbell/index.js +2 -4
  33. package/es/src/charts/Gantt/applyLayout.js +160 -0
  34. package/es/src/charts/Gantt/emit.js +142 -0
  35. package/es/src/charts/Gantt/ganttDecor.js +207 -0
  36. package/es/src/charts/Gantt/ganttGeometry.js +107 -0
  37. package/es/src/charts/Gantt/ganttLabels.js +85 -0
  38. package/es/src/charts/Gantt/ganttRows.js +111 -0
  39. package/es/src/charts/Gantt/ganttTooltip.js +136 -0
  40. package/es/src/charts/Gantt/index.js +219 -0
  41. package/es/src/charts/Geomap/applyLayout.js +90 -49
  42. package/es/src/charts/Geomap/basemapTheme.js +3 -48
  43. package/es/src/charts/Geomap/emit.js +19 -2
  44. package/es/src/charts/Geomap/flowEmit.js +137 -0
  45. package/es/src/charts/Geomap/flowEvents.js +86 -0
  46. package/es/src/charts/Geomap/flowFields.js +91 -0
  47. package/es/src/charts/Geomap/flowGeometry.js +225 -0
  48. package/es/src/charts/Geomap/flowLinks.js +239 -0
  49. package/es/src/charts/Geomap/geoCache.js +180 -0
  50. package/es/src/charts/Geomap/globeKeys.js +131 -0
  51. package/es/src/charts/Geomap/globeRotate.js +208 -0
  52. package/es/src/charts/Geomap/index.js +51 -16
  53. package/es/src/charts/Geomap/pointLabels.js +107 -0
  54. package/es/src/charts/Hexbin/binning.js +103 -0
  55. package/es/src/charts/Hexbin/buffer.js +33 -0
  56. package/es/src/charts/Hexbin/contourLabels.js +234 -0
  57. package/es/src/charts/Hexbin/contours.js +48 -0
  58. package/es/src/charts/Hexbin/emit.js +142 -0
  59. package/es/src/charts/Hexbin/index.js +206 -0
  60. package/es/src/charts/Hexbin/layers.js +212 -0
  61. package/es/src/charts/Hexbin/settings.js +86 -0
  62. package/es/src/charts/Hexbin/tooltip.js +77 -0
  63. package/es/src/charts/Histogram/binData.js +31 -4
  64. package/es/src/charts/Histogram/index.js +32 -15
  65. package/es/src/charts/Histogram/labels.js +18 -0
  66. package/es/src/charts/Icicle/index.js +6 -4
  67. package/es/src/charts/LinePlot/index.js +7 -0
  68. package/es/src/charts/Marimekko/index.js +7 -4
  69. package/es/src/charts/Matrix/applyLayout.js +20 -9
  70. package/es/src/charts/Matrix/index.js +19 -1
  71. package/es/src/charts/Network/applyLayout.js +171 -96
  72. package/es/src/charts/Network/bundle.js +82 -0
  73. package/es/src/charts/Network/clusterLabels.js +423 -0
  74. package/es/src/charts/Network/clusters.js +290 -0
  75. package/es/src/charts/Network/emit.js +257 -75
  76. package/es/src/charts/Network/graph.js +146 -0
  77. package/es/src/charts/Network/graphFluent.js +81 -0
  78. package/es/src/charts/Network/index.js +91 -106
  79. package/es/src/charts/Network/minNodeDistance.js +64 -0
  80. package/es/src/charts/Network/polygonRows.js +44 -0
  81. package/es/src/charts/Pack/applyLayout.js +16 -5
  82. package/es/src/charts/Pack/emit.js +15 -8
  83. package/es/src/charts/Pack/groupRows.js +61 -0
  84. package/es/src/charts/Pack/index.js +8 -1
  85. package/es/src/charts/Pack/neutralPaint.js +20 -0
  86. package/es/src/charts/Pack/nodeNames.js +35 -0
  87. package/es/src/charts/ParallelCoordinates/axes.js +22 -22
  88. package/es/src/charts/ParallelCoordinates/chrome.js +18 -0
  89. package/es/src/charts/ParallelCoordinates/index.js +3 -1
  90. package/es/src/charts/ParallelCoordinates/titles.js +17 -9
  91. package/es/src/charts/Pie/applyLayout.js +86 -27
  92. package/es/src/charts/Pie/arcFit.js +152 -0
  93. package/es/src/charts/Pie/curvedLabels.js +134 -0
  94. package/es/src/charts/Pie/emit.js +51 -96
  95. package/es/src/charts/Pie/index.js +74 -31
  96. package/es/src/charts/Pie/labelRoom.js +154 -0
  97. package/es/src/charts/Pie/outsideLabels.js +224 -0
  98. package/es/src/charts/Pie/outsideNodes.js +267 -0
  99. package/es/src/charts/Pie/pieLabels.js +137 -0
  100. package/es/src/charts/Pie/sectorBox.js +223 -0
  101. package/es/src/charts/Pie/straightLabels.js +96 -0
  102. package/es/src/charts/Pie/straightLayout.js +215 -0
  103. package/es/src/charts/Plot/alongLegend.js +76 -0
  104. package/es/src/charts/Plot/areaEnter.js +68 -0
  105. package/es/src/charts/Plot/areaLabelsAlong.js +333 -0
  106. package/es/src/charts/Plot/axisHoverScene.js +2 -1
  107. package/es/src/charts/Plot/axisValues.js +43 -0
  108. package/es/src/charts/Plot/barWidth.js +59 -11
  109. package/es/src/charts/Plot/circleLabels.js +98 -0
  110. package/es/src/charts/Plot/connectGaps.js +237 -0
  111. package/es/src/charts/Plot/connectGapsScene.js +188 -0
  112. package/es/src/charts/Plot/draw.js +34 -14
  113. package/es/src/charts/Plot/fillBetween.js +2 -1
  114. package/es/src/charts/Plot/forecastScene.js +3 -4
  115. package/es/src/charts/Plot/index.js +19 -17
  116. package/es/src/charts/Plot/labelPlacement.js +1 -1
  117. package/es/src/charts/Plot/lineLabelEmit.js +82 -0
  118. package/es/src/charts/Plot/lineLabelSides.js +51 -0
  119. package/es/src/charts/Plot/lineLabelSpread.js +65 -0
  120. package/es/src/charts/Plot/lineLabelsAlong.js +282 -0
  121. package/es/src/charts/Plot/lineMarkerKeys.js +19 -0
  122. package/es/src/charts/Plot/pipeline.js +66 -19
  123. package/es/src/charts/Plot/pipelineAxisLayout.js +5 -1
  124. package/es/src/charts/Plot/pipelineDomains.js +16 -3
  125. package/es/src/charts/Plot/pipelineLineLabels.js +144 -52
  126. package/es/src/charts/Plot/pipelineScales.js +40 -8
  127. package/es/src/charts/Plot/plotFacet.js +12 -1
  128. package/es/src/charts/Plot/plotInit.js +40 -5
  129. package/es/src/charts/Plot/plotRangeBreaks.js +85 -0
  130. package/es/src/charts/Plot/referenceDomains.js +133 -0
  131. package/es/src/charts/Plot/shapeDefaults.js +10 -5
  132. package/es/src/charts/Plot/shapeLabelLegend.js +67 -0
  133. package/es/src/charts/Plot/sharedHover.js +2 -1
  134. package/es/src/charts/Plot/sharedTooltip.js +13 -3
  135. package/es/src/charts/Plot/stackLegendOrder.js +176 -0
  136. package/es/src/charts/Plot/trendLabels.js +183 -0
  137. package/es/src/charts/Plot/trendLines.js +1 -0
  138. package/es/src/charts/Plot/trendScene.js +6 -3
  139. package/es/src/charts/Plot/trendTooltip.js +5 -1
  140. package/es/src/charts/PolarArea/index.js +4 -3
  141. package/es/src/charts/Priestley/applyLayout.js +21 -23
  142. package/es/src/charts/Priestley/index.js +4 -37
  143. package/es/src/charts/Priestley/timeAxis.js +103 -0
  144. package/es/src/charts/Pyramid/gutter.js +52 -16
  145. package/es/src/charts/Pyramid/index.js +55 -7
  146. package/es/src/charts/Pyramid/scene.js +4 -4
  147. package/es/src/charts/Radar/applyLayout.js +31 -33
  148. package/es/src/charts/Radar/axisDecorations.js +62 -13
  149. package/es/src/charts/Radar/curvedLabels.js +228 -0
  150. package/es/src/charts/Radar/emit.js +30 -15
  151. package/es/src/charts/Radar/index.js +43 -5
  152. package/es/src/charts/Radar/points.js +85 -0
  153. package/es/src/charts/RadialBar/curvedLabels.js +111 -0
  154. package/es/src/charts/RadialBar/emit.js +9 -1
  155. package/es/src/charts/RadialBar/index.js +26 -9
  156. package/es/src/charts/RadialBar/trackLayout.js +43 -13
  157. package/es/src/charts/RadialMatrix/applyLayout.js +115 -31
  158. package/es/src/charts/RadialMatrix/index.js +18 -9
  159. package/es/src/charts/Rings/applyLayout.js +39 -161
  160. package/es/src/charts/Rings/emit.js +219 -63
  161. package/es/src/charts/Rings/index.js +88 -32
  162. package/es/src/charts/Rings/ringsCurves.js +156 -0
  163. package/es/src/charts/Rings/ringsGraph.js +28 -9
  164. package/es/src/charts/Rings/ringsLoops.js +73 -0
  165. package/es/src/charts/Rings/ringsParallel.js +183 -0
  166. package/es/src/charts/Rings/ringsPlacement.js +152 -0
  167. package/es/src/charts/Rings/ringsSizing.js +61 -38
  168. package/es/src/charts/Sankey/applyLayout.js +130 -39
  169. package/es/src/charts/Sankey/circularLayout.js +208 -0
  170. package/es/src/charts/Sankey/circularLinks.js +301 -0
  171. package/es/src/charts/Sankey/emit.js +164 -94
  172. package/es/src/charts/Sankey/index.js +78 -75
  173. package/es/src/charts/Sankey/labels.js +80 -0
  174. package/es/src/charts/Sankey/ribbons.js +88 -0
  175. package/es/src/charts/Sankey/sankeyCycles.js +117 -0
  176. package/es/src/charts/Sankey/sankeyLayout.js +8 -3
  177. package/es/src/charts/Sankey/sankeyLinks.js +47 -0
  178. package/es/src/charts/Scatter/index.js +25 -0
  179. package/es/src/charts/SlopeChart/index.js +116 -0
  180. package/es/src/charts/SlopeChart/slope.js +95 -0
  181. package/es/src/charts/Streamgraph/index.js +51 -0
  182. package/es/src/charts/Sunburst/curvedLabels.js +74 -0
  183. package/es/src/charts/Sunburst/emit.js +83 -64
  184. package/es/src/charts/Sunburst/index.js +16 -4
  185. package/es/src/charts/Tree/applyLayout.js +44 -14
  186. package/es/src/charts/Tree/emit.js +5 -5
  187. package/es/src/charts/Tree/index.js +12 -18
  188. package/es/src/charts/Tree/keys.js +33 -0
  189. package/es/src/charts/Tree/nodeLabel.js +15 -0
  190. package/es/src/charts/Treemap/emitGroupHeaders.js +3 -5
  191. package/es/src/charts/Treemap/index.js +2 -5
  192. package/es/src/charts/Violin/inner.js +3 -5
  193. package/es/src/charts/definition/makeChart.js +14 -2
  194. package/es/src/charts/drawSteps/backControl.js +17 -5
  195. package/es/src/charts/drawSteps/gestureHover.js +79 -0
  196. package/es/src/charts/drawSteps/minimap.js +10 -25
  197. package/es/src/charts/drawSteps/minimapMarkup.js +25 -9
  198. package/es/src/charts/drawSteps/searchControls.js +2 -1
  199. package/es/src/charts/drawSteps/searchControlsMarkup.js +11 -2
  200. package/es/src/charts/drawSteps/tableViewMarkup.js +17 -10
  201. package/es/src/charts/drawSteps/zoomActions.js +36 -0
  202. package/es/src/charts/drawSteps/zoomControls.js +52 -23
  203. package/es/src/charts/drawSteps/zoomControlsMarkup.js +23 -4
  204. package/es/src/charts/drawSteps/zoomDrag.js +188 -0
  205. package/es/src/charts/drawSteps/zoomFit.js +69 -0
  206. package/es/src/charts/events/click.legend.js +11 -4
  207. package/es/src/charts/events/click.shape.js +13 -4
  208. package/es/src/charts/events/mouseenter.js +6 -16
  209. package/es/src/charts/events/mouseleave.js +9 -2
  210. package/es/src/charts/events/mousemove.legend.js +28 -32
  211. package/es/src/charts/events/mousemove.shape.js +45 -42
  212. package/es/src/charts/facet/drawFacets.js +14 -5
  213. package/es/src/charts/features/annotationFrame.js +179 -0
  214. package/es/src/charts/features/annotationText.js +83 -0
  215. package/es/src/charts/features/annotationTypes.js +10 -0
  216. package/es/src/charts/features/attributionFeature.js +6 -11
  217. package/es/src/charts/features/axes.js +17 -5
  218. package/es/src/charts/features/axesFinal.js +10 -3
  219. package/es/src/charts/features/axesMeasure.js +33 -12
  220. package/es/src/charts/features/axisTooltip.js +138 -0
  221. package/es/src/charts/features/calloutLayout.js +121 -0
  222. package/es/src/charts/features/calloutScene.js +155 -0
  223. package/es/src/charts/features/centerLabel.js +177 -0
  224. package/es/src/charts/features/chartGeometry.js +1 -1
  225. package/es/src/charts/features/circleLabelPlacement.js +297 -0
  226. package/es/src/charts/features/circleLabels.js +207 -0
  227. package/es/src/charts/features/colorScaleBivariate.js +83 -0
  228. package/es/src/charts/features/colorScaleBucket.js +20 -1
  229. package/es/src/charts/features/colorScaleHover.js +33 -7
  230. package/es/src/charts/features/colorScaleLimit.js +73 -0
  231. package/es/src/charts/features/colorScaleTooltip.js +77 -0
  232. package/es/src/charts/features/colorScaleTop.js +61 -0
  233. package/es/src/charts/features/colorScaleValue.js +97 -0
  234. package/es/src/charts/features/curvedArrows.js +191 -0
  235. package/es/src/charts/features/depthKey.js +26 -0
  236. package/es/src/charts/features/edgeArrows.js +220 -5
  237. package/es/src/charts/features/edgeBundling.js +442 -0
  238. package/es/src/charts/features/edgeBundlingSmooth.js +117 -0
  239. package/es/src/charts/features/ensureZoomDom.js +32 -8
  240. package/es/src/charts/features/features.js +32 -14
  241. package/es/src/charts/features/featuresColorScale.js +75 -20
  242. package/es/src/charts/features/featuresLegend.js +15 -24
  243. package/es/src/charts/features/hoverTicks.js +41 -0
  244. package/es/src/charts/features/idleQueue.js +72 -0
  245. package/es/src/charts/features/legendKeys.js +64 -0
  246. package/es/src/charts/features/lineLabels.js +55 -46
  247. package/es/src/charts/features/linkBundle.js +19 -0
  248. package/es/src/charts/features/linkColor.js +72 -0
  249. package/es/src/charts/features/linkFields.js +86 -0
  250. package/es/src/charts/features/linkFocus.js +118 -0
  251. package/es/src/charts/features/linkInteraction.js +364 -0
  252. package/es/src/charts/features/linkKeys.js +20 -0
  253. package/es/src/charts/features/linkLabelGeometry.js +209 -0
  254. package/es/src/charts/features/linkLabelPath.js +162 -0
  255. package/es/src/charts/features/linkLabels.js +340 -0
  256. package/es/src/charts/features/linkWidths.js +32 -0
  257. package/es/src/charts/features/networkMeasures.js +241 -0
  258. package/es/src/charts/features/nodeStats.js +309 -0
  259. package/es/src/charts/features/pathLabelGeometry.js +232 -0
  260. package/es/src/charts/features/pathLabels.js +50 -0
  261. package/es/src/charts/features/plotAnnotations.js +68 -17
  262. package/es/src/charts/features/plotEndLabels.js +28 -7
  263. package/es/src/charts/features/plotPaint.js +46 -12
  264. package/es/src/charts/features/polyline.js +129 -0
  265. package/es/src/charts/features/referenceAnnotations.js +403 -0
  266. package/es/src/charts/features/referenceLabelPlacement.js +106 -0
  267. package/es/src/charts/features/ringLabelNodes.js +93 -0
  268. package/es/src/charts/features/ringLabels.js +222 -0
  269. package/es/src/charts/features/sceneBounds.js +26 -6
  270. package/es/src/charts/features/selfLoops.js +306 -0
  271. package/es/src/charts/features/shapeEmit.js +54 -32
  272. package/es/src/charts/features/sharedFields.js +15 -2
  273. package/es/src/charts/features/textHalo.js +30 -0
  274. package/es/src/charts/index.js +8 -0
  275. package/es/src/charts/partition/chartFields.js +14 -5
  276. package/es/src/charts/partition/interaction.js +19 -10
  277. package/es/src/charts/partition/zoom.js +7 -6
  278. package/es/src/charts/pipeline/insetPlacement.js +22 -9
  279. package/es/src/charts/pipeline/preDrawData.js +46 -3
  280. package/es/src/charts/pipeline/runVizPipeline.js +5 -0
  281. package/es/src/charts/pipeline/vizPreDraw.js +5 -3
  282. package/es/src/charts/plotBuffers/discreteBuffer.js +7 -4
  283. package/es/src/charts/polar/chrome.js +81 -9
  284. package/es/src/charts/polar/config.js +6 -3
  285. package/es/src/charts/polar/wedgeLayout.js +2 -1
  286. package/es/src/charts/viz/Viz.js +61 -49
  287. package/es/src/charts/viz/VizBase.js +57 -14
  288. package/es/src/charts/viz/backgroundInk.js +23 -7
  289. package/es/src/charts/viz/emphasis.js +14 -0
  290. package/es/src/charts/viz/fillStroke.js +10 -0
  291. package/es/src/charts/viz/focusRing.js +104 -0
  292. package/es/src/charts/viz/focusTargets.js +208 -0
  293. package/es/src/charts/viz/history.js +74 -0
  294. package/es/src/charts/viz/interactionOpacity.js +115 -32
  295. package/es/src/charts/viz/keyboardNav.js +297 -0
  296. package/es/src/charts/viz/keyboardNavHost.js +95 -0
  297. package/es/src/charts/viz/loaderFormat.js +114 -0
  298. package/es/src/charts/viz/missingFields.js +2 -1
  299. package/es/src/charts/viz/mountTarget.js +9 -0
  300. package/es/src/charts/viz/nearestHover.js +183 -0
  301. package/es/src/charts/viz/nearestHoverSurface.js +92 -0
  302. package/es/src/charts/viz/ordinalColor.js +14 -12
  303. package/es/src/charts/viz/pageTheme.js +83 -0
  304. package/es/src/charts/viz/pointTooltipAnchor.js +59 -0
  305. package/es/src/charts/viz/pointVoronoi.js +124 -0
  306. package/es/src/charts/viz/reducedMotion.js +27 -0
  307. package/es/src/charts/viz/reportDrawError.js +15 -0
  308. package/es/src/charts/viz/setCursor.js +29 -0
  309. package/es/src/charts/viz/tooltipEnabled.js +38 -0
  310. package/es/src/charts/viz/userClick.js +34 -0
  311. package/es/src/charts/viz/vizDataPolling.js +8 -4
  312. package/es/src/charts/viz/vizDefaults.js +28 -57
  313. package/es/src/charts/viz/vizFields.js +41 -1
  314. package/es/src/charts/viz/vizRender.js +76 -31
  315. package/es/src/charts/viz/vizTheme.js +96 -0
  316. package/es/src/charts/viz/vizVisibility.js +26 -2
  317. package/es/src/components/Axis/Axis.js +35 -2
  318. package/es/src/components/Axis/AxisBottom.js +1 -0
  319. package/es/src/components/Axis/AxisLeft.js +1 -0
  320. package/es/src/components/Axis/AxisRight.js +1 -0
  321. package/es/src/components/Axis/AxisTop.js +1 -0
  322. package/es/src/components/Axis/axisBreak.js +33 -8
  323. package/es/src/components/Axis/axisDefaults.js +16 -9
  324. package/es/src/components/Axis/axisLabelKinds.js +36 -0
  325. package/es/src/components/Axis/axisLabelLineHeight.js +19 -0
  326. package/es/src/components/Axis/axisLabelRoom.js +37 -0
  327. package/es/src/components/Axis/axisLabelSize.js +171 -0
  328. package/es/src/components/Axis/axisLabelThinning.js +98 -4
  329. package/es/src/components/Axis/axisLayout.js +71 -46
  330. package/es/src/components/Axis/axisLayoutLabels.js +82 -140
  331. package/es/src/components/Axis/axisLayoutScale.js +16 -11
  332. package/es/src/components/Axis/axisLimit.js +27 -0
  333. package/es/src/components/Axis/axisMaxSize.js +39 -0
  334. package/es/src/components/Axis/axisRangeBreaks.js +77 -0
  335. package/es/src/components/Axis/axisRender.js +20 -8
  336. package/es/src/components/Axis/axisRounding.js +16 -1
  337. package/es/src/components/Axis/axisScene.js +11 -2
  338. package/es/src/components/Axis/axisTitle.js +53 -0
  339. package/es/src/components/Axis/axisTooltipTargets.js +128 -0
  340. package/es/src/components/Axis/brokenTimeScale.js +196 -0
  341. package/es/src/components/Axis/rangeBreaks.js +201 -0
  342. package/es/src/components/Axis/timeValues.js +19 -4
  343. package/es/src/components/ColorScale/ColorScale.js +77 -27
  344. package/es/src/components/ColorScale/bivariateRender.js +353 -0
  345. package/es/src/components/ColorScale/bivariateScale.js +150 -0
  346. package/es/src/components/ColorScale/bucketBounds.js +32 -3
  347. package/es/src/components/ColorScale/colorScaleHoverMark.js +3 -3
  348. package/es/src/components/ColorScale/colorScaleRender.js +32 -2
  349. package/es/src/components/ColorScale/colorScaleScale.js +28 -15
  350. package/es/src/components/ColorScale/colorScaleSwatchTooltips.js +77 -0
  351. package/es/src/components/Legend/Legend.js +13 -2
  352. package/es/src/components/Legend/legendConfig.js +2 -6
  353. package/es/src/components/Legend/legendCut.js +108 -0
  354. package/es/src/components/Legend/legendRender.js +38 -13
  355. package/es/src/components/SizeLegend/SizeLegend.js +1 -0
  356. package/es/src/components/TextBox.js +34 -67
  357. package/es/src/components/Timeline/Timeline.js +12 -3
  358. package/es/src/components/Timeline/timelineConfig.js +20 -10
  359. package/es/src/components/Timeline/timelineMode.js +26 -0
  360. package/es/src/components/Timeline/timelineRender.js +9 -4
  361. package/es/src/components/Tooltip.js +15 -5
  362. package/es/src/components/fontStack.js +20 -0
  363. package/es/src/components/textBoxLayout.js +58 -21
  364. package/es/src/components/textBoxPath.js +73 -0
  365. package/es/src/components/textBoxScene.js +226 -0
  366. package/es/src/components/textBoxWords.js +70 -0
  367. package/es/src/components/textEllipsis.js +7 -0
  368. package/es/src/components/tooltipDom.js +8 -5
  369. package/es/src/fluent.js +48 -0
  370. package/es/src/shapes/Area.js +1 -0
  371. package/es/src/shapes/Bar.js +1 -0
  372. package/es/src/shapes/Box.js +1 -0
  373. package/es/src/shapes/Circle.js +1 -0
  374. package/es/src/shapes/Line.js +1 -0
  375. package/es/src/shapes/Path.js +1 -0
  376. package/es/src/shapes/Rect.js +1 -0
  377. package/es/src/shapes/Shape.js +1 -0
  378. package/es/src/shapes/Whisker.js +1 -0
  379. package/es/src/utils/BaseClass.js +30 -12
  380. package/es/src/utils/configPrep.js +2 -1
  381. package/es/src/utils/configValue.js +9 -0
  382. package/es/src/utils/constant.js +13 -1
  383. package/es/src/utils/displayName.js +12 -0
  384. package/es/src/utils/theme.js +190 -0
  385. package/es/src/utils/themeInk.js +68 -0
  386. package/package.json +14 -11
  387. package/types/index.d.ts +6 -2
  388. package/types/internal.d.ts +268 -9
  389. package/types/src/charts/Alluvial/aggregate.d.ts +98 -0
  390. package/types/src/charts/Alluvial/applyLayout.d.ts +67 -0
  391. package/types/src/charts/Alluvial/dimensions.d.ts +40 -0
  392. package/types/src/charts/Alluvial/emit.d.ts +9 -0
  393. package/types/src/charts/Alluvial/hover.d.ts +31 -0
  394. package/types/src/charts/Alluvial/index.d.ts +27 -0
  395. package/types/src/charts/Alluvial/layout.d.ts +70 -0
  396. package/types/src/charts/Alluvial/meta.d.ts +54 -0
  397. package/types/src/charts/Alluvial/titles.d.ts +46 -0
  398. package/types/src/charts/ArcDiagram/applyLayout.d.ts +70 -0
  399. package/types/src/charts/ArcDiagram/arcGeometry.d.ts +150 -0
  400. package/types/src/charts/ArcDiagram/arcLabels.d.ts +89 -0
  401. package/types/src/charts/ArcDiagram/arcLoops.d.ts +48 -0
  402. package/types/src/charts/ArcDiagram/emit.d.ts +24 -0
  403. package/types/src/charts/ArcDiagram/events.d.ts +29 -0
  404. package/types/src/charts/ArcDiagram/index.d.ts +28 -0
  405. package/types/src/charts/BubbleChart/emit.d.ts +20 -0
  406. package/types/src/charts/BubbleChart/index.d.ts +16 -0
  407. package/types/src/charts/Chord/applyLayout.d.ts +3 -0
  408. package/types/src/charts/Chord/labels.d.ts +66 -0
  409. package/types/src/charts/Donut/index.d.ts +2 -1
  410. package/types/src/charts/Gantt/applyLayout.d.ts +64 -0
  411. package/types/src/charts/Gantt/emit.d.ts +17 -0
  412. package/types/src/charts/Gantt/ganttDecor.d.ts +41 -0
  413. package/types/src/charts/Gantt/ganttGeometry.d.ts +57 -0
  414. package/types/src/charts/Gantt/ganttLabels.d.ts +41 -0
  415. package/types/src/charts/Gantt/ganttRows.d.ts +84 -0
  416. package/types/src/charts/Gantt/ganttTooltip.d.ts +57 -0
  417. package/types/src/charts/Gantt/index.d.ts +36 -0
  418. package/types/src/charts/Geomap/applyLayout.d.ts +8 -0
  419. package/types/src/charts/Geomap/basemapTheme.d.ts +2 -19
  420. package/types/src/charts/Geomap/emit.d.ts +2 -2
  421. package/types/src/charts/Geomap/flowEmit.d.ts +36 -0
  422. package/types/src/charts/Geomap/flowEvents.d.ts +20 -0
  423. package/types/src/charts/Geomap/flowFields.d.ts +7 -0
  424. package/types/src/charts/Geomap/flowGeometry.d.ts +91 -0
  425. package/types/src/charts/Geomap/flowLinks.d.ts +97 -0
  426. package/types/src/charts/Geomap/geoCache.d.ts +47 -0
  427. package/types/src/charts/Geomap/globeKeys.d.ts +41 -0
  428. package/types/src/charts/Geomap/globeRotate.d.ts +70 -0
  429. package/types/src/charts/Geomap/index.d.ts +3 -0
  430. package/types/src/charts/Geomap/pointLabels.d.ts +24 -0
  431. package/types/src/charts/Hexbin/binning.d.ts +64 -0
  432. package/types/src/charts/Hexbin/buffer.d.ts +18 -0
  433. package/types/src/charts/Hexbin/contourLabels.d.ts +95 -0
  434. package/types/src/charts/Hexbin/contours.d.ts +48 -0
  435. package/types/src/charts/Hexbin/emit.d.ts +23 -0
  436. package/types/src/charts/Hexbin/index.d.ts +25 -0
  437. package/types/src/charts/Hexbin/layers.d.ts +94 -0
  438. package/types/src/charts/Hexbin/settings.d.ts +122 -0
  439. package/types/src/charts/Hexbin/tooltip.d.ts +26 -0
  440. package/types/src/charts/Histogram/binData.d.ts +20 -1
  441. package/types/src/charts/Histogram/index.d.ts +3 -2
  442. package/types/src/charts/Histogram/labels.d.ts +7 -0
  443. package/types/src/charts/Marimekko/index.d.ts +2 -1
  444. package/types/src/charts/Matrix/applyLayout.d.ts +4 -2
  445. package/types/src/charts/Network/applyLayout.d.ts +11 -0
  446. package/types/src/charts/Network/bundle.d.ts +69 -0
  447. package/types/src/charts/Network/clusterLabels.d.ts +112 -0
  448. package/types/src/charts/Network/clusters.d.ts +115 -0
  449. package/types/src/charts/Network/graph.d.ts +73 -0
  450. package/types/src/charts/Network/graphFluent.d.ts +20 -0
  451. package/types/src/charts/Network/minNodeDistance.d.ts +18 -0
  452. package/types/src/charts/Network/polygonRows.d.ts +29 -0
  453. package/types/src/charts/Pack/applyLayout.d.ts +2 -0
  454. package/types/src/charts/Pack/groupRows.d.ts +46 -0
  455. package/types/src/charts/Pack/index.d.ts +3 -0
  456. package/types/src/charts/Pack/neutralPaint.d.ts +14 -0
  457. package/types/src/charts/Pack/nodeNames.d.ts +23 -0
  458. package/types/src/charts/ParallelCoordinates/chrome.d.ts +12 -0
  459. package/types/src/charts/ParallelCoordinates/index.d.ts +1 -0
  460. package/types/src/charts/ParallelCoordinates/titles.d.ts +7 -2
  461. package/types/src/charts/Pie/applyLayout.d.ts +31 -3
  462. package/types/src/charts/Pie/arcFit.d.ts +63 -0
  463. package/types/src/charts/Pie/curvedLabels.d.ts +57 -0
  464. package/types/src/charts/Pie/labelRoom.d.ts +83 -0
  465. package/types/src/charts/Pie/outsideLabels.d.ts +119 -0
  466. package/types/src/charts/Pie/outsideNodes.d.ts +93 -0
  467. package/types/src/charts/Pie/pieLabels.d.ts +85 -0
  468. package/types/src/charts/Pie/sectorBox.d.ts +95 -0
  469. package/types/src/charts/Pie/straightLabels.d.ts +24 -0
  470. package/types/src/charts/Pie/straightLayout.d.ts +88 -0
  471. package/types/src/charts/Plot/alongLegend.d.ts +42 -0
  472. package/types/src/charts/Plot/areaEnter.d.ts +34 -0
  473. package/types/src/charts/Plot/areaLabelsAlong.d.ts +119 -0
  474. package/types/src/charts/Plot/axisValues.d.ts +24 -0
  475. package/types/src/charts/Plot/barWidth.d.ts +38 -4
  476. package/types/src/charts/Plot/circleLabels.d.ts +29 -0
  477. package/types/src/charts/Plot/connectGaps.d.ts +99 -0
  478. package/types/src/charts/Plot/connectGapsScene.d.ts +55 -0
  479. package/types/src/charts/Plot/forecastScene.d.ts +5 -0
  480. package/types/src/charts/Plot/index.d.ts +16 -15
  481. package/types/src/charts/Plot/lineLabelEmit.d.ts +48 -0
  482. package/types/src/charts/Plot/lineLabelSides.d.ts +50 -0
  483. package/types/src/charts/Plot/lineLabelSpread.d.ts +15 -0
  484. package/types/src/charts/Plot/lineLabelsAlong.d.ts +116 -0
  485. package/types/src/charts/Plot/lineMarkerKeys.d.ts +11 -0
  486. package/types/src/charts/Plot/pipeline.d.ts +15 -1
  487. package/types/src/charts/Plot/pipelineLineLabels.d.ts +68 -0
  488. package/types/src/charts/Plot/plotFacet.d.ts +5 -0
  489. package/types/src/charts/Plot/plotInit.d.ts +14 -0
  490. package/types/src/charts/Plot/plotRangeBreaks.d.ts +35 -0
  491. package/types/src/charts/Plot/referenceDomains.d.ts +49 -0
  492. package/types/src/charts/Plot/shapeLabelLegend.d.ts +19 -0
  493. package/types/src/charts/Plot/sharedTooltip.d.ts +7 -1
  494. package/types/src/charts/Plot/stackLegendOrder.d.ts +83 -0
  495. package/types/src/charts/Plot/trendLabels.d.ts +73 -0
  496. package/types/src/charts/Plot/trendTooltip.d.ts +6 -0
  497. package/types/src/charts/Priestley/timeAxis.d.ts +79 -0
  498. package/types/src/charts/Pyramid/gutter.d.ts +28 -6
  499. package/types/src/charts/Pyramid/scene.d.ts +1 -1
  500. package/types/src/charts/Radar/applyLayout.d.ts +2 -3
  501. package/types/src/charts/Radar/axisDecorations.d.ts +12 -4
  502. package/types/src/charts/Radar/curvedLabels.d.ts +129 -0
  503. package/types/src/charts/Radar/emit.d.ts +5 -2
  504. package/types/src/charts/Radar/index.d.ts +7 -2
  505. package/types/src/charts/Radar/points.d.ts +50 -0
  506. package/types/src/charts/RadialBar/curvedLabels.d.ts +31 -0
  507. package/types/src/charts/RadialBar/trackLayout.d.ts +34 -3
  508. package/types/src/charts/RadialMatrix/applyLayout.d.ts +6 -4
  509. package/types/src/charts/Rings/emit.d.ts +72 -0
  510. package/types/src/charts/Rings/index.d.ts +4 -2
  511. package/types/src/charts/Rings/ringsCurves.d.ts +50 -0
  512. package/types/src/charts/Rings/ringsGraph.d.ts +39 -7
  513. package/types/src/charts/Rings/ringsLoops.d.ts +13 -0
  514. package/types/src/charts/Rings/ringsParallel.d.ts +45 -0
  515. package/types/src/charts/Rings/ringsPlacement.d.ts +47 -0
  516. package/types/src/charts/Rings/ringsSizing.d.ts +36 -9
  517. package/types/src/charts/Sankey/circularLayout.d.ts +103 -0
  518. package/types/src/charts/Sankey/circularLinks.d.ts +178 -0
  519. package/types/src/charts/Sankey/emit.d.ts +58 -0
  520. package/types/src/charts/Sankey/labels.d.ts +19 -0
  521. package/types/src/charts/Sankey/ribbons.d.ts +36 -0
  522. package/types/src/charts/Sankey/sankeyCycles.d.ts +24 -0
  523. package/types/src/charts/Sankey/sankeyLayout.d.ts +6 -0
  524. package/types/src/charts/Sankey/sankeyLinks.d.ts +36 -0
  525. package/types/src/charts/Scatter/index.d.ts +15 -0
  526. package/types/src/charts/SlopeChart/index.d.ts +43 -0
  527. package/types/src/charts/SlopeChart/slope.d.ts +43 -0
  528. package/types/src/charts/Streamgraph/index.d.ts +28 -0
  529. package/types/src/charts/Sunburst/curvedLabels.d.ts +56 -0
  530. package/types/src/charts/Tree/applyLayout.d.ts +20 -0
  531. package/types/src/charts/Tree/keys.d.ts +25 -0
  532. package/types/src/charts/Tree/nodeLabel.d.ts +11 -0
  533. package/types/src/charts/definition/ChartDefinition.d.ts +26 -0
  534. package/types/src/charts/definition/makeChart.d.ts +3 -2
  535. package/types/src/charts/drawSteps/backControl.d.ts +7 -22
  536. package/types/src/charts/drawSteps/gestureHover.d.ts +33 -0
  537. package/types/src/charts/drawSteps/minimapMarkup.d.ts +5 -4
  538. package/types/src/charts/drawSteps/tableViewMarkup.d.ts +3 -1
  539. package/types/src/charts/drawSteps/zoomActions.d.ts +30 -0
  540. package/types/src/charts/drawSteps/zoomControls.d.ts +15 -0
  541. package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +16 -1
  542. package/types/src/charts/drawSteps/zoomDrag.d.ts +71 -0
  543. package/types/src/charts/drawSteps/zoomFit.d.ts +30 -0
  544. package/types/src/charts/drawSteps/zoomGesture.d.ts +32 -0
  545. package/types/src/charts/events/click.legend.d.ts +2 -1
  546. package/types/src/charts/facet/facetConfig.d.ts +4 -2
  547. package/types/src/charts/features/annotationFrame.d.ts +108 -0
  548. package/types/src/charts/features/annotationText.d.ts +57 -0
  549. package/types/src/charts/features/annotationTypes.d.ts +161 -0
  550. package/types/src/charts/features/axesMeasure.d.ts +4 -0
  551. package/types/src/charts/features/axisTooltip.d.ts +49 -0
  552. package/types/src/charts/features/calloutLayout.d.ts +78 -0
  553. package/types/src/charts/features/calloutScene.d.ts +40 -0
  554. package/types/src/charts/features/centerLabel.d.ts +75 -0
  555. package/types/src/charts/features/chartGeometry.d.ts +1 -1
  556. package/types/src/charts/features/circleLabelPlacement.d.ts +97 -0
  557. package/types/src/charts/features/circleLabels.d.ts +130 -0
  558. package/types/src/charts/features/colorScaleBivariate.d.ts +50 -0
  559. package/types/src/charts/features/colorScaleBucket.d.ts +10 -0
  560. package/types/src/charts/features/colorScaleHover.d.ts +13 -3
  561. package/types/src/charts/features/colorScaleLimit.d.ts +60 -0
  562. package/types/src/charts/features/colorScaleTooltip.d.ts +43 -0
  563. package/types/src/charts/features/colorScaleTop.d.ts +30 -0
  564. package/types/src/charts/features/colorScaleValue.d.ts +35 -0
  565. package/types/src/charts/features/curvedArrows.d.ts +119 -0
  566. package/types/src/charts/features/depthKey.d.ts +19 -0
  567. package/types/src/charts/features/edgeArrows.d.ts +103 -4
  568. package/types/src/charts/features/edgeBundling.d.ts +86 -0
  569. package/types/src/charts/features/edgeBundlingSmooth.d.ts +29 -0
  570. package/types/src/charts/features/ensureZoomDom.d.ts +19 -1
  571. package/types/src/charts/features/featuresLegend.d.ts +4 -3
  572. package/types/src/charts/features/hoverTicks.d.ts +30 -0
  573. package/types/src/charts/features/idleQueue.d.ts +46 -0
  574. package/types/src/charts/features/legendKeys.d.ts +34 -0
  575. package/types/src/charts/features/lineLabels.d.ts +15 -12
  576. package/types/src/charts/features/linkBundle.d.ts +16 -0
  577. package/types/src/charts/features/linkColor.d.ts +48 -0
  578. package/types/src/charts/features/linkFields.d.ts +16 -0
  579. package/types/src/charts/features/linkFocus.d.ts +51 -0
  580. package/types/src/charts/features/linkInteraction.d.ts +192 -0
  581. package/types/src/charts/features/linkKeys.d.ts +11 -0
  582. package/types/src/charts/features/linkLabelGeometry.d.ts +67 -0
  583. package/types/src/charts/features/linkLabelPath.d.ts +85 -0
  584. package/types/src/charts/features/linkLabels.d.ts +77 -0
  585. package/types/src/charts/features/linkWidths.d.ts +19 -0
  586. package/types/src/charts/features/networkMeasures.d.ts +53 -0
  587. package/types/src/charts/features/nodeStats.d.ts +93 -0
  588. package/types/src/charts/features/pathLabelGeometry.d.ts +99 -0
  589. package/types/src/charts/features/pathLabels.d.ts +41 -0
  590. package/types/src/charts/features/plotAnnotations.d.ts +23 -8
  591. package/types/src/charts/features/plotEndLabels.d.ts +14 -1
  592. package/types/src/charts/features/plotPaint.d.ts +17 -0
  593. package/types/src/charts/features/polyline.d.ts +32 -0
  594. package/types/src/charts/features/referenceAnnotations.d.ts +130 -0
  595. package/types/src/charts/features/referenceLabelPlacement.d.ts +58 -0
  596. package/types/src/charts/features/ringLabelNodes.d.ts +63 -0
  597. package/types/src/charts/features/ringLabels.d.ts +164 -0
  598. package/types/src/charts/features/sceneBounds.d.ts +6 -0
  599. package/types/src/charts/features/selfLoops.d.ts +165 -0
  600. package/types/src/charts/features/shapeEmit.d.ts +3 -1
  601. package/types/src/charts/features/sharedFields.d.ts +11 -2
  602. package/types/src/charts/features/textHalo.d.ts +15 -0
  603. package/types/src/charts/index.d.ts +8 -0
  604. package/types/src/charts/partition/chartFields.d.ts +6 -1
  605. package/types/src/charts/partition/interaction.d.ts +6 -3
  606. package/types/src/charts/partition/zoom.d.ts +4 -4
  607. package/types/src/charts/pipeline/insetPlacement.d.ts +6 -0
  608. package/types/src/charts/pipeline/preDrawData.d.ts +14 -1
  609. package/types/src/charts/pipeline/stages.d.ts +7 -0
  610. package/types/src/charts/plotBuffers/discreteBuffer.d.ts +0 -5
  611. package/types/src/charts/polar/chrome.d.ts +19 -6
  612. package/types/src/charts/viz/Viz.d.ts +25 -4
  613. package/types/src/charts/viz/VizBase.d.ts +37 -8
  614. package/types/src/charts/viz/backgroundInk.d.ts +19 -4
  615. package/types/src/charts/viz/emphasis.d.ts +17 -0
  616. package/types/src/charts/viz/fillStroke.d.ts +7 -0
  617. package/types/src/charts/viz/focusRing.d.ts +25 -0
  618. package/types/src/charts/viz/focusTargets.d.ts +56 -0
  619. package/types/src/charts/viz/history.d.ts +35 -0
  620. package/types/src/charts/viz/keyboardNav.d.ts +55 -0
  621. package/types/src/charts/viz/keyboardNavHost.d.ts +53 -0
  622. package/types/src/charts/viz/loaderFormat.d.ts +78 -0
  623. package/types/src/charts/viz/mountTarget.d.ts +7 -0
  624. package/types/src/charts/viz/nearestHover.d.ts +75 -0
  625. package/types/src/charts/viz/nearestHoverSurface.d.ts +21 -0
  626. package/types/src/charts/viz/ordinalColor.d.ts +10 -8
  627. package/types/src/charts/viz/pageTheme.d.ts +34 -0
  628. package/types/src/charts/viz/pointTooltipAnchor.d.ts +36 -0
  629. package/types/src/charts/viz/pointVoronoi.d.ts +65 -0
  630. package/types/src/charts/viz/reducedMotion.d.ts +25 -0
  631. package/types/src/charts/viz/reportDrawError.d.ts +12 -0
  632. package/types/src/charts/viz/setCursor.d.ts +26 -0
  633. package/types/src/charts/viz/tooltipEnabled.d.ts +31 -0
  634. package/types/src/charts/viz/userClick.d.ts +35 -0
  635. package/types/src/charts/viz/vizDefaults.d.ts +0 -9
  636. package/types/src/charts/viz/vizFields.d.ts +37 -0
  637. package/types/src/charts/viz/vizRender.d.ts +2 -1
  638. package/types/src/charts/viz/vizTheme.d.ts +40 -0
  639. package/types/src/charts/viz/vizTypes.d.ts +100 -7
  640. package/types/src/charts/viz/vizVisibility.d.ts +13 -0
  641. package/types/src/components/Axis/Axis.d.ts +34 -3
  642. package/types/src/components/Axis/AxisBottom.d.ts +1 -0
  643. package/types/src/components/Axis/AxisLeft.d.ts +1 -0
  644. package/types/src/components/Axis/AxisRight.d.ts +1 -0
  645. package/types/src/components/Axis/AxisTop.d.ts +1 -0
  646. package/types/src/components/Axis/axisBreak.d.ts +21 -3
  647. package/types/src/components/Axis/axisDefaults.d.ts +12 -0
  648. package/types/src/components/Axis/axisLabelKinds.d.ts +22 -0
  649. package/types/src/components/Axis/axisLabelLineHeight.d.ts +27 -0
  650. package/types/src/components/Axis/axisLabelRoom.d.ts +17 -0
  651. package/types/src/components/Axis/axisLabelSize.d.ts +82 -0
  652. package/types/src/components/Axis/axisLabelThinning.d.ts +38 -2
  653. package/types/src/components/Axis/axisLayout.d.ts +9 -2
  654. package/types/src/components/Axis/axisLayoutLabels.d.ts +28 -33
  655. package/types/src/components/Axis/axisLayoutScale.d.ts +3 -1
  656. package/types/src/components/Axis/axisLimit.d.ts +18 -0
  657. package/types/src/components/Axis/axisMaxSize.d.ts +48 -0
  658. package/types/src/components/Axis/axisRangeBreaks.d.ts +25 -0
  659. package/types/src/components/Axis/axisRounding.d.ts +8 -0
  660. package/types/src/components/Axis/axisTitle.d.ts +30 -0
  661. package/types/src/components/Axis/axisTooltipTargets.d.ts +82 -0
  662. package/types/src/components/Axis/brokenTimeScale.d.ts +51 -0
  663. package/types/src/components/Axis/rangeBreaks.d.ts +82 -0
  664. package/types/src/components/Axis/timeValues.d.ts +1 -1
  665. package/types/src/components/ColorScale/ColorScale.d.ts +22 -11
  666. package/types/src/components/ColorScale/bivariateRender.d.ts +53 -0
  667. package/types/src/components/ColorScale/bivariateScale.d.ts +92 -0
  668. package/types/src/components/ColorScale/bucketBounds.d.ts +15 -1
  669. package/types/src/components/ColorScale/colorScaleSwatchTooltips.d.ts +48 -0
  670. package/types/src/components/Legend/Legend.d.ts +6 -0
  671. package/types/src/components/Legend/legendCut.d.ts +31 -0
  672. package/types/src/components/Legend/legendRender.d.ts +6 -1
  673. package/types/src/components/SizeLegend/SizeLegend.d.ts +1 -0
  674. package/types/src/components/TextBox.d.ts +5 -0
  675. package/types/src/components/Timeline/Timeline.d.ts +1 -0
  676. package/types/src/components/Timeline/timelineConfig.d.ts +5 -0
  677. package/types/src/components/Timeline/timelineMode.d.ts +17 -0
  678. package/types/src/components/Tooltip.d.ts +4 -3
  679. package/types/src/components/fontStack.d.ts +10 -0
  680. package/types/src/components/textBoxLayout.d.ts +18 -9
  681. package/types/src/components/textBoxPath.d.ts +59 -0
  682. package/types/src/components/textBoxScene.d.ts +51 -0
  683. package/types/src/components/textBoxWords.d.ts +33 -0
  684. package/types/src/components/textEllipsis.d.ts +6 -0
  685. package/types/src/fluent.d.ts +18 -0
  686. package/types/src/shapes/Area.d.ts +1 -0
  687. package/types/src/shapes/Bar.d.ts +1 -0
  688. package/types/src/shapes/Box.d.ts +1 -0
  689. package/types/src/shapes/Circle.d.ts +1 -0
  690. package/types/src/shapes/Line.d.ts +1 -0
  691. package/types/src/shapes/Path.d.ts +1 -0
  692. package/types/src/shapes/Rect.d.ts +1 -0
  693. package/types/src/shapes/Shape.d.ts +1 -0
  694. package/types/src/shapes/Whisker.d.ts +1 -0
  695. package/types/src/shapes/emitLabels.d.ts +1 -1
  696. package/types/src/utils/BaseClass.d.ts +9 -0
  697. package/types/src/utils/D3plusConfig.d.ts +1093 -266
  698. package/types/src/utils/configPrep.d.ts +2 -0
  699. package/types/src/utils/configValue.d.ts +8 -0
  700. package/types/src/utils/constant.d.ts +8 -0
  701. package/types/src/utils/displayName.d.ts +10 -0
  702. package/types/src/utils/index.d.ts +1 -1
  703. package/types/src/utils/theme.d.ts +170 -0
  704. package/types/src/utils/themeInk.d.ts +56 -0
  705. package/types/umd-entry.d.ts +4 -0
  706. package/umd/d3plus-core.full.js +72239 -41465
  707. package/umd/d3plus-core.full.min.js +2 -2
  708. package/umd/d3plus-core.js +46249 -19519
  709. package/umd/d3plus-core.min.js +2 -2
  710. package/es/src/components/Axis/gridStroke.js +0 -10
  711. package/types/src/components/Axis/gridStroke.d.ts +0 -8
@@ -2,16 +2,27 @@ import type { ColorDefaults } from "@d3plus/color";
2
2
  import type { DataPoint } from "@d3plus/data";
3
3
  import type VizBase from "../charts/viz/VizBase.js";
4
4
  import type { LinkOption } from "../charts/viz/linkGroup.js";
5
+ import type { BarShareInfo } from "../charts/Plot/barWidth.js";
6
+ import type { ConnectGaps } from "../charts/Plot/connectGaps.js";
7
+ import type { SlopeColorSetting } from "../charts/SlopeChart/slope.js";
8
+ import type { LineLabelConfig, LineLabelsSetting } from "../charts/Plot/lineLabelSides.js";
5
9
  import type { FacetConfig } from "../charts/facet/facetConfig.js";
6
10
  import type { BrushSelection } from "../charts/ParallelCoordinates/brushFilter.js";
7
11
  import type { DimensionOptions } from "../charts/ParallelCoordinates/dimensions.js";
12
+ import type { AlluvialDimensionInput } from "../charts/Alluvial/dimensions.js";
8
13
  import type { AccessorFn } from "./AccessorFn.js";
14
+ import type { ThemeSetting } from "./theme.js";
9
15
  import type { ConstOrAccessor, CssColor, Orient, SideOrient } from "../shapes/shapeConfig.js";
10
16
  import type { SizeLegendLineConfig, SizeLegendShapeConfig, SizeLegendTextConfig } from "../components/SizeLegend/SizeLegend.js";
11
17
  import type { SizeLegendScale, SizeLegendSize } from "../components/SizeLegend/sizeLegendLayout.js";
12
18
  import type { ColorScaleTypeSetting } from "../components/ColorScale/colorScaleType.js";
13
19
  import type { ColorScaleHoverMarkConfig } from "../components/ColorScale/colorScaleHoverMark.js";
20
+ import type { ReferenceBandConfig, ReferenceLineConfig } from "../charts/features/annotationTypes.js";
21
+ import type { RangeBreakRule } from "../components/Axis/rangeBreaks.js";
22
+ import type { BinValueOption, ContourConfig, ContoursOption, PointConfig } from "../charts/Hexbin/settings.js";
14
23
  type Position = "top" | "right" | "bottom" | "left";
24
+ /** One variable of a bivariate `colorScale`: a data key, or an accessor returning a number. */
25
+ export type ColorScaleField = string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]);
15
26
  /** A legend or colorScale side, or `"auto"` to let the chart choose (inside the chart when it fits, else right on wide charts and bottom otherwise). */
16
27
  type PanelPosition = Position | "auto";
17
28
  type DataPointAccessor<T> = string | ((d: DataPoint) => T);
@@ -21,76 +32,63 @@ type AxisScale = "auto" | "band" | "diverging" | "divergingLog" | "divergingPow"
21
32
  export interface AxisConfig {
22
33
  barConfig?: Record<string, string | number>;
23
34
  /**
24
- The axis's domain: `[min, max]` on a continuous axis, or the
25
- categories to show on a discrete one. A full domain is drawn exactly
26
- as given unless this axis config's `rounding` says otherwise, just as
27
- on an Axis. In a Plot's axis configs it is a lower-level override than
28
- `xDomain`/`yDomain`: it wins over them, isn't stretched to the
29
- chart's `baseline`, and isn't rounded by Plot's own "outside"
30
- default. In `xConfig`/`yConfig`, one with a single end set (`[min]`
31
- or `[undefined, max]`) on a continuous axis works exactly like
32
- `yDomain([min])` instead: it pins that end, and the data fills the
33
- other, rounded as `rounding` says.
35
+ The axis's domain: `[min, max]` on a continuous axis, or the categories
36
+ to show on a discrete one. In a Plot it overrides `xDomain`/`yDomain`
37
+ and isn't rounded unless `rounding` says so; a single end (`[min]` or
38
+ `[undefined, max]`) pins that end like `yDomain([min])`.
34
39
  */
35
40
  domain?: (number | string | Date | undefined)[];
36
41
  /**
37
- The value the axis's `baselineBreak` returns to: the tick kept below
38
- (or above) the break. Defaults to `0`. To start a Plot's value axis at
39
- a value, set the chart's `baseline` instead, which sets the axis's
40
- minimum exactly like `yDomain([n])`, break back to this tick included.
42
+ The tick the axis's `baselineBreak` returns to. Defaults to `0`. To start
43
+ a Plot's value axis at a value, set the chart's `baseline` instead.
41
44
  */
42
45
  baseline?: number;
43
46
  /**
44
- When the domain of a linear value axis stops short of the `baseline`
45
- (e.g. `[1100, 2100]` with a baseline of `0`), keeps the baseline as the
46
- axis's end tick and breaks the axis between it and the domain: a short
47
- stretch of axis holds the baseline tick and two tilted marks with a gap
48
- in the axis line, then the domain spans the rest. Style it with the
49
- axis's `baselineBreakConfig`. In a Plot it applies to a user-supplied
50
- value domain (`yDomain`/`yConfig.domain`, or the x versions for
51
- horizontal charts), and bars and areas start at the baseline tick,
52
- with the break's gap cut across them (`baselineBreakConfig`'s
53
- `mask`); turned off, a `yDomain` stretches to reach the baseline while a
54
- `yConfig.domain` is kept and cuts its bars off at the axis. Defaults
55
- to `true` for the Plots whose marks grow from `0`, such as BarChart,
56
- AreaPlot, Histogram, and Lollipop (each chart lists its own default),
57
- and `false` for other Plots and a standalone Axis.
47
+ When a linear value axis's domain stops short of the `baseline` (e.g.
48
+ `[1100, 2100]` with a baseline of `0`), keeps the baseline tick and
49
+ breaks the axis between it and the domain, styled by
50
+ `baselineBreakConfig`. Turned off, a Plot's `yDomain` stretches to the
51
+ baseline instead. Defaults to `true` for Plots whose marks grow from `0`
52
+ (BarChart, AreaPlot, Histogram, Lollipop), else `false`.
58
53
  */
59
54
  baselineBreak?: boolean;
60
55
  /**
61
- Style of the baseline break: `space` (pixels of axis between the baseline
62
- tick and the first tick after the break, default `36`), `gap` (pixels
63
- between the two marks, where the axis line is not drawn, default `5`),
64
- `size` (length of each mark, drawn outward from the axis line on the
65
- tick side so it never reaches into the plot, default `10`), `angle`
66
- (degrees each mark tilts from perpendicular to the axis, default `30`),
67
- `lines` (whether a Plot runs a straight line across the plot from the
68
- foot of each mark, perpendicular to the axis, default `true`; they take
69
- the axis line's `barConfig` style), `lineConfig` (those lines'
70
- `stroke`, `stroke-width`, and other line styles, layered over the axis
71
- line style), `mask` (whether a Plot cuts the gap between the two
72
- lines straight across the shapes, default `true`), plus `stroke`,
73
- `stroke-width`, and the other line styles `barConfig` takes, for the
74
- marks.
56
+ Style of the baseline break: `space` (axis pixels between the baseline
57
+ tick and the domain, default `36`), `gap` (pixels between the two marks,
58
+ default `5`), `size` (mark length, default `10`), `angle` (mark tilt in
59
+ degrees, default `30`), `lines` (whether a Plot draws lines across the
60
+ plot at the break, default `true`), `lineConfig` (their style), `mask`
61
+ (whether a Plot cuts the gap across its shapes, default `true`), and
62
+ `stroke`, `stroke-width`, and other line styles for the marks.
75
63
  */
76
64
  baselineBreakConfig?: Record<string, string | number | boolean | Record<string, string | number>>;
77
65
  /**
78
- Value ranges to remove from a linear axis: one `[start, end]` pair, or a
79
- list of them (`[[start, end], [start, end]]`). Each range collapses to a
80
- short fixed gap in the axis, marked like the baseline break, with no
81
- ticks or gridlines inside it and both of its edges labeled; the values
82
- on either side keep one shared scale. Reversed pairs are flipped,
83
- overlapping ones merged, and ranges that don't lie strictly inside the
84
- domain (or that don't leave room for the data) are ignored. Only
85
- positions change — tooltips and labels still show the real values.
66
+ Value ranges to remove from a linear axis: one `[start, end]` pair or a
67
+ list of them. Each collapses to a short marked gap (styled by
68
+ `breakConfig`); values either side share one scale, and tooltips still
69
+ show real values. Ranges outside the domain are ignored.
86
70
  */
87
71
  break?: false | [number, number] | [number, number][];
88
72
  /**
89
73
  Style of the ranges set with `break`: the same `space`, `gap`, `size`,
90
74
  `angle`, `lines`, `lineConfig`, `mask`, and mark line styles, with the
91
- same defaults, as `baselineBreakConfig`.
75
+ same defaults, as `baselineBreakConfig`, plus `spaceMin`: the least
76
+ `space` a break shrinks to on an axis too short for it (by default it
77
+ is dropped instead).
92
78
  */
93
79
  breakConfig?: Record<string, string | number | boolean | Record<string, string | number>>;
80
+ /**
81
+ Stretches of time to hide from a time axis (weekends, nights, holidays),
82
+ so the data closes up around them: one rule or a list of them.
83
+ `"weekends"`; `{days: [5, 6]}` (0 is Sunday); `{hours: [17, 9]}`, daily,
84
+ wrapping past midnight (`9.5` is 9:30); `{values: [date, …]}`, whole
85
+ days; or `{bounds: [start, end]}`, one range. Rules use local time. A
86
+ rule's `marker` draws the `break` marker at the gap (on by default for
87
+ `bounds` only).
88
+ @example
89
+ {rangeBreaks: ["weekends", {hours: [16, 9.5]}, {values: ["2024-07-04"]}]}
90
+ */
91
+ rangeBreaks?: false | RangeBreakRule | RangeBreakRule[];
94
92
  /** Grid values of the axis. */
95
93
  grid?: unknown[];
96
94
  gridConfig?: Record<string, string | number>;
@@ -106,15 +104,10 @@ export interface AxisConfig {
106
104
  labels?: unknown[];
107
105
  labelOffset?: false | number;
108
106
  /**
109
- Whether to rotate the axis labels, and by how much: `true` rotates
110
- them -90 degrees, `false` keeps them flat, and a number rotates them
111
- by that many degrees (clockwise, so `-45` rises to the right), each
112
- label hanging off the axis from the end of its text nearest the axis,
113
- across from its tick, and wrapping onto up to three lines when its
114
- neighbors leave room. Left `undefined` (the default), a horizontal
115
- axis of categories slants its labels 30 degrees when they would not
116
- fit flat, or stands them at -90 when they are too crowded to slant.
117
- See Axis's `labelRotation`.
107
+ Whether to rotate the axis labels: `true` rotates them -90 degrees,
108
+ `false` keeps them flat, and a number rotates them that many degrees
109
+ clockwise (`-45` rises to the right). Unset (the default), a horizontal
110
+ axis of categories slants its labels when they don't fit flat.
118
111
  */
119
112
  labelRotation?: boolean | number;
120
113
  /**
@@ -123,8 +116,18 @@ export interface AxisConfig {
123
116
  line; zooming pins a rescaled axis this way so it doesn't shift.
124
117
  */
125
118
  fixedSize?: number;
126
- /** Maximum size allowed for the space that contains the axis tick labels and title. */
127
- maxSize?: number;
119
+ /**
120
+ Maximum size allowed for the space that contains the axis tick labels
121
+ and title: a number of pixels, or a function that is given the room the
122
+ axis has across its labels and returns that maximum. The room is a
123
+ horizontal axis's `height` or a vertical axis's `width`; in a chart, it
124
+ is the chart's height (for a horizontal axis) or width (for a vertical
125
+ one) inside its margins. A chart can call the function more than once
126
+ in a draw, so it should depend only on its argument.
127
+ @example
128
+ {maxSize: size => size / 3}
129
+ */
130
+ maxSize?: number | ((size: number) => number);
128
131
  /** Minimum size alloted for the space that contains the axis tick labels and title. */
129
132
  minSize?: number;
130
133
  /**
@@ -139,18 +142,11 @@ export interface AxisConfig {
139
142
  */
140
143
  rotatedTickFormat?: (d: number | string) => string | number;
141
144
  /**
142
- How a linear or log axis rounds its domain to "nice" values:
143
- "outside" widens each end past the data, "inside" pulls each end in
144
- (marking them with the `roundingInside*` prefixes and suffixes), and
145
- "none" keeps the domain as given. Defaults to "none" on an Axis; a
146
- Plot rounds "outside" unless its axis config says otherwise or sets a
147
- full `domain`, which is rounded only when asked for here. With a
148
- user domain on a Plot (`xDomain`/`yDomain`, `baseline`, or a
149
- one-sided `domain` here) only an end left open is rounded:
150
- `yDomain([n])` keeps `n` exactly and rounds the far end where the
151
- axis would with no domain set, and "none" leaves that end at the
152
- data. A `yDomain` with both ends set isn't rounded unless `rounding`
153
- is set here.
145
+ How a linear or log axis rounds its domain to "nice" values: "outside"
146
+ widens each end past the data, "inside" pulls each end in, and "none"
147
+ keeps it as given. Defaults to "none" on an Axis and "outside" in a
148
+ Plot. A Plot only rounds the ends a user domain leaves open, unless
149
+ `rounding` is set here.
154
150
  */
155
151
  rounding?: "none" | "outside" | "inside";
156
152
  /** Scale of the axis. */
@@ -197,11 +193,62 @@ export interface AxisConfig {
197
193
  [d3-time-format](https://github.com/d3/d3-time-format/blob/master/README.md#timeFormatLocale)).
198
194
  */
199
195
  timeLocale?: Record<string, unknown>;
196
+ /**
197
+ The tooltip shown when a tick label is hovered, in a chart: its text
198
+ (the same on every tick), a function that receives the tick's value (as
199
+ `tickFormat` does) and its index and returns the text, or a tooltip
200
+ config (as `tooltipConfig`) whose accessors receive the same. The index
201
+ counts the axis's labels from the start of its domain (0 is the bottom
202
+ label of a y axis, the left one of an x axis). Unset (the default) or
203
+ when the function returns nothing, a label cut short with an ellipsis
204
+ shows its whole text; `false`, set or returned, shows no tooltip.
205
+ @example
206
+ {tickTooltip: value => notes[value]}
207
+ */
208
+ tickTooltip?: string | ((value: number | string, index: number) => string | false | void) | AxisTooltipConfig<[value: number | string, index: number]> | false;
200
209
  /** Title of the axis. */
201
210
  title?: string;
202
211
  /** Title configuration of the axis. */
203
212
  titleConfig?: Record<string, unknown>;
213
+ /**
214
+ The tooltip shown when the axis title is hovered, in a chart: the
215
+ tooltip's text, a function that receives the title and returns it, or a
216
+ tooltip config (as `tooltipConfig`) whose accessors receive the title.
217
+ Unset (the default) or when the function returns nothing, a title cut
218
+ short with an ellipsis shows its whole text; `false`, set or returned,
219
+ shows no tooltip.
220
+ @example
221
+ {title: "GDP per capita", titleTooltip: "Constant 2015 US$"}
222
+ */
223
+ titleTooltip?: string | ((title: string) => string | false | void) | AxisTooltipConfig<[title: string]> | false;
224
+ }
225
+ /**
226
+ The `groupBy` levels a `tooltip` accessor receives as its third argument,
227
+ and whether it is asked about a legend entry.
228
+ */
229
+ export interface TooltipLevels {
230
+ /**
231
+ The `groupBy` level, from 0, the hovered item stands for: the level the
232
+ chart draws, or the item's own level where a chart draws several at
233
+ once (a Sunburst or Icicle node, a Tree node, a Treemap group header).
234
+ A legend entry stands for the level its label is read from.
235
+ */
236
+ depth: number;
237
+ /** The deepest `groupBy` level: `groupBy.length - 1`. */
238
+ maxDepth: number;
239
+ /** Whether the hovered item is a legend entry, not a mark. */
240
+ legend: boolean;
204
241
  }
242
+ /** `T` with every accessor in it called with `Args`. */
243
+ type WithAccessorArgs<T, Args extends unknown[]> = T extends (...args: never[]) => infer R ? (...args: Args) => R : T extends Array<infer U> ? Array<WithAccessorArgs<U, Args>> : T;
244
+ /**
245
+ A tooltip config for an axis label (see `titleTooltip` and
246
+ `tickTooltip`): a `TooltipConfig` whose accessors are called with `Args`
247
+ in place of a data point.
248
+ */
249
+ export type AxisTooltipConfig<Args extends unknown[]> = {
250
+ [K in keyof TooltipConfig]: WithAccessorArgs<TooltipConfig[K], Args>;
251
+ };
205
252
  export interface TooltipConfig {
206
253
  /** The inner HTML content of the arrow element, empty by default. */
207
254
  arrow?: ((d: DataPoint) => string) | string;
@@ -289,12 +336,24 @@ export interface TextBoxConfig {
289
336
  overflow?: Accessor<boolean>;
290
337
  /**
291
338
  Handles truncated lines, returning the new line value. Passed the line's
292
- text and number; by default appends an ellipsis to every line except a
293
- first word that cannot fit (which returns "").
339
+ text and number; by default drops the line's trailing periods, commas,
340
+ and spaces and appends "...", except for a first word that cannot fit
341
+ (which returns ""). The ended line is measured, and words come off its
342
+ end until it fits the box.
294
343
  */
295
344
  ellipsis?: (text: string, line: number) => string;
345
+ /**
346
+ Lets truncated text cut a word: the word that did not fit (or a first
347
+ word wider than the box) is cut to the longest start that fits with the
348
+ `ellipsis`, by whole characters, so emoji and accented letters are never
349
+ split. Defaults to `false`, which only breaks between words, and draws
350
+ nothing when the first word does not fit.
351
+ */
352
+ truncateWord?: Accessor<boolean>;
296
353
  /** The padding as a CSS shorthand string or number. Defaults to 0. */
297
354
  padding?: Accessor<string | number>;
355
+ /** The rotation of each text box, in degrees about its `rotateAnchor`. */
356
+ rotate?: Accessor<number>;
298
357
  /** The anchor point around which to rotate the text box. */
299
358
  rotateAnchor?: Accessor<[number, number]>;
300
359
  /** The word split function: given a string, returns it split into an array of words. */
@@ -307,12 +366,83 @@ export interface TextBoxConfig {
307
366
  x?: Accessor<number>;
308
367
  /** The y position (top edge) for each text box. */
309
368
  y?: Accessor<number>;
369
+ /**
370
+ The horizontal alignment of each line in its box. `"start"`,
371
+ `"middle"`, and `"end"` align lines to the box's start edge, center, or
372
+ end edge (the start is the right edge in right-to-left text).
373
+ `"justify"` spreads each line's words across the box, or its characters
374
+ in CJK text, leaving a paragraph's last line and any line that ends at a
375
+ newline start-aligned. A percentage such as `"25%"` places each line
376
+ that share of the way across the box, so `"0%"`, `"50%"`, and `"100%"`
377
+ match start, middle, and end; percentages follow the writing direction.
378
+ */
379
+ textAnchor?: Accessor<"start" | "middle" | "end" | "justify" | `${number}%`>;
380
+ /**
381
+ An SVG path `d` (or a `(datum, index)` accessor returning one) for the
382
+ text to follow, in coordinates relative to the box's `x` and `y`. The
383
+ text is drawn as one line with its baseline on the path, wrapped to the
384
+ path's length past `startOffset` (and cut short with the `ellipsis` and
385
+ `truncateWord`). `textAnchor` places it along that stretch of path:
386
+ `"middle"` centers it, `"end"` ends it at the path's end, a percentage
387
+ places it that share along, and `"justify"` reads as `"start"`, since
388
+ the one line ends its paragraph. Falsy draws the text in its box.
389
+ */
390
+ textPath?: Accessor<string | false | null>;
391
+ /**
392
+ Where along the `textPath` the text's room begins: a distance in pixels,
393
+ or a percentage of the path's length such as `"25%"`. Defaults to 0.
394
+ */
395
+ startOffset?: Accessor<number | `${number}%`>;
396
+ /**
397
+ Which side of the `textPath` the text sits on, read in the path's
398
+ direction: `"left"` (the default) follows the path as drawn, with the
399
+ text above a left-to-right path, and `"right"` follows it backwards, so
400
+ the text sits on its other side.
401
+ */
402
+ side?: Accessor<"left" | "right">;
403
+ /**
404
+ Draws a transparent rect behind each box, so a hover or click anywhere
405
+ in the box (padding included), not just on its glyphs, reaches the
406
+ box's datum. `true`, or `{padding}` (a number or CSS shorthand) to
407
+ reach further than the box. Text on a path gets the path's bounds grown
408
+ by a font size. Defaults to `false`.
409
+ */
410
+ hitbox?: Accessor<boolean | {
411
+ padding?: number | string;
412
+ }>;
413
+ /** The vertical alignment of the lines in each box. */
414
+ verticalAlign?: Accessor<"top" | "middle" | "bottom">;
415
+ /** Whether the text receives pointer events (`"none"` lets them through to what is underneath). */
416
+ pointerEvents?: Accessor<"auto" | "none">;
417
+ /**
418
+ The inline HTML tags to draw as styles: a map of tag names to CSS
419
+ declarations, `true` for the defaults (`<b>`, `<strong>`, `<i>`, `<em>`),
420
+ or `false` to draw tags as text.
421
+ */
422
+ html?: boolean | Record<string, string>;
310
423
  /** The outline text wraps within, `"square"` or `"circle"`, or a `(datum, index)` accessor. */
311
424
  shape?: "square" | "circle" | ((d: DataPoint, i: number) => "square" | "circle");
312
425
  }
313
426
  export interface TimelineConfig {
427
+ /**
428
+ The cursor shown over the timeline's brush area, where a click or drag
429
+ picks periods: a CSS cursor, or a function given how the timeline is
430
+ drawn (`"ticks"` or `"buttons"`) that returns one. Defaults to
431
+ `"pointer"`. The handles keep `ew-resize` and the selected range
432
+ `move`; `handleConfig` and `selectionConfig` take a `cursor` too.
433
+ @example
434
+ {brushCursor: mode => (mode === "buttons" ? "pointer" : "crosshair")}
435
+ */
436
+ brushCursor?: string | ((mode: "ticks" | "buttons") => string);
314
437
  /** Brush event filter. */
315
438
  brushFilter?: () => boolean;
439
+ /**
440
+ Stretches of time the timeline hides, as an axis config's
441
+ `rangeBreaks` takes them. By default the timeline takes the rules of
442
+ the axis that plots the chart's `time` values (such as
443
+ `xConfig.rangeBreaks`); set this to use others, or `false` for none.
444
+ */
445
+ rangeBreaks?: false | RangeBreakRule | RangeBreakRule[];
316
446
  /**
317
447
  The maximum number of ticks (or buttons) a selection can span; unlimited
318
448
  by default. A wider brush is pulled in to it on release, keeping the end
@@ -333,7 +463,16 @@ export interface TimelineConfig {
333
463
  brushMin?: number;
334
464
  /** Toggles the horizontal alignment of the button timeline. */
335
465
  buttonAlign?: "start" | "middle" | "end";
336
- /** Toggles the style of the timeline. */
466
+ /**
467
+ How the timeline draws its periods: `"ticks"` along an axis,
468
+ `"buttons"` in a row, or `"auto"` (the default), which draws buttons
469
+ when every label fits and ticks otherwise, and checks again whenever
470
+ the chart redraws. The timeline's group carries a class naming the
471
+ result, for page CSS: `d3plus-viz-timeline-ticks` or
472
+ `d3plus-viz-timeline-buttons` on a chart's `g.d3plus-viz-timeline`, and
473
+ `d3plus-Timeline-ticks` or `d3plus-Timeline-buttons` on the Timeline's
474
+ own group.
475
+ */
337
476
  buttonBehavior?: "auto" | "buttons" | "ticks";
338
477
  /** Button height. */
339
478
  buttonHeight?: number;
@@ -343,6 +482,21 @@ export interface TimelineConfig {
343
482
  handleConfig?: Record<string, unknown>;
344
483
  /** Handle size. */
345
484
  handleSize?: number;
485
+ /**
486
+ Listeners for the brush's `start`, `brush` and `end` events. On a chart,
487
+ `end` receives the period the viewer picked once a click, drag or
488
+ playback step settles (a Date, or `[start, end]` Dates for a range),
489
+ and `brush` receives it, snapped to whole periods, as a drag moves
490
+ (with `brushing` on and `snapping` off, the last committed one);
491
+ `start` receives the d3-brush event.
492
+ @example
493
+ {on: {end: period => console.log(period)}}
494
+ */
495
+ on?: {
496
+ start?: (event: unknown) => void;
497
+ brush?: (selection: Date | Date[]) => void;
498
+ end?: (selection: Date | Date[]) => void;
499
+ };
346
500
  /**
347
501
  Determines the visibility of the play button to the left of the timeline,
348
502
  which cycles through the available periods at a rate set by `playButtonInterval`.
@@ -354,7 +508,11 @@ export interface TimelineConfig {
354
508
  otherwise playback steps once per `duration` so each step animates in full.
355
509
  */
356
510
  playButtonInterval?: number;
357
- /** The current selection. Defaults to the most recent period in the timeline. */
511
+ /**
512
+ The current selection. Defaults to the most recent period in the
513
+ timeline. On a chart it is where the timeline starts, and the chart
514
+ starts on the same period(s); the viewer's picks replace it.
515
+ */
358
516
  selection?: (Date | number)[] | Date | number | false;
359
517
  /**
360
518
  Whether to run the timeline from its latest period to its earliest.
@@ -425,9 +583,102 @@ export interface TrendLineConfig {
425
583
  strokeWidth?: number;
426
584
  /** Line dash pattern. Defaults to `"6 4"`. */
427
585
  strokeDasharray?: string;
586
+ /**
587
+ Labels each trend line along its path, near its end, in the line's
588
+ color: `true` names the series, `"equation"` shows its fitted equation
589
+ and R², and a function of the fit (`label`, `color`, and `fit` with
590
+ `coefficients` and `r2`) returns any text. Defaults to `"equation"`;
591
+ `false` turns labels off.
592
+ */
593
+ label?: boolean | "equation" | ((fit: {
594
+ label: string;
595
+ color: string;
596
+ fit: {
597
+ coefficients: number[];
598
+ r2: number;
599
+ type: string;
600
+ };
601
+ }) => string | false | null | undefined);
602
+ /** TextBox config for the trend line labels, such as `fontSize` (default 11) or `fontColor`. */
603
+ labelConfig?: Record<string, unknown>;
428
604
  /** Other Line shape config. */
429
605
  [key: string]: unknown;
430
606
  }
607
+ /** The `linkLabelConfig` options. */
608
+ export interface LinkLabelConfig {
609
+ /**
610
+ `"along"` runs text along its link, kept upright: on a curved link
611
+ (a Rings spline, an ArcDiagram arc, a self-loop, a bundled edge, a
612
+ Geomap flow arc, a Sankey band), the text follows the curve over a
613
+ pad that curves with it, and is cut short with an ellipsis where the
614
+ curve has too little room. `"horizontal"` keeps it level.
615
+ */
616
+ rotate?: "along" | "horizontal";
617
+ fontSize?: number;
618
+ /** The pad around the text, in pixels. */
619
+ padding?: number;
620
+ /** The opacity of the pad, which takes the chart's background color. */
621
+ backgroundOpacity?: number;
622
+ /**
623
+ The tightest bend an `"along"` label follows, as a radius in ems of
624
+ `fontSize`. A label is cut short of a tighter bend, and keeps a
625
+ straight label when too little of the curve is left for a few
626
+ letters, as on a small self-loop. Defaults to `2`.
627
+ */
628
+ minRadius?: number;
629
+ /** Any other TextBox setting, such as `fontColor`, `fontFamily`, or `fontWeight`. */
630
+ [key: string]: unknown;
631
+ }
632
+ /** The `linkBundleConfig` options. */
633
+ export interface LinkBundleConfig {
634
+ /**
635
+ How closely each link keeps to its bundle, from `0` (drawn straight)
636
+ to `1` (fully bundled). Defaults to `0.85`.
637
+ */
638
+ strength?: number;
639
+ /**
640
+ How many times the points along each link double as the bundling
641
+ settles (finer bends, more work). Defaults to `6`.
642
+ */
643
+ cycles?: number;
644
+ /**
645
+ The simulation steps in the first cycle; each later cycle takes two
646
+ thirds as many. Defaults to `50`.
647
+ */
648
+ iterations?: number;
649
+ /**
650
+ How alike two links must be, from `0` to `1`, to pull on each other:
651
+ the product of how parallel they are, how alike their lengths are,
652
+ how near they are, and how much each lies alongside the other. Lower
653
+ values bundle more links. Defaults to `0.4`.
654
+ */
655
+ compatibility?: number;
656
+ /**
657
+ Whether each bundled link is drawn as a smooth curve (`true`, the
658
+ default) or as straight runs between its bend points.
659
+ */
660
+ smoothing?: boolean;
661
+ }
662
+ /** The `clusterConfig.labelConfig` options. */
663
+ export interface ClusterLabelConfig {
664
+ /** The largest font size a cluster name takes, in pixels. Defaults to `16`. */
665
+ fontMax?: number;
666
+ /** The smallest font size a cluster name may shrink to before it is left off, in pixels. Defaults to `10`. */
667
+ fontMin?: number;
668
+ /** The space kept clear around each name, in pixels. Defaults to `4`. */
669
+ padding?: number;
670
+ /** Any other TextBox setting, such as `fontColor` (defaults to the chart's text color), `fontFamily`, `fontOpacity`, or `fontWeight`. */
671
+ [key: string]: unknown;
672
+ }
673
+ /** The `clusterConfig` options. */
674
+ export interface ClusterConfig {
675
+ /** The most clusters to keep. When there are more, the smallest joins the cluster it shares the most link weight with (or, when it has no links to another cluster, the largest), until there are this many. Defaults to `12`, the palette's distinct colors. */
676
+ max?: number;
677
+ /** Names each cluster from its most-connected node's row, its index (0 is the largest), and its members' rows. Defaults to "{node} cluster", translated, with the node's label. */
678
+ label?: (d: DataPoint, i: number, nodes: DataPoint[]) => string;
679
+ /** Styles the cluster names a Network draws inside its clusters, or `false` for none. */
680
+ labelConfig?: ClusterLabelConfig | false;
681
+ }
431
682
  export interface ColorScaleConfig {
432
683
  /** The scale's colors: one color, expanded into a light→dark ramp, or an array of colors to step through. */
433
684
  color?: string | string[];
@@ -436,6 +687,12 @@ export interface ColorScaleConfig {
436
687
  outside this range map to the nearest color.
437
688
  */
438
689
  domain?: number[];
690
+ /**
691
+ Draws a bucket-type scale ("jenks", "quantile", …) as one bar with an
692
+ axis along it, labeled where the buckets start, instead of a labeled
693
+ swatch for each bucket. Defaults to `false`.
694
+ */
695
+ bucketAxis?: boolean;
439
696
  /**
440
697
  Formats the label for each bucket in a bucket-type scale ("jenks",
441
698
  "quantile", …). Passed the bucket's start value, its index, the full
@@ -456,34 +713,44 @@ export interface ColorScaleConfig {
456
713
  */
457
714
  scale?: ColorScaleTypeSetting;
458
715
  /**
459
- Whether hovering a chart shape marks its value on the scale: an extra
460
- axis tick at the value on the color bar, and a badge reading the value
461
- in the axis's tick format where that tick's label would sit, covering
462
- the labels it overlaps (a value outside the domain marks the bar's
463
- end). A bucketed bar (`bucketAxis`) also outlines the value's bucket.
464
- A scale drawn as discrete swatches gets no mark; the value's swatch
465
- stays lit and the others dim instead. On charts whose shape hover is
466
- off (`hoverOpacity: 1`, as on Geomap and Calendar or past
467
- `dataCutoff`), that swatch highlight comes from this option too, so
468
- `false` turns it off there. Defaults to `true`.
716
+ Whether hovering a shape marks its value on the color scale: a tick and
717
+ a badge with the value (and, on a `bucketAxis`, an outline around its
718
+ bucket). A swatch scale lights the value's swatch instead. Defaults to
719
+ `true`.
469
720
  */
470
721
  hoverMark?: boolean;
471
722
  /**
472
- Styles the `hoverMark`. `tickConfig` takes `stroke` and `strokeWidth`
473
- (the axis ticks' own by default) and `length` (the axis's `tickSize`
474
- by default); the badge starts where the tick ends. `badgeConfig` takes `fill`
475
- (the value's color by default), `stroke` (the background-legible text
476
- color by default), `strokeWidth` (default `1`), `fontColor` (a color
477
- contrasting the fill by default), `fontFamily`, `fontSize` (default
478
- `11`), `fontWeight` (default `400`), `padding` around the text (default
479
- `3`; across the bar it is padded to sit as far out as the tick
480
- labels), and `rx` corner radius (default `2`). `outlineConfig`, the
481
- bucket outline on a `bucketAxis` bar, takes `stroke` (the
482
- background-legible text color by default) and `strokeWidth` (default
483
- `2`). Each is a value or a function of the
484
- hovered value.
723
+ Holds the palest step of a single-hue ramp darker on a light theme
724
+ (`colorRamp`'s `ordinal` option), so the lowest values still read as
725
+ thin lines against the background instead of fading into it. Dark
726
+ themes keep their ramps. Defaults to `false`.
727
+ */
728
+ ordinalRamp?: boolean;
729
+ /**
730
+ Styles the `hoverMark`: `tickConfig` (`stroke`, `strokeWidth`, `length`),
731
+ `badgeConfig` (`fill`, `stroke`, `strokeWidth`, `fontColor`,
732
+ `fontFamily`, `fontSize`, `fontWeight`, `padding`, `rx`), and
733
+ `outlineConfig`, the bucket outline on a `bucketAxis` bar (`stroke`,
734
+ `strokeWidth`). Each is a value or a function of the hovered value.
485
735
  */
486
736
  hoverMarkConfig?: ColorScaleHoverMarkConfig;
737
+ /**
738
+ Draws the scale as a bivariate key: each row's `value` is a pair of
739
+ numbers, and a chart sets this when its `colorScale` names two fields.
740
+ Defaults to `false`.
741
+ */
742
+ bivariate?: boolean;
743
+ /** How many quantile bins a bivariate scale splits each variable into, from `2` to `4`. Defaults to `3`. */
744
+ bivariateBuckets?: number;
745
+ /**
746
+ A bivariate scale's colors: a square grid, row-major from the low/low
747
+ corner, each row one bin of the second variable and each column one bin
748
+ of the first. A grid of another size than `bivariateBuckets` is blended
749
+ to fit. Defaults to Joshua Stevens' blue–red 3×3 scheme.
750
+ */
751
+ bivariateColors?: string[];
752
+ /** A bivariate key's names for its two variables, in `colorScale` order. Defaults to the two field names. */
753
+ bivariateLabels?: [string, string];
487
754
  }
488
755
  /** `colorDefaults` input: any subset of the color defaults, with `scale` also accepting an array of colors. */
489
756
  export type ColorDefaultsConfig = Partial<Omit<ColorDefaults, "scale">> & {
@@ -511,6 +778,24 @@ export interface SaveControlConfig {
511
778
  /** Other options are passed to html-to-image when saving a PNG or JPG, such as `pixelRatio` or `quality`. */
512
779
  [key: string]: unknown;
513
780
  }
781
+ /** Styles the ring keyboard navigation draws around the focused mark. Each is a value or a `(d, i) => value` accessor of the focused data row. */
782
+ export interface KeyboardNavConfig {
783
+ /** The ring's color. Defaults to the ink that reads against the chart's background (dark on a light page, light on a dark one). */
784
+ stroke?: string | ((d: DataPoint, i: number) => string);
785
+ /** The ring's width in pixels. Defaults to `2`. */
786
+ strokeWidth?: number | ((d: DataPoint, i: number) => number);
787
+ /** Space between the mark and a rectangular or circular ring, in pixels. Defaults to `2`. A path (a pie wedge, a map region) is outlined along its own edge. */
788
+ padding?: number | ((d: DataPoint, i: number) => number);
789
+ }
790
+ /** Fits and styles circle labels (see `labelPosition`). The TextBox keys style labels drawn beside their circles. */
791
+ export interface PointLabelConfig extends Omit<TextBoxConfig, "fontMin" | "fontSize" | "padding"> {
792
+ /** The smallest font size, in pixels, of a label inside its circle under `"auto"` (default `10`). */
793
+ fontMin?: number;
794
+ /** The font size, in pixels, of a label beside its circle (default `11`). */
795
+ fontSize?: number;
796
+ /** The space, in pixels, between a circle's edge and a label beside it (default `3`). */
797
+ padding?: number;
798
+ }
514
799
  export interface D3plusConfig {
515
800
  /** Data array or URL string to load data from. */
516
801
  data?: DataPoint[] | string;
@@ -531,6 +816,14 @@ export interface D3plusConfig {
531
816
  aggs?: {
532
817
  [k: string]: (d: DataPoint[]) => unknown;
533
818
  };
819
+ /**
820
+ Which side of ArcDiagram's line the arcs take: `"above"` (the default),
821
+ `"below"`, or `"both"`, where a link running forward along the line
822
+ (its source before its target) arcs above and one running backward arcs
823
+ below. On a vertical line, "above" is its right side. Node labels sit
824
+ on the other side of the line (below it with `"both"`).
825
+ */
826
+ arcSide?: "above" | "below" | "both";
534
827
  /** Hides the SVG from assistive technology when true (`aria-hidden`). */
535
828
  ariaHidden?: boolean;
536
829
  /**
@@ -549,15 +842,9 @@ export interface D3plusConfig {
549
842
  shapeConfig?: Record<string, unknown>;
550
843
  };
551
844
  /**
552
- Whether hovering a Plot's mark draws a dashed guide from its point to
553
- each axis and a badge on that axis with the point's value there,
554
- formatted as the tooltip formats that axis's values (the axis's
555
- `tickFormat` when set). `"x"` or `"y"` draws them for that direction
556
- only (each including its secondary axis). A bar is badged on its value
557
- axis only. With a discrete axis, the shared tooltip's crosshair is that
558
- axis's guide, and the value axis follows the hovered series' point (or
559
- the one nearest the pointer). Defaults to `true` (`"x"` on BumpChart,
560
- whose y axes label series rather than values).
845
+ Whether hovering a Plot's mark draws a dashed guide to each axis with a
846
+ badge showing its value there. `"x"` or `"y"` limits it to that
847
+ direction. Defaults to `true` (`"x"` on BumpChart and Streamgraph).
561
848
  */
562
849
  axisHover?: boolean | "x" | "y";
563
850
  /**
@@ -605,53 +892,35 @@ export interface D3plusConfig {
605
892
  barWidth?: string | false | ((d: DataPoint, i?: number) => number);
606
893
  /**
607
894
  BarChart/Marimekko with `barWidth`: whether each category's axis label
608
- also shows its bar's share of the total width, beneath the name along
609
- a horizontal axis ("Retail" over "50%") and after it along a vertical
610
- one ("Retail (50%)"). Along a horizontal axis, a name wraps to fit
611
- a narrow bar, widening into room its neighbors leave; a label that
612
- still can't fit is left out, and the labels rotate, showing the name
613
- alone, only when half or more can't fit. The tooltip always shows the
614
- share. In small
615
- multiples (`facet`), each panel's shares are of that panel's own total
616
- width and add to 100%, even when shared scales draw a smaller panel
617
- narrower.
618
- On for Marimekko, off for BarChart.
619
- */
620
- barWidthShare?: boolean;
621
- /**
622
- Starts a Plot's value axis (the x axis for horizontal charts) at a
623
- value: `baseline(n)` renders exactly like `yDomain([n])` (or
624
- `xDomain([n])`). Bars, areas, and stems still grow from the chart's
625
- own `0` in the Plots that draw from one (such as BarChart, AreaPlot,
626
- Histogram, and Lollipop), so with `baselineBreak` on (their default)
627
- the axis breaks back to a `0`
628
- tick and bars run through the break, with its gap cut across them,
629
- and with it off the axis
630
- stretches down to `0`. As with `yDomain([n])`, only `n` is
631
- pinned: the far end comes from the data and is rounded where the
632
- axis would round it with no domain set (left at the data when the
633
- axis config's `rounding` is "none"), and marks for values past `n`
634
- stop at the axis's edge.
635
- When every value sits at or below `n`, it ends the axis instead,
636
- like `yDomain([undefined, n])`. A bound given in
637
- `yDomain`/`xDomain` wins.
895
+ also shows its bar's share of the total width ("Retail" over "50%").
896
+ `"opposite"` puts the shares on the axis across from the names (styled
897
+ with `x2Config`/`y2Config`). `barWidthShareFormat` changes the text.
898
+ Defaults to `"opposite"` for Marimekko, `false` for BarChart.
899
+ */
900
+ barWidthShare?: boolean | "opposite";
901
+ /**
902
+ BarChart/Marimekko with `barWidthShare`: returns each bar's width-share
903
+ label. Called with the merge of the bar's rows' data (numbers summed
904
+ unless `aggs` says otherwise) and the bar's `{share, size, total,
905
+ text}`: its share of the total width (0–1), its width measure, every
906
+ bar's combined width, and the default label (such as "23%"). The
907
+ tooltip keeps showing the share.
908
+ */
909
+ barWidthShareFormat?: (d: DataPoint, info: BarShareInfo) => unknown;
910
+ /**
911
+ Starts a Plot's value axis at a value, like `yDomain([n])` (or
912
+ `xDomain([n])` for horizontal charts); the far end comes from the data.
913
+ Bars, areas, and stems still grow from `0`, so with `baselineBreak` on
914
+ the axis breaks back to a `0` tick. A bound in `yDomain`/`xDomain` wins.
638
915
  */
639
916
  baseline?: number;
640
917
  /**
641
- When the domain of a linear value axis stops short of the `baseline`
642
- (e.g. `[1100, 2100]` with a baseline of `0`), keeps the baseline as the
643
- axis's end tick and breaks the axis between it and the domain: a short
644
- stretch of axis holds the baseline tick and two tilted marks with a gap
645
- in the axis line, then the domain spans the rest. Style it with the
646
- axis's `baselineBreakConfig`. In a Plot it applies to a user-supplied
647
- value domain (`yDomain`/`yConfig.domain`, or the x versions for
648
- horizontal charts), and bars and areas start at the baseline tick,
649
- with the break's gap cut across them (`baselineBreakConfig`'s
650
- `mask`); turned off, a `yDomain` stretches to reach the baseline while a
651
- `yConfig.domain` is kept and cuts its bars off at the axis. Defaults
652
- to `true` for the Plots whose marks grow from `0`, such as BarChart,
653
- AreaPlot, Histogram, and Lollipop (each chart lists its own default),
654
- and `false` for other Plots and a standalone Axis.
918
+ When a linear value axis's domain stops short of the `baseline` (e.g.
919
+ `[1100, 2100]` with a baseline of `0`), keeps the baseline tick and
920
+ breaks the axis between it and the domain, styled by
921
+ `baselineBreakConfig`. Turned off, a Plot's `yDomain` stretches to the
922
+ baseline instead. Defaults to `true` for Plots whose marks grow from `0`
923
+ (BarChart, AreaPlot, Histogram, Lollipop), else `false`.
655
924
  */
656
925
  baselineBreak?: boolean;
657
926
  /** Bullet: the qualitative ranges behind each measure, as threshold values (`[60, 85]`) or band objects (`{min, max, color}`), or a `(d, i) => bands` accessor for per-row bands. */
@@ -664,6 +933,25 @@ export interface D3plusConfig {
664
933
  max?: number;
665
934
  color?: string;
666
935
  })[]);
936
+ /**
937
+ Hexbin: the bin shape, `"hex"` (default) for hexagons or `"square"`
938
+ for squares, or `false` to draw no bins (for contours alone).
939
+ */
940
+ binShape?: "hex" | "square" | false;
941
+ /**
942
+ Hexbin: the bin size in pixels, a hexagon's radius or a square's side.
943
+ Bins keep this size at any zoom: the observations are binned again for
944
+ each view, and the colorScale refits to the bins in view. Defaults to
945
+ `12`.
946
+ */
947
+ binSize?: number;
948
+ /**
949
+ Hexbin: what each bin measures, which its color shows. `"count"`
950
+ (default) is the number of observations in the bin; `{value, agg,
951
+ label}` is the `"sum"` (default) or `"mean"` of `value` (a data key or
952
+ accessor) over the bin's observations, named `label` in the tooltip.
953
+ */
954
+ binValue?: BinValueOption;
667
955
  /** Candlestick: the share of each period's room its candle body (or OHLC ticks) spans, from 0 to 1. Defaults to `0.7`. */
668
956
  bodyWidth?: number;
669
957
  /** BoxWhisker: accessor or data key for each summary row's upper whisker end. See `boxMedian`. */
@@ -683,6 +971,8 @@ export interface D3plusConfig {
683
971
  boxMin?: string | ((d: DataPoint, i: number) => number);
684
972
  /** BoxWhisker: accessor or data key for each summary row's outliers, an array of values drawn as points past the whiskers. Used only with the other box statistics; see `boxMedian`. */
685
973
  boxOutliers?: string | ((d: DataPoint, i: number) => number[]);
974
+ /** Alluvial: the fill opacity of the bands between columns (default `0.5`). */
975
+ bandOpacity?: number;
686
976
  /** BoxWhisker: accessor or data key for each summary row's lower quartile, where its box starts. See `boxMedian`. */
687
977
  boxQ1?: string | ((d: DataPoint, i: number) => number);
688
978
  /** BoxWhisker: accessor or data key for each summary row's upper quartile, where its box ends. See `boxMedian`. */
@@ -709,7 +999,15 @@ export interface D3plusConfig {
709
999
  brushing?: boolean;
710
1000
  /** Bullet: the most each bullet's band can be thick, in pixels (default 40); raise it to let rows fill a tall chart. */
711
1001
  bulletSize?: number;
712
- /** Whether to cache the processed data between renders. */
1002
+ /**
1003
+ Whether the chart uses the data cache that every chart on the page
1004
+ shares for the files fetched by `data`, `links`, `nodes`, `topojson`,
1005
+ and `fitObject`, so charts loading the same URL share one request and
1006
+ loading it again, or changing a formatter, needs none. The cache uses
1007
+ up to about 50 MB of memory, dropping the least recently used files
1008
+ first. Defaults to `true`; `false` fetches on every load.
1009
+ `clearDataCache()` from `@d3plus/data` empties the cache.
1010
+ */
713
1011
  cache?: boolean;
714
1012
  /** Calendar: styles the weekday, month, and year labels (`fontColor`, `fontFamily`, `fontSize`, default `11`, and `fontWeight`). */
715
1013
  calendarLabelConfig?: {
@@ -722,6 +1020,50 @@ export interface D3plusConfig {
722
1020
  cellPadding?: number;
723
1021
  /** Calendar: each cell's corner radius, in pixels (kept below a third of the cell). Defaults to `2`. */
724
1022
  cellRadius?: number;
1023
+ /**
1024
+ Pie (when `innerRadius` leaves a hole, as in a Donut), Sunburst and
1025
+ RadialBar: text drawn in the chart's empty middle. `true` draws the sum
1026
+ of every drawn row's value (Sunburst's `sum`), formatted the way the
1027
+ tooltips format values; a string draws that string; a function
1028
+ receives the drawn rows (after filters and hidden legend entries) and
1029
+ their total and returns the text. The text wraps and shrinks to fit
1030
+ the hole (see `centerLabelConfig`) and is left out when it can't fit
1031
+ whole, or, on a Sunburst, once a click zooms into a node. Defaults to
1032
+ `false`.
1033
+ */
1034
+ centerLabel?: boolean | string | ((data: DataPoint[], total: number) => string | false);
1035
+ /**
1036
+ Pie, Sunburst and RadialBar: styles the `centerLabel` with TextBox keys
1037
+ (`fontColor`, `fontFamily`, `fontWeight`, `lineHeight`, `padding`, …).
1038
+ The text shrinks from `fontMax` (default `40`) to fit the hole, down to
1039
+ `fontMin` (default `10`); a `fontSize` fixes its size instead. Defaults
1040
+ to the chart's text color and `padding: 5`. Merged into the current
1041
+ config.
1042
+ */
1043
+ centerLabelConfig?: TextBoxConfig;
1044
+ /**
1045
+ Sankey: draws links that loop back to a node they left (A → B → A, or a
1046
+ node to itself) as bands that run in a lane above or below the nodes.
1047
+ `false` leaves them out, with a warning. Defaults to `true`.
1048
+ */
1049
+ circularLinks?: boolean;
1050
+ /**
1051
+ Network and ArcDiagram: colors each node by its cluster (found with the
1052
+ Louvain method, weighted by `linkSize`), named after its most-connected
1053
+ node and listed in the legend; clicking a cluster zooms to it. Applies
1054
+ only while the chart's color is its default. Defaults to `true`.
1055
+ */
1056
+ cluster?: boolean;
1057
+ /**
1058
+ Network and ArcDiagram: names and styles the clusters (see `cluster`).
1059
+ `label` names each cluster: it receives the row of the cluster's
1060
+ most-connected node, the cluster's index (0 is the largest), and every
1061
+ member's row. `max` is the most clusters to keep (default `12`): while
1062
+ there are more, the smallest joins the cluster it shares the most link
1063
+ weight with, or the largest when it has none. `labelConfig` styles the
1064
+ names a Network draws inside its clusters, or `false` draws none.
1065
+ */
1066
+ clusterConfig?: ClusterConfig;
725
1067
  /**
726
1068
  Candlestick: accessor or data key for each period's closing value
727
1069
  (default `"close"`). It is the chart's `y`: setting `y` sets it.
@@ -733,21 +1075,56 @@ export interface D3plusConfig {
733
1075
  When the color is a category that isn't one of the `groupBy` levels (for example, points grouped by `"country"` and colored by `"region"`), the legend shows one entry per category, labelled by the category. Clicking, shift+clicking, or hovering an entry hides, solos, or highlights every item in that category.
734
1076
  */
735
1077
  color?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
1078
+ /**
1079
+ Alluvial: the column whose categories color the bands — a column index,
1080
+ or a dimension's data key or title (default `0`, the first column). Each
1081
+ row's band keeps its category's color through every column, and the
1082
+ legend lists that column's categories.
1083
+ */
1084
+ colorBy?: number | string;
736
1085
  /** Overrides for the default colors used for data fills and legible text (see `colorDefaults` in @d3plus/color). */
737
1086
  colorDefaults?: ColorDefaultsConfig;
738
1087
  /** Treat a discrete color field as ordered: color it with a single-hue light→dark ramp instead of nominal categorical hues. */
739
1088
  colorOrdinal?: boolean;
740
1089
  /**
741
- 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.
1090
+ 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. Two of them (`["a", "b"]`) make a bivariate scale: each variable is split into quantile bins, the pair of bins picks a color from a grid, and the key is that grid turned into a diamond (see `colorScaleConfig.bivariateBuckets`, `bivariateColors`, and `bivariateLabels`). A row missing either value gets no colorScale color.
742
1091
  */
743
- colorScale?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
1092
+ colorScale?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | [ColorScaleField, ColorScaleField] | false;
744
1093
  /** A pass-through to the config method of ColorScale. */
745
1094
  colorScaleConfig?: {
1095
+ /** Configures the axis that labels a gradient or `bucketAxis` scale: `labels` lists the values it labels, `ticks` the values it marks, and `tickFormat` writes their text. Along a side of the chart, the whole scale (its bar, ticks, labels and title) takes at most a third of the chart's width (a scale at the left or right) or height (top or bottom), leaving out its title, and then its labels, when they don't fit; `maxSize` sets the room for the axis's labels and title instead. On a scale drawn as swatches, `title` and `titleTooltip` apply to the swatches' title, and `tickTooltip` to each swatch's label, given the value and index of the label at that bucket's start on a `bucketAxis` bar. */
746
1096
  axisConfig?: AxisConfig;
1097
+ /** Draws a bucket-type scale as one bar with an axis along it instead of a labeled swatch for each bucket (see `ColorScaleConfig.bucketAxis`). Defaults to `false`. */
1098
+ bucketAxis?: boolean;
1099
+ /** Formats the label for each bucket in a bucket-type scale (see `ColorScaleConfig.bucketFormat`). */
1100
+ bucketFormat?: ColorScaleConfig["bucketFormat"];
1101
+ /** Given a bucket's minimum and maximum labels, returns the full label (see `ColorScaleConfig.bucketJoiner`). */
1102
+ bucketJoiner?: ColorScaleConfig["bucketJoiner"];
1103
+ /** How many buckets a bucket-type scale splits its values into, or the value each bucket starts at. Defaults to `5`. */
1104
+ buckets?: number | number[];
1105
+ /** Splits a diverging scale evenly on either side of its `midpoint`. Defaults to `true`. */
747
1106
  centered?: boolean;
748
- colors?: string[];
1107
+ /** The scale's colors (see `ColorScaleConfig.color`). */
1108
+ color?: ColorScaleConfig["color"];
1109
+ /** The `[min, max]` values a linear scale spans (see `ColorScaleConfig.domain`). */
1110
+ domain?: number[];
1111
+ /** The value a diverging scale turns at. Defaults to `0`. */
1112
+ midpoint?: number;
1113
+ /** The thickness of a gradient's or a `bucketAxis` scale's bar, in pixels. Defaults to `10`. */
1114
+ size?: number;
1115
+ /** The space around the scale, in pixels. Defaults to `5`. */
1116
+ padding?: number;
1117
+ /** Styles the bar of a gradient or a `bucketAxis` scale, as a Rect config (`stroke`, `strokeWidth`, …). */
1118
+ rectConfig?: Record<string, unknown>;
1119
+ /** A scale at the left or right takes at most this many pixels of the chart's width, in place of a third of it. At the top or bottom, it is the scale's length, in place of `colorScaleMaxSize`. */
1120
+ width?: number;
1121
+ /** A scale at the top or bottom takes at most this many pixels of the chart's height, in place of a third of it. At the left or right, it is the scale's length, in place of `colorScaleMaxSize`. */
1122
+ height?: number;
1123
+ /** The negative pole of a diverging scale, and the hue of an all-negative ramp. Defaults to `colorDefaults.off`, or the theme's `colorScale.min` on a dark or custom theme. */
749
1124
  colorMin?: CssColor;
1125
+ /** The midpoint of a diverging scale. Defaults to `colorDefaults.light`, or the theme's `colorScale.mid` on a dark or custom theme. */
750
1126
  colorMid?: CssColor;
1127
+ /** The high end of a single-hue ramp and the positive pole of a diverging scale. Defaults to `colorDefaults.sequential`, or the theme's `colorScale.max` on a dark or custom theme. On a dark theme every ramp runs from a dim tint near the background up to this color. */
751
1128
  colorMax?: CssColor;
752
1129
  /** The kind of scale, or a function that picks one from the colorScale values on each render (see `ColorScaleConfig.scale`). Defaults to `"jenks"`. */
753
1130
  scale?: ColorScaleTypeSetting;
@@ -755,6 +1132,16 @@ export interface D3plusConfig {
755
1132
  hoverMark?: boolean;
756
1133
  /** Styles the hover mark (see `ColorScaleConfig.hoverMarkConfig`). */
757
1134
  hoverMarkConfig?: ColorScaleHoverMarkConfig;
1135
+ /** Configures the Legend that draws a bucket-type scale as a swatch for each bucket. Along a side of the chart, the swatches, their labels and title take at most a third of the chart's width (a scale at the left or right) or height (top or bottom): the title and labels wrap onto more lines, and when they still don't fit, the title is left out and then the labels are cut short. Its `width` (left or right) or `height` (top or bottom) sets another limit. */
1136
+ legendConfig?: Record<string, unknown>;
1137
+ /** How many quantile bins a bivariate `colorScale` splits each variable into, from `2` to `4`. Defaults to `3`. */
1138
+ bivariateBuckets?: number;
1139
+ /** A bivariate `colorScale`'s colors (see `ColorScaleConfig.bivariateColors`). Defaults to Joshua Stevens' blue–red 3×3 scheme. */
1140
+ bivariateColors?: string[];
1141
+ /** A bivariate key's names for its two variables. Defaults to the two field names. */
1142
+ bivariateLabels?: [string, string];
1143
+ /** Holds the palest step of a light theme's single-hue ramp darker (see `ColorScaleConfig.ordinalRamp`). Defaults to `true` when links are colored by number (`linkColor`), so the lowest-valued links still read as lines, and `false` otherwise. */
1144
+ ordinalRamp?: boolean;
758
1145
  };
759
1146
  /**
760
1147
  The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.
@@ -791,19 +1178,21 @@ export interface D3plusConfig {
791
1178
  */
792
1179
  confidence?: ConfidenceBandSetting | ConfidenceBandSetting[] | false;
793
1180
  /**
794
- Styles the `confidence` interval: a line's band (an Area) or a bar's
795
- error bar (a Path, with `stroke`, `strokeWidth`, and `capWidth` — the end
796
- caps' length in pixels or as a percentage string of the bar's thickness).
797
- Keys nested under `Area` or `Bar` apply only to that shape. `tooltip:
798
- false` leaves the bounds out of tooltips. With nested bands,
799
- `bandOpacity` sets how each band looks where it is the innermost band
800
- drawn — an array ramps from the outermost band to the innermost
801
- (default `[0.15, 0.6]`), a number gives every band that opacity — in
802
- place of `fillOpacity`. Accepted keys: any Area or Path key,
803
- `bandOpacity`, `capWidth`, `tooltip`, `Area` (Area keys), and `Bar`
804
- (Path keys and `capWidth`); any other key logs a warning.
1181
+ Styles the `confidence` interval: a line's band (Area keys) or a bar's
1182
+ error bar (Path keys, plus `capWidth`, in pixels or a percentage of the
1183
+ bar). Keys under `Area` or `Bar` apply to that shape only.
1184
+ `bandOpacity` ramps nested bands' opacity (default `[0.15, 0.6]`), and
1185
+ `tooltip: false` leaves the bounds out of tooltips.
805
1186
  */
806
1187
  confidenceConfig?: Record<string, unknown>;
1188
+ /**
1189
+ How a line crosses a missing value (a skipped step, or a `null`/`NaN`
1190
+ value): `true` (the default) or `"solid"` draws straight through,
1191
+ `false` breaks the line, and `"dashed"` breaks it and bridges the gap
1192
+ with a short dash. An object styles the bridge: `stroke`,
1193
+ `strokeDasharray` (default `"2 4"`), `strokeWidth`, and `opacity`.
1194
+ */
1195
+ connectGaps?: ConnectGaps;
807
1196
  /** Funnel: fills the gap between consecutive stages with a neck joining their widths. */
808
1197
  connector?: boolean;
809
1198
  /**
@@ -814,6 +1203,26 @@ export interface D3plusConfig {
814
1203
  optionally a function of the row the connector leaves and its index.
815
1204
  */
816
1205
  connectorConfig?: Record<string, unknown>;
1206
+ /**
1207
+ Hexbin contour options: `bandwidth` (density kernel standard deviation,
1208
+ px, default `20`), `thresholds` (a level count, default `8`, or the
1209
+ levels themselves), `strokeWidth` (`"lines"` outline width, default
1210
+ `1.5`), `fillOpacity` (top `"filled"` level, default `0.8`), `labels`
1211
+ (write each level's value along its lines, default `true`),
1212
+ `labelSpacing` (px between labels on a line, default `"auto"`),
1213
+ `labelStep` (label every n-th level, default `"auto"`), `labelConfig`
1214
+ (TextBox config), and `levelFormat`.
1215
+ */
1216
+ contourConfig?: ContourConfig;
1217
+ /**
1218
+ Hexbin: draws density contours. `"lines"` (or `true`) outlines each
1219
+ density level in its color, and `"filled"` fills the levels with an
1220
+ opacity ramp. Levels are in observations per bin (the count a bin
1221
+ would hold there), so contours share the bins' colorScale. Over bins,
1222
+ contour lines take the chart's text color and leave hover to the bins.
1223
+ Defaults to `false`.
1224
+ */
1225
+ contours?: ContoursOption;
817
1226
  /** Funnel: the conversion rates each stage's label shows: `"first"`, `"previous"`, `"both"` (or `true`), or `false`. */
818
1227
  conversion?: boolean | "first" | "previous" | "both" | ("first" | "previous")[];
819
1228
  /**
@@ -831,7 +1240,18 @@ export interface D3plusConfig {
831
1240
  /** Maximum number of data points to render before downsampling. */
832
1241
  dataCutoff?: number;
833
1242
  /**
834
- When `data` is loaded from a URL (or a request object, or an Array holding one), re-fetches it every this many milliseconds and redraws with a transition when it changes, keeping hover, zoom, legend toggles, and the timeline selection. Each poll uses the same request and `data` formatter as the first load, and a response identical to the drawn data is not redrawn. Polling waits while the browser tab is hidden or, with `detectVisible`, while the chart is scrolled out of view, and catches up as soon as it is visible again. A failed request keeps the last data, logs one warning per run of failures, and tries again on the next tick. `destroy()`, setting this to `false`, or passing new `data` stops polling. Only `data` is polled, not `links`, `nodes`, or `topojson`. Defaults to `false` (load once).
1243
+ Transforms `data` before it is drawn: receives the loaded file (or the
1244
+ Array passed as `data`) and returns the rows to draw, or a config object
1245
+ holding them as `data` (its other keys are applied to the chart). Also
1246
+ set by `data(url, format)`.
1247
+ */
1248
+ dataFormat?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>;
1249
+ /**
1250
+ When `data` comes from a URL, re-fetches it every this many milliseconds
1251
+ and redraws when it changes, keeping hover, zoom, and legend state.
1252
+ Polling pauses while the tab (or, with `detectVisible`, the chart) is
1253
+ hidden, and a failed request keeps the last data. Only `data` is polled.
1254
+ Defaults to `false` (load once).
835
1255
  */
836
1256
  dataPollingInterval?: number | false;
837
1257
  /**
@@ -864,6 +1284,20 @@ export interface D3plusConfig {
864
1284
  shape to the full width (Violin) or height (Ridgeline).
865
1285
  */
866
1286
  densityScale?: "area" | "count" | "width";
1287
+ /**
1288
+ Gantt: accessor or data key for each task's predecessors, the ids (by
1289
+ `groupBy`) of the tasks it waits on, as an array or a comma-separated
1290
+ string (default `"dependencies"`). Each draws an elbow arrow from the
1291
+ predecessor's end to the task's start.
1292
+ */
1293
+ dependencies?: string | ((d: DataPoint, i: number) => unknown) | false;
1294
+ /** Gantt: styles the dependency arrows: `stroke` (the chart's text color by default), `strokeWidth` (1), `strokeOpacity` (0.55), and `arrowSize` (6, in pixels). */
1295
+ dependencyConfig?: {
1296
+ stroke?: string;
1297
+ strokeWidth?: number;
1298
+ strokeOpacity?: number;
1299
+ arrowSize?: number;
1300
+ };
867
1301
  /** Active depth level for nested groupings. */
868
1302
  depth?: number;
869
1303
  /**
@@ -883,28 +1317,57 @@ export interface D3plusConfig {
883
1317
  */
884
1318
  detectVisibleInterval?: number;
885
1319
  /**
886
- When `true` (the default) and `detectVisible` is enabled, the Viz releases its DOM and scene while it is scrolled out of view and redraws when it returns, keeping the page light when there are many visualizations. Data and configuration are retained; interaction state such as zoom or selection is not, so set this to `false` to keep it. With `detectVisible` enabled, each chart's `<svg>` is also given `content-visibility: auto`, so the browser skips rendering its contents while it is far off-screen (this matters most when this is `false` and charts are kept). For a larger saving you can also apply `content-visibility: auto` and a `contain-intrinsic-size` to the container element yourself; that adds paint containment to an element you own, so it is not done automatically. Requires `IntersectionObserver`.
1320
+ With `detectVisible` on, releases the chart's DOM and scene while it is
1321
+ scrolled out of view and redraws it when it returns, keeping pages with
1322
+ many charts light. Data and config are kept; zoom and selection are not,
1323
+ so set `false` to keep them. Defaults to `true`.
887
1324
  */
888
1325
  detectVisibleUnload?: boolean;
889
1326
  /**
890
1327
  ParallelCoordinates: per-dimension options, keyed by dimension — `domain`
891
1328
  (either end of a numeric domain may be `undefined`), `reverse`, `title`,
892
- and any Axis config (`tickFormat`, `ticks`, `scale`, …).
1329
+ and any Axis config (`tickFormat`, `ticks`, `scale`, `tickTooltip`,
1330
+ `titleTooltip`, …).
893
1331
  */
894
1332
  dimensionConfig?: Record<string, DimensionOptions>;
1333
+ /**
1334
+ Alluvial: styles the column titles drawn above each column (any TextBox
1335
+ config), and takes a `titleTooltip`: the tooltip shown when a title is
1336
+ hovered, as its text, a function that receives the title and returns it,
1337
+ or a tooltip config (as `tooltipConfig`) whose accessors receive the
1338
+ title. Unset (the default) or when the
1339
+ function returns nothing, a title cut short with an ellipsis shows its
1340
+ whole text; `false`, set or returned, shows no tooltip.
1341
+ @example
1342
+ {maxLines: 1, titleTooltip: title => notes[title]}
1343
+ */
1344
+ dimensionTitleConfig?: Record<string, unknown> & {
1345
+ titleTooltip?: string | ((title: string) => string | false | void) | AxisTooltipConfig<[title: string]> | false;
1346
+ };
895
1347
  /**
896
1348
  ParallelCoordinates: the data keys to draw an axis for, in order.
897
1349
  Defaults to every numeric key except the `groupBy` keys and `id`; a key
898
1350
  whose values aren't all numbers gets a categorical axis.
1351
+
1352
+ Alluvial: the categorical dimensions, one column each, left to right —
1353
+ data keys, accessor functions `(d, i) => category`, or `{value, title}`
1354
+ objects. A key is its column's title; a bare accessor has none. Rows
1355
+ missing a category on any dimension (`undefined`, `null`, or `""`) are
1356
+ left out.
899
1357
  */
900
- dimensions?: string[];
1358
+ dimensions?: AlluvialDimensionInput[];
901
1359
  /** Sets orientation of main category axis. */
902
1360
  discrete?: "x" | "y" | "radius" | "angle";
903
1361
  /** Candlestick: the color of periods that closed below their open, or an accessor of the row. Defaults to red. */
904
1362
  downColor?: string | ((d: DataPoint, i: number) => string);
905
1363
  /** Default duration of transitions, in milliseconds. */
906
1364
  duration?: number;
907
- /** Calendar: the fill of days without a value. Defaults to a faint tint of the chart's text color, legible on light and dark backgrounds. */
1365
+ /**
1366
+ Priestley and Gantt: accessor or data key for each row's end (default
1367
+ `"end"`). A key also aggregates grouped rows by their latest end.
1368
+ */
1369
+ end?: string | ((d: DataPoint, i: number) => unknown);
1370
+ /** Calendar: the fill of days without a value. Defaults to the theme's `colorScale.missing` when it sets one, else a faint tint of the chart's text color, legible on light and dark backgrounds. */
908
1371
  emptyFill?: string;
909
1372
  /** Splits the chart into small multiples: one equally sized panel per distinct value of this data key or accessor, sharing one legend, color scale, title, and timeline. `false` draws a single chart. */
910
1373
  facet?: string | ((d: DataPoint, i: number) => unknown) | false;
@@ -936,48 +1399,29 @@ export interface D3plusConfig {
936
1399
  /** Allows removing specific geographies from topojson file to improve zoom. */
937
1400
  fitFilter?: number | string | ((d: Record<string, unknown>) => boolean);
938
1401
  /**
939
- Marks a forecast: the stretch of the discrete axis after it gets a
940
- shaded backdrop, a rule at its start, and a translated "Forecast"
941
- label, and each line's forecast stretch is dashed (see
942
- `forecastConfig`). A function flags the forecast rows (e.g.
943
- `d => d.Type === "Predicted"`): each line is dashed from its last
944
- unflagged point, or throughout when every row is flagged, and the
945
- backdrop starts at the earliest of those. `"auto"` (or `true`) flags
946
- the rows whose `confidence` bounds spread away from their line. A
947
- discrete-axis value (a date or year on a time axis) starts the
948
- forecast there. Unset (the default), only a trend line projection
949
- (`trendLineConfig.projection`) is marked, from the last fitted value;
950
- `false` marks nothing, not even a projection. On bar charts the
951
- backdrop starts at the edge of the first forecast bar, and bars keep
952
- their own styles. Defaults to `"auto"` on a FanChart.
1402
+ Marks a forecast: a shaded backdrop, a rule, and a "Forecast" label over
1403
+ the forecast stretch, with lines dashed there (see `forecastConfig`).
1404
+ A function flags the forecast rows; `"auto"` (or `true`) flags rows whose
1405
+ `confidence` bounds spread from their line; a discrete-axis value starts
1406
+ the forecast there; `false` marks nothing. Unset (the default), only a
1407
+ trend line projection is marked. Defaults to `"auto"` on a FanChart.
953
1408
 
954
- Bullet: each row's forecast (or other comparative measure), drawn as
955
- a paler bar behind the measure: a data key, an accessor returning the
956
- row's value, a number shared by every row, or `false`.
1409
+ Bullet: each row's forecast (or other comparative measure), drawn as a
1410
+ paler bar behind the measure: a data key, an accessor, a number, or
1411
+ `false`.
957
1412
  */
958
1413
  forecast?: boolean | "auto" | number | string | Date | ((d: DataPoint, i: number) => boolean | number);
959
1414
  /**
960
- Styles for the `forecast` marker: the backdrop's `fill` and
961
- `fillOpacity` (default `0.05`; `fill: false` hides it), the rule's
962
- `stroke`, `strokeWidth` (`1`), `strokeOpacity` (`0.4`), and
963
- `strokeDasharray` (`"4 4"`; `stroke: false` hides it), the label's
964
- text as `label` (default "Forecast", translated; `false` hides it)
965
- with `fontColor`, `fontFamily`, `fontSize` (`12`), `fontWeight`, and
966
- `fontOpacity` (`0.7`), and `lineDasharray`, the dash pattern of each
967
- line's forecast stretch (default `"6 4"`; `false` keeps lines solid).
968
- Colors default to the chart's text color for its background. The
969
- backdrop is chart chrome with no data row, so `shapeConfig.texture`
970
- and `shapeConfig.backgroundImage` leave it plain; give it its own
971
- `texture` (a textures.js name or config, drawn in the backdrop's color
972
- over its shade at `textureOpacity`, default `0.3`, with
973
- `textureDefault`) or `backgroundImage` (a URL,
974
- fit by `backgroundImageFit`, `"cover"` or `"contain"`). Both are off
975
- by default.
1415
+ Styles the `forecast` marker: the backdrop's `fill` and `fillOpacity`
1416
+ (default `0.05`), the rule's `stroke`, `strokeWidth`, `strokeOpacity`,
1417
+ and `strokeDasharray`, the `label` text (default "Forecast"; `false`
1418
+ hides it) and its font keys, `lineDasharray` for each line's forecast
1419
+ stretch (default `"6 4"`; `false` keeps lines solid), and an optional
1420
+ `texture` or `backgroundImage` for the backdrop. `fill: false` or
1421
+ `stroke: false` hides the backdrop or rule.
976
1422
 
977
- Bullet: the forecast bar's `size` (a fraction of the band's
978
- thickness), `opacity`, `fill`, `texture`, and
979
- `backgroundImage`/`backgroundImageFit`, each a value or a `(d, i)`
980
- accessor.
1423
+ Bullet: the forecast bar's `size` (a share of the band), `opacity`,
1424
+ `fill`, `texture`, and `backgroundImage`/`backgroundImageFit`.
981
1425
  */
982
1426
  forecastConfig?: Record<string, unknown>;
983
1427
  /**
@@ -988,6 +1432,12 @@ export interface D3plusConfig {
988
1432
  order. A `ySort`/`xSort` comparator on the category axis takes precedence.
989
1433
  */
990
1434
  gapSort?: false | "ascending" | "descending";
1435
+ /**
1436
+ Gantt: accessor or data key for each task's group, such as its project
1437
+ phase. Grouped tasks sit under a header row naming the group, with a
1438
+ bracket spanning its tasks.
1439
+ */
1440
+ group?: string | ((d: DataPoint, i: number) => unknown) | false;
991
1441
  /** Grouping key(s) or accessor function(s). */
992
1442
  groupBy?: string | string[] | ((d: DataPoint) => string | number) | ((d: DataPoint) => string | number)[];
993
1443
  /**
@@ -1039,6 +1489,12 @@ export interface D3plusConfig {
1039
1489
  hiddenOpacity?: number | ((d: DataPoint, i: number) => number);
1040
1490
  /** The hover callback function for highlighting shapes on mouseover. */
1041
1491
  hover?: ((d: DataPoint, i: number) => boolean) | false | null;
1492
+ /**
1493
+ How close (px) the pointer must come to a point mark (scatter and
1494
+ bubble points, Network nodes, Geomap points, Radar dots) to hover it, so small
1495
+ points are easy to reach. Defaults to `20`; `0` turns it off.
1496
+ */
1497
+ hoverDistance?: number;
1042
1498
  /** Candlestick: accessor or data key for each period's highest value (default `"high"`). */
1043
1499
  high?: string | ((d: DataPoint, i: number) => number);
1044
1500
  /** Persistently emphasizes matching marks (keep color) and grays the rest. */
@@ -1064,6 +1520,15 @@ export interface D3plusConfig {
1064
1520
  quartiles?: Record<string, unknown>;
1065
1521
  points?: Record<string, unknown>;
1066
1522
  };
1523
+ /**
1524
+ Lets keyboard users move between the chart's marks: the chart is one Tab
1525
+ stop, the arrow keys move to the nearest mark in that direction, Home and
1526
+ End jump to the ends, Enter or Space click the focused mark, and Escape
1527
+ clears it. Defaults to `true`; `false` removes the Tab stop.
1528
+ */
1529
+ keyboardNav?: boolean;
1530
+ /** Styles the focus ring around the mark keyboard navigation has focused (see `KeyboardNavConfig`). */
1531
+ keyboardNavConfig?: KeyboardNavConfig;
1067
1532
  /**
1068
1533
  Accessor function, or a constant string applied to every data point's
1069
1534
  label (unlike `value`/`nodeId`/etc., a string here is not treated as a
@@ -1071,7 +1536,40 @@ export interface D3plusConfig {
1071
1536
  */
1072
1537
  label?: string | string[] | false | AccessorFn;
1073
1538
  /**
1074
- Whether to display the legend. By default, the legend shows when it has more than one entry and each entry stands for a single group (or two groups at most), or when the entries are colored by a category that isn't a `groupBy` level (see `color`), in which case each entry is labelled by its category. Pass `false` to hide it, `true` to always show it, or a `(config, data) => boolean` function to decide.
1539
+ Gantt: the most the task label column may take: a share of the chart's
1540
+ width when 1 or below (default `0.3`), else pixels. The column fits the
1541
+ widest label up to it, wrapping or truncating longer ones; `0` hides it.
1542
+ */
1543
+ labelWidth?: number;
1544
+ /**
1545
+ Where each shape's label goes: `"auto"`, `"along"`, `"inside"`, or
1546
+ `"outside"`, or a `(d, i) => string` accessor. `"auto"` picks
1547
+ whichever fits best per shape, and a label with no room is left out.
1548
+
1549
+ - Rings (Pie, Donut, Sunburst, Chord, RadialBar) and polar charts
1550
+ (Radar, PolarArea, RadialMatrix): `"along"` curves the name along its
1551
+ arc. `"inside"` keeps it straight; on a Pie or Donut, `"outside"`
1552
+ moves it beside the ring with a leader line.
1553
+ - Bars: inside or outside the bar. `"auto"` goes outside when the bar
1554
+ is short. Stacked bars always label inside.
1555
+ - Circles (Plot points, Network nodes, Geomap points): inside the
1556
+ circle, or beside it when it doesn't fit (`"outside"` always beside).
1557
+ - Stacked areas: `"auto"` and `"along"` run each name along its band;
1558
+ `"inside"` puts it in the band's largest box.
1559
+
1560
+ When every stacked area or RadialBar track is named along its shape,
1561
+ the default legend hides. Defaults to `"auto"`.
1562
+ */
1563
+ labelPosition?: "auto" | "along" | "inside" | "outside" | ((d: DataPoint, i: number) => "auto" | "along" | "inside" | "outside");
1564
+ /**
1565
+ Whether to display the legend. By default it shows when it has more than
1566
+ one entry and each entry stands for a single group, or when entries are
1567
+ colored by a category that isn't a `groupBy` level. It hides when the
1568
+ chart's own labels already name every entry (see `labelPosition`), or
1569
+ when every Circle, Rect, and Bar of a Plot shows its whole label as its
1570
+ legend entry would, and stays while a series is hidden or soloed.
1571
+ `false` hides it, `true` always shows it, and a `(config, data) =>
1572
+ boolean` function decides.
1075
1573
  */
1076
1574
  legend?: boolean | ((config: D3plusConfig, arr: DataPoint[]) => boolean);
1077
1575
  /** Configuration object passed to the legend's config method. */
@@ -1087,11 +1585,21 @@ export interface D3plusConfig {
1087
1585
  shapeConfig?: Record<string, string | number>;
1088
1586
  };
1089
1587
  /**
1090
- 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.
1588
+ 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 will solo that category and shift+clicking will hide that category. The Back button undoes each click (see `legendHistory`).
1091
1589
  */
1092
1590
  legendFilterInvert?: boolean | ((viz: VizBase) => boolean);
1093
1591
  /**
1094
- Whether the chart may draw one of its legends inside the empty space around its marks instead of in a margin, for charts that leave open space around their marks, such as Plot and the charts built on it, Network, Pack, Pie, and Geomap; a chart whose marks fill its area, like Treemap, keeps its legends in the margins. After the chart lays out, the size legend is tried first, then the legend, then the colorScale; the first that fits is drawn over a semi-transparent box (see `legendInsetConfig`), and any others keep their margins. Space enclosed by the marks, like the middle of a ring of points, is never used. Only a legend or colorScale whose position is `"auto"` (the default) can move inside; one set to a side stays in that margin. Defaults to `true`; also accepts a function that receives the resolved chart config and returns a boolean.
1592
+ Whether legend clicks go on the chart's Back history, so Back undoes
1593
+ them along with drill-downs, in order. Defaults to `true`; `false` leaves
1594
+ them off, so Back only steps out of drill-downs.
1595
+ */
1596
+ legendHistory?: boolean;
1597
+ /**
1598
+ Whether the chart may draw a legend, size legend, or colorScale inside
1599
+ empty space around its marks (over a translucent box, see
1600
+ `legendInsetConfig`) instead of in a margin. Only a legend whose position
1601
+ is `"auto"` can move inside. Defaults to `true`; also accepts a function
1602
+ of the resolved config.
1095
1603
  */
1096
1604
  legendInset?: boolean | ((config: D3plusConfig) => boolean);
1097
1605
  /**
@@ -1118,12 +1626,15 @@ export interface D3plusConfig {
1118
1626
  Defines which side of the visualization to anchor the legend. Expected values are `"auto"` (the default), `"top"`, `"bottom"`, `"left"`, `"right"`, and `false` to hide it. `"auto"` lets the chart choose: inside the chart when it fits there (see `legendInset`), otherwise the right side of charts more than 1.5 times as wide as they are tall and the bottom of all others. Any other side keeps the legend there.
1119
1627
  */
1120
1628
  legendPosition?: false | PanelPosition | (() => false | PanelPosition);
1121
- /** Custom sort comparator for legend items. */
1629
+ /**
1630
+ Comparator that orders the legend's entries. By default the legend reads in the order the chart draws: Treemap, Pack, Pie, Donut, Icicle, and Sunburst list their largest entries first; a stacked chart lists its series in stacking order, from the baseline outward (so the default `stackOrder`, `"descending"`, lists the largest first); Waffle and Waterfall follow their own order, and Network and ArcDiagram clusters come largest first; every other chart is alphabetical by label. A threshold group always comes last, whatever the sort.
1631
+ */
1122
1632
  legendSort?: (a: DataPoint, b: DataPoint) => number;
1123
1633
  /** Configuration object for the legend tooltip. */
1124
1634
  legendTooltip?: TooltipConfig;
1125
1635
  /**
1126
- Formats the Radar's level value labels. Receives the ring's value and
1636
+ Formats the Radar's level value labels and dot tooltip values, or the
1637
+ Hexbin's contour level labels and tooltips. Receives the value and
1127
1638
  returns its label. Defaults to the abbreviated number format the axes
1128
1639
  use (`1.5k`, `2M`, …).
1129
1640
  */
@@ -1161,15 +1672,115 @@ export interface D3plusConfig {
1161
1672
  levels?: number | number[];
1162
1673
  /** ParallelCoordinates: the lines' stroke opacity, or `"auto"` (default) to fade them as their number grows. */
1163
1674
  lineOpacity?: number | "auto";
1164
- /** Whether to show labels on line charts. */
1165
- lineLabels?: boolean;
1675
+ /**
1676
+ Labels each line with its series name: `true` or `"end"` past its right
1677
+ end, `"start"` past its left end, `"both"` at both ends, or `"along"`
1678
+ written along the line itself, following its curve. A function of each
1679
+ row picks per series (or `false`). End labels that would overlap are
1680
+ moved apart, and `lineLabelConfig` can add each end's value. When every
1681
+ line is named along it, the default legend hides. Defaults to `"along"`
1682
+ on LinePlot, no labels elsewhere.
1683
+ */
1684
+ lineLabels?: LineLabelsSetting;
1685
+ /**
1686
+ Options for `lineLabels`. `value: true` adds the line's value at each
1687
+ labeled end after the series name (e.g. "Brazil 37%"), formatted as the
1688
+ y axis formats its ticks (its `tickFormat` when set). `valueFormat`
1689
+ formats it instead, as a function of the value, the row it belongs to,
1690
+ and the row's index. Defaults to `{value: false}`.
1691
+ */
1692
+ lineLabelConfig?: LineLabelConfig;
1166
1693
  /**
1167
1694
  RadialBar's sweep, in degrees from `startAngle`. Defaults to 270 for
1168
1695
  tracks and 360 for the circular bar chart.
1169
1696
  */
1170
1697
  maxAngle?: number;
1698
+ /**
1699
+ Geomap: how far each link bows into an arc, as a share of the distance
1700
+ between its ends: `0` draws the plain great-circle path, and the default
1701
+ `0.2` bows it to the left of its direction (negative bows right), so
1702
+ links running both ways stay apart. Globes ignore it.
1703
+ */
1704
+ linkCurve?: number;
1705
+ /**
1706
+ Network and Geomap: bundles links that run the same way into shared
1707
+ curves (force-directed edge bundling), so the main flows read through
1708
+ the clutter of a dense chart. A bundled Geomap link ignores
1709
+ `linkCurve`. Defaults to `false`.
1710
+ */
1711
+ linkBundle?: boolean;
1712
+ /**
1713
+ Tunes `linkBundle`: `strength` (how closely links keep to their
1714
+ bundles, `0.85`), `cycles` (`6`), `iterations` (`50`),
1715
+ `compatibility` (how alike two links must be to bundle, `0.4`; lower
1716
+ bundles more), and `smoothing` (`true` draws smooth curves). Merged
1717
+ into the defaults.
1718
+ */
1719
+ linkBundleConfig?: LinkBundleConfig;
1720
+ /**
1721
+ Network, Rings, and Geomap: the widest link, in pixels, when `linkSize`
1722
+ values differ. Network and Rings default to half the smallest node's
1723
+ radius (never thinner than `linkSizeMin`); Geomap defaults to `10`. A
1724
+ `linkSizeMin` wider than a set `linkSizeMax` is held to it.
1725
+ */
1726
+ linkSizeMax?: number;
1727
+ /**
1728
+ Network, Rings, ArcDiagram, and Geomap: the thinnest link, in pixels,
1729
+ when `linkSize` values differ (default `1`).
1730
+ */
1731
+ linkSizeMin?: number;
1732
+ /**
1733
+ Colors each link of a Network, Rings, Sankey, ArcDiagram, or Geomap (and
1734
+ its arrowheads): `"source"` or `"target"` takes that node's color, and a
1735
+ key or accessor reads a value from each link: a number is colored on the
1736
+ colorScale, and a string is a color or a palette category. `false` (the
1737
+ default) draws every link in the theme's link gray.
1738
+ */
1739
+ linkColor?: false | "source" | "target" | string | ((d: DataPoint, i: number) => unknown);
1740
+ /**
1741
+ Text drawn at the middle of each link of a Network, Rings, Sankey,
1742
+ ArcDiagram, or Geomap: a key or accessor function (receiving the link, with
1743
+ `source` and `target` set to the data of its nodes, and its index in
1744
+ `links`). It sits halfway along a link's length, centered on
1745
+ a Sankey band, and at the top of an ArcDiagram arc, on a pad of the
1746
+ chart's background, and follows a curved link's curve (see
1747
+ `linkLabelConfig`). Numbers are abbreviated in the chart's locale.
1748
+ Labels that would cover a node or another label are hidden, the
1749
+ widest links' labels kept first. Defaults to none.
1750
+ */
1751
+ linkLabel?: string | ((d: DataPoint, i: number) => unknown);
1752
+ /**
1753
+ Styles the link labels (see `linkLabel`): `rotate` (`"along"`, the
1754
+ default, runs text along its link, curves included; `"horizontal"`
1755
+ keeps it flat), `fontSize` (default `10`), `padding` (default `2`),
1756
+ `backgroundOpacity` of the pad behind the text (default `0.85`),
1757
+ `minRadius`, the tightest bend a label follows in ems (default `2`), and
1758
+ any other TextBox setting, such as `fontColor`.
1759
+ */
1760
+ linkLabelConfig?: LinkLabelConfig;
1171
1761
  /** Links this chart to every other chart with the same group name, so hovering, `active`, `highlight` (including search), and legend hide/solo clicks in one are mirrored in the rest, and a value gets the same categorical color in every chart. Rows match across charts by the value of `by` (a data key or accessor), which defaults to the chart's own id. A string is shorthand for `{group}`; set `hover`, `active`, `highlight`, `legend`, or `color` to `false` to stop sharing that behavior. */
1172
1762
  link?: LinkOption;
1763
+ /**
1764
+ Network, Rings, ArcDiagram, and Geomap: each link's thickness, as a
1765
+ pixel number, or an accessor whose values are scaled (see
1766
+ `linkSizeScale`) between `linkSizeMin` and `linkSizeMax`. The accessor
1767
+ receives each link with `source` and `target` set to its nodes' data.
1768
+ */
1769
+ linkSize?: number | ((d: DataPoint & {
1770
+ source: DataPoint;
1771
+ target: DataPoint;
1772
+ }, i: number) => number);
1773
+ /**
1774
+ Network, Rings, Sankey, Chord, ArcDiagram, and Geomap: transforms
1775
+ `links`
1776
+ before they are drawn. The function receives the loaded file (or the
1777
+ Array passed as `links`) and returns the links Array. It runs when the
1778
+ chart renders, whichever order `links` and `linksFormat` are set in,
1779
+ and setting it again re-runs it on the next render. Passing a formatter
1780
+ as the second argument of `links(url, format)` sets it, and setting
1781
+ `links` alone keeps it.
1782
+ */
1783
+ linksFormat?: (data: DataPoint[]) => DataPoint[];
1173
1784
  /**
1174
1785
  Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.
1175
1786
  */
@@ -1184,6 +1795,12 @@ export interface D3plusConfig {
1184
1795
  measureSize?: number;
1185
1796
  /** Orders Violin and Ridgeline categories by median: `false` (default; data order), `"ascending"`, or `"descending"`. */
1186
1797
  medianSort?: false | "ascending" | "descending";
1798
+ /**
1799
+ Gantt: accessor or data key for whether a task is a milestone, drawn as
1800
+ a diamond at its `end` (default `"milestone"`). Without one, a task that
1801
+ starts and ends at the same time is a milestone.
1802
+ */
1803
+ milestone?: string | ((d: DataPoint, i: number) => unknown) | false;
1187
1804
  /**
1188
1805
  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.
1189
1806
  */
@@ -1194,7 +1811,7 @@ export interface D3plusConfig {
1194
1811
  messageStyle?: Record<string, unknown>;
1195
1812
  /** Metric key for the visualization. */
1196
1813
  metric?: string;
1197
- /** Shows a small overview + draggable-viewport minimap underneath the zoom controls once the chart is zoomed in. On by default whenever `zoom` is enabled. */
1814
+ /** Shows a small overview + draggable-viewport minimap in the chart's top-right corner (beneath the zoom controls, when they show) once the chart is zoomed in. On by default whenever `zoom` is enabled. */
1198
1815
  minimap?: boolean;
1199
1816
  /**
1200
1817
  An additional CSS class name (or space-separated list of class names) applied to the minimap's outer box, viewport box, and zoom-level label, alongside their fixed `d3plus-minimap` / `d3plus-minimap-viewport` / `d3plus-minimap-label` classes. Setting this automatically disables d3plus's built-in inline `minimapStyle`/`minimapViewportStyle`/`minimapViewportStyleActive`/`minimapLabelStyle` defaults (as long as you haven't already customized them yourself), so a host page's own styling applies through the cascade with no other configuration needed.
@@ -1238,10 +1855,60 @@ export interface D3plusConfig {
1238
1855
  Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.
1239
1856
  */
1240
1857
  noDataMessage?: boolean;
1858
+ /**
1859
+ The order of ArcDiagram's nodes along its line: `"data"` (the default,
1860
+ their order in `nodes`), `"label"` (alphabetical), `"group"` (by the
1861
+ top `groupBy` or `nodeGroupBy` level when there are several, else by
1862
+ the `color` value, then by label), `"degree"`
1863
+ (most connected first), or a comparator function receiving two node
1864
+ rows, as for `Array.prototype.sort`.
1865
+ */
1866
+ nodeSort?: "data" | "label" | "group" | "degree" | ((a: DataPoint, b: DataPoint) => number);
1867
+ /**
1868
+ Network, Rings, Sankey, Chord, and ArcDiagram: transforms `nodes`
1869
+ before they are drawn. The function receives the loaded file (or the
1870
+ Array passed as `nodes`) and returns the nodes Array. It runs when the
1871
+ chart renders, whichever order `nodes` and `nodesFormat` are set in,
1872
+ and setting it again re-runs it on the next render. Passing a formatter
1873
+ as the second argument of `nodes(url, format)` sets it, and setting
1874
+ `nodes` alone keeps it.
1875
+ */
1876
+ nodesFormat?: (data: DataPoint[]) => DataPoint[];
1877
+ /**
1878
+ Network, Rings, Sankey, ArcDiagram, and Geomap: how many links a node's tooltip
1879
+ lists below its number of connections, strongest first, each as the
1880
+ node at its other end ("→ Target" or "← Source") and its value. A
1881
+ number, or `false` to list none. Defaults to 3 when the links differ
1882
+ in value (`linkSize`, or Sankey's `value`), and none when they don't.
1883
+ */
1884
+ nodeTooltipLinks?: number | false;
1885
+ /**
1886
+ Network, Rings, ArcDiagram, and Sankey: the network measures a node's
1887
+ tooltip lists. `true` (the default) lists them all, `false` none, or
1888
+ an Array picks some, in the order to list them: `"degree"` (its number
1889
+ of links, as "In-degree" and "Out-degree" when the chart draws arrows
1890
+ and in Sankey; it replaces the "Connections" count), `"betweenness"`
1891
+ (the share of shortest paths between other nodes that pass through
1892
+ it, 0 to 1), `"closeness"` (how near it is to the nodes it can reach,
1893
+ 0 to 1), and `"cluster"` (the name of its cluster, when clusters color
1894
+ the chart). Betweenness and closeness are worked out while the browser
1895
+ is idle after the chart draws, and an open tooltip fills them in once
1896
+ they are ready.
1897
+ */
1898
+ nodeTooltipStats?: boolean | ("degree" | "betweenness" | "closeness" | "cluster")[];
1899
+ /**
1900
+ Network, Rings, ArcDiagram, and Sankey: settings for the network
1901
+ measures in node tooltips. `weighted: true` counts a strong link (by
1902
+ `linkSize`, or Sankey's `value`) as a shorter step than a weak one for
1903
+ betweenness and closeness; by default every link is one step.
1904
+ */
1905
+ nodeTooltipStatsConfig?: {
1906
+ weighted?: boolean;
1907
+ };
1241
1908
  /**
1242
1909
  Ocean color for geomaps (any CSS value including 'transparent'), or a
1243
- `{light, dark}` pair chosen by the chart's backdrop. Defaults to the
1244
- default basemap's own water colors.
1910
+ `{light, dark}` pair chosen by the chart's `theme` (the page behind it
1911
+ in `"auto"` mode). Defaults to the default basemap's own water colors.
1245
1912
  */
1246
1913
  ocean?: string | {
1247
1914
  light: string;
@@ -1265,26 +1932,58 @@ export interface D3plusConfig {
1265
1932
  */
1266
1933
  overlap?: number;
1267
1934
  /**
1268
- Room (px) the Radar reserves around its web for the metric labels.
1269
- `"auto"` (the default) measures the labels and gives the web the largest
1270
- radius at which every label fits inside the chart, wrapping long labels
1271
- onto two lines (and truncating what still doesn't fit) rather than
1272
- shrinking the web below half its largest possible size. A number
1273
- reserves exactly that much room and wraps labels to that width.
1935
+ Room (px) reserved around a Radar's web (or a polar chart's circle) for
1936
+ its labels. `"auto"` (the default) curves every label along the edge
1937
+ when they all fit (see `labelPosition`), else sizes the circle to the
1938
+ labels measured along their spokes, wrapping long ones onto two lines.
1939
+ A number reserves exactly that much room.
1274
1940
  */
1275
1941
  outerPadding?: number | "auto";
1942
+ /** Priestley and Gantt: the space between neighboring bars, as a share of each row (d3's band `paddingInner`). */
1943
+ paddingInner?: number;
1944
+ /** Priestley and Gantt: the space before the first row and after the last, as a share of a row (d3's band `paddingOuter`). */
1945
+ paddingOuter?: number;
1276
1946
  /** Pyramid: draws each value as a fraction of the frame's total, with the axis and tooltip reading percentages. */
1277
1947
  percent?: boolean;
1278
1948
  /** Calendar: what each block covers — `"year"` (the default; whole years, stacked) or `"month"` (whole months, as a grid of small calendars). */
1279
1949
  period?: "year" | "month";
1280
1950
  /** Coordinate accessor for point-based geomaps. */
1281
1951
  point?: (d: DataPoint) => number[];
1952
+ /**
1953
+ Hexbin: the style of the observations `points` draws: `r`, the dot
1954
+ radius in pixels (default `1.5`); `fill` (defaults to the chart's text
1955
+ color); and `fillOpacity` (default `0.35`). Merged into the current
1956
+ config.
1957
+ */
1958
+ pointConfig?: PointConfig;
1959
+ /**
1960
+ Fits and styles circle labels (see `labelPosition`): `fontMin` is the
1961
+ smallest font size a label may shrink to inside its circle before
1962
+ `"auto"` moves it beside the circle (default `10`, the size of the
1963
+ chart's smallest text, its total); `fontSize` is the size of a label
1964
+ beside its circle (default `11`); `padding` is the space between the
1965
+ circle's edge and that label (default `3`). The other TextBox keys
1966
+ (`fontColor`, `fontFamily`, `fontWeight`, `fontOpacity`, …) style the
1967
+ labels beside their circles, which default to the chart's text color.
1968
+ Merged into the current config.
1969
+ */
1970
+ pointLabelConfig?: PointLabelConfig;
1971
+ /** Hexbin: draws the raw observations as small dots beneath the bins and contours. Defaults to `false`. */
1972
+ points?: boolean;
1282
1973
  /** Point size accessor for geomaps. */
1283
1974
  pointSize?: string | ((d: DataPoint) => number);
1284
1975
  /** Minimum point size for geomaps. */
1285
1976
  pointSizeMin?: number;
1286
1977
  /** Maximum point size for geomaps. */
1287
1978
  pointSizeMax?: number;
1979
+ /**
1980
+ Gantt: accessor or data key for each task's progress, a fraction from 0
1981
+ to 1 (`0.6`) or a percent string (`"60%"`); default `"progress"`. The
1982
+ done part of the bar fills in the task's color and the rest in a paler
1983
+ shade, and the tooltip lists it. A milestone below 100% draws pale and
1984
+ outlined. A key also averages grouped rows' progress.
1985
+ */
1986
+ progress?: string | ((d: DataPoint, i: number) => unknown) | false;
1288
1987
  /** Map projection name or function. */
1289
1988
  projection?: string | ((x: number, y: number) => [number, number]);
1290
1989
  /** Outer padding between the visualization edge and map shapes. */
@@ -1296,6 +1995,37 @@ export interface D3plusConfig {
1296
1995
  wedge's area proportional to its value; `"linear"` its radius.
1297
1996
  */
1298
1997
  radialScale?: "sqrt" | "linear";
1998
+ /**
1999
+ Whether the chart animates. `"auto"` (default) follows the viewer's OS
2000
+ setting, read from the `(prefers-reduced-motion: reduce)` media query at
2001
+ each draw (server-side rendering counts as not reduced). `true` always
2002
+ draws without motion: shapes, axes, legends, zooms, and fades jump
2003
+ straight to their final state. `false` always animates. `duration` keeps
2004
+ the value you set either way.
2005
+ */
2006
+ reducedMotion?: "auto" | boolean;
2007
+ /**
2008
+ Plot: shaded spans between two values, such as a recession or a target
2009
+ range. Give each entry `x` (vertical) or `y` (horizontal) as
2010
+ `[start, end]` in data units, `x2`/`y2` for the secondary axes, or
2011
+ `ref: "plot"` for fractions of the plot. Optional: a `label` (top-left;
2012
+ `labelPosition: "end"` for top-right) with font keys and `maxWidth`,
2013
+ `fill`/`fillOpacity` (default the text color at `0.08`), `stroke`,
2014
+ `strokeWidth`, `strokeOpacity`, and `layer: "front"` to draw over the
2015
+ data. A band widens a continuous axis's domain to fit.
2016
+ */
2017
+ referenceBands?: ReferenceBandConfig[];
2018
+ /**
2019
+ Plot: lines across the plot at one value, such as a target or a launch
2020
+ date. Give each entry `x` (vertical) or `y` (horizontal) in data units,
2021
+ `x2`/`y2` for the secondary axes, or `ref: "plot"` for a fraction of the
2022
+ plot. Optional: a `label` at the line's `"end"` or `"start"`
2023
+ (`labelPosition`) with font keys and `maxWidth`, `stroke`/`strokeOpacity`
2024
+ (default the text color at `0.6`), `strokeWidth` (`1`), `dash` (`true`
2025
+ or a dash pattern), and `layer: "front"` to draw over the data. A line
2026
+ widens a continuous axis's domain to fit.
2027
+ */
2028
+ referenceLines?: ReferenceLineConfig[];
1299
2029
  /** Row key for matrix-style layouts. */
1300
2030
  row?: string;
1301
2031
  /** Shows a top-left download button that saves the chart, as the reader sees it, as a PNG, SVG, or JPG file. On by default for every chart. */
@@ -1414,12 +2144,29 @@ export interface D3plusConfig {
1414
2144
  Which margin the size legend claims in the chart's bottom-right corner. `"right"` (the default) widens the right margin, so the chart keeps its full height and the legend sits at the bottom of the right column, below any right-side legend or colorScale. `"bottom"` deepens the bottom margin instead, so the chart keeps its full width and any bottom legend or colorScale narrows to sit beside it.
1415
2145
  */
1416
2146
  sizeLegendPosition?: "right" | "bottom";
2147
+ /**
2148
+ Anchors a Plot's size scale at zero, so a mark's size is proportional to its value: with the default `sizeScale` of `"sqrt"`, each circle's area is (a value twice as large draws a circle with twice the area), and with `"linear"`, its radius. The largest value still draws at `sizeMax`, while `sizeMin` no longer sets the smallest mark's radius, so values near zero draw as small as they are. Off by default, except on BubbleChart. Ignored when any size is negative or `sizeScale` is `"log"`.
2149
+ */
2150
+ sizeZero?: boolean;
2151
+ /**
2152
+ SlopeChart: colors each line by its direction between its first and
2153
+ last period. `true` draws rising lines green, falling lines red, and
2154
+ flat lines in the theme's muted text color, in shades that suit a light
2155
+ or dark theme; an object sets any of `up`, `down`, and `flat` itself.
2156
+ The legend and markers follow.
2157
+ */
2158
+ slopeColor?: SlopeColorSetting;
1417
2159
  /**
1418
2160
  With two groupBy levels, Violin places violins by the first and sets
1419
2161
  them side by side by the second. `split` draws a category holding
1420
2162
  exactly two violins as the two halves of one shape instead.
1421
2163
  */
1422
2164
  split?: boolean;
2165
+ /**
2166
+ Priestley and Gantt: accessor or data key for each row's start (default
2167
+ `"start"`). A key also aggregates grouped rows by their earliest start.
2168
+ */
2169
+ start?: string | ((d: DataPoint, i: number) => unknown);
1423
2170
  /** Funnel: the gap between consecutive stages, as a fraction (0–1) of each stage's slot. */
1424
2171
  stagePadding?: number;
1425
2172
  /** Whether to stack series. */
@@ -1437,7 +2184,8 @@ export interface D3plusConfig {
1437
2184
  `"key"` / `"keyReverse"` alphabetically, `"none"` / `"data"` for input
1438
2185
  order, or d3's `"insideOut"` / `"appearance"` / `"reverse"`), an Array of
1439
2186
  series keys for an explicit order, a value accessor, or a `{value, order}`
1440
- config to rank series by an aggregate of any data field.
2187
+ config to rank series by an aggregate of any data field. The default
2188
+ legend lists the series in this order, from the baseline outward.
1441
2189
  */
1442
2190
  stackOrder?: string | string[] | {
1443
2191
  value: string | ((d: DataPoint) => unknown);
@@ -1456,16 +2204,12 @@ export interface D3plusConfig {
1456
2204
  /** Accessor function or string for the visualization's subtitle. */
1457
2205
  subtitle?: string | ((data: DataPoint[]) => string);
1458
2206
  /**
1459
- Packs a Plot's circles into a beeswarm: each circle keeps its value along
1460
- one axis and is placed beside its neighbors along the other, so none
1461
- overlap. `"x"` or `"y"` names the value axis; `true` uses x when its
1462
- values are numeric, else y; `false` draws a plain scatter. When the other
1463
- axis holds categories (strings), each category gets its own swarm in its
1464
- own band; otherwise that axis's values are ignored and its axis is hidden.
1465
- Circles keep their ids, so switching a chart between `false` and `true`
1466
- animates each circle between its scatter and swarm position. The default,
1467
- `"auto"`, swarms only when every mark is a Circle and every row lacks a y
1468
- (or x) value.
2207
+ Packs a Plot's circles into a beeswarm: each keeps its value along one
2208
+ axis and is placed beside its neighbors along the other, so none
2209
+ overlap. `"x"` or `"y"` names the value axis; `true` picks x when its
2210
+ values are numeric, else y; `false` draws a plain scatter. A category
2211
+ axis gets one swarm per category. The default, `"auto"`, swarms only
2212
+ when every mark is a Circle and rows lack the other axis's value.
1469
2213
  */
1470
2214
  swarm?: boolean | "auto" | "x" | "y";
1471
2215
  /**
@@ -1523,10 +2267,31 @@ export interface D3plusConfig {
1523
2267
  tableViewSort?: boolean;
1524
2268
  /** Funnel: narrows each stage toward the next stage's width, drawing a continuous funnel instead of flat bars. */
1525
2269
  taper?: boolean;
2270
+ /** Gantt: styles the task label column: `fontColor` (the chart's text color by default), `fontFamily`, and `fontSize` (12). */
2271
+ taskLabelConfig?: {
2272
+ fontColor?: string;
2273
+ fontFamily?: string | string[];
2274
+ fontSize?: number;
2275
+ };
2276
+ /**
2277
+ Gantt: the order of the tasks: `"data"` (the default) keeps the data's
2278
+ order, `"start"` sorts by start, and a function compares two data rows.
2279
+ Groups follow their first task.
2280
+ */
2281
+ taskSort?: "data" | "start" | ((a: DataPoint, b: DataPoint) => number);
1526
2282
  /** Bullet: each row's target, drawn as a marker across the band: a data key, an accessor, a number shared by every row, or `false`. */
1527
2283
  target?: string | number | ((d: DataPoint, i: number) => number) | false;
1528
2284
  /** Bullet: the target marker's `size` (a fraction of the band's thickness), `stroke`, and `strokeWidth`, each a value or a `(d, i)` accessor. */
1529
2285
  targetConfig?: Record<string, unknown>;
2286
+ /**
2287
+ The chart's colors. `"auto"` (the default) paints no background and
2288
+ follows the page, light or dark. `"light"` and `"dark"` paint the
2289
+ theme's background and take every chrome color from it. An object
2290
+ overrides tokens on top of its `base` preset, e.g.
2291
+ `{base: "dark", background: "#123", accent: "#ffd43b"}`. Colors set
2292
+ elsewhere in the config win over the theme.
2293
+ */
2294
+ theme?: ThemeSetting;
1530
2295
  /**
1531
2296
  Threshold value for grouping small slices, as a share of the total
1532
2297
  (`0.05` is 5%). On a stacked Plot (StackedArea, or an AreaPlot,
@@ -1543,7 +2308,8 @@ export interface D3plusConfig {
1543
2308
  /**
1544
2309
  URL template for XYZ map tiles, with `{z}`, `{x}`, `{y}` (and optional
1545
2310
  `{s}` subdomain) placeholders — or a `{light, dark}` pair, chosen by the
1546
- chart's backdrop. Defaults to Esri's Light Gray and Dark Gray Canvas.
2311
+ chart's `theme` (the page behind it in `"auto"` mode). Defaults to
2312
+ Esri's Light Gray and Dark Gray Canvas.
1547
2313
  */
1548
2314
  tileUrl?: string | {
1549
2315
  light: string;
@@ -1553,7 +2319,15 @@ export interface D3plusConfig {
1553
2319
  tiles?: boolean;
1554
2320
  /** Time key for temporal data. */
1555
2321
  time?: string;
1556
- /** Predicate filtering which time slices are shown, or false to disable. */
2322
+ /**
2323
+ Predicate filtering which time slices are shown, or false to disable.
2324
+ With `time` set and no `timeFilter`, a chart starts on its latest
2325
+ period, or on `timelineDefault`/`timelineConfig.selection`; setting it
2326
+ starts the chart (and its timeline) on the periods it keeps. A
2327
+ viewer's pick on the timeline replaces it.
2328
+ @example
2329
+ {timeFilter: d => d.year === 2015}
2330
+ */
1557
2331
  timeFilter?: ((d: DataPoint, i: number) => boolean) | false;
1558
2332
  /** Whether to show the timeline component. */
1559
2333
  timeline?: boolean;
@@ -1571,8 +2345,28 @@ export interface D3plusConfig {
1571
2345
  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.
1572
2346
  */
1573
2347
  titlePadding?: boolean | ((viz: VizBase) => boolean);
1574
- /** Whether to show tooltips, or a `(datum, index)` accessor deciding per mark. */
1575
- tooltip?: boolean | ((d: DataPoint, i: number) => boolean);
2348
+ /**
2349
+ Gantt: draws a "today" line across the rows: `true` at the current
2350
+ time, or a date (or anything the axis parses) to mark that time. Off
2351
+ (`false`) by default; it only draws inside the time axis.
2352
+ */
2353
+ today?: boolean | Date | string | number;
2354
+ /**
2355
+ Gantt: styles the "today" line like a `referenceLines` entry: `stroke`,
2356
+ `strokeWidth` (1.5), `strokeOpacity` (0.85), `dash`, and its `label`
2357
+ (the translated "Today"; `false` for none), with the label's font and
2358
+ `labelPosition`.
2359
+ */
2360
+ todayConfig?: Omit<ReferenceLineConfig, "x" | "y" | "x2" | "y2" | "ref">;
2361
+ /**
2362
+ Whether to show tooltips, or a
2363
+ `(datum, index, {depth, maxDepth, legend})` accessor deciding per mark
2364
+ and legend entry. `depth` is the `groupBy` level (from 0) the hovered
2365
+ item stands for and `maxDepth` the deepest level, so
2366
+ `depth === maxDepth` keeps tooltips to the deepest level; `legend` is
2367
+ true for a legend entry. Defaults to `true`.
2368
+ */
2369
+ tooltip?: boolean | ((d: DataPoint, i: number, levels: TooltipLevels) => boolean);
1576
2370
  /** Configuration for the tooltip component. */
1577
2371
  tooltipConfig?: TooltipConfig;
1578
2372
  /**
@@ -1608,7 +2402,16 @@ export interface D3plusConfig {
1608
2402
  trendLineConfig?: TrendLineConfig;
1609
2403
  /** Path or object for the topojson data. */
1610
2404
  topojson?: string | object;
1611
- /** CSS color to fill the map shapes. */
2405
+ /**
2406
+ Geomap: transforms `topojson` before it is drawn. The function receives
2407
+ the loaded file (or the object passed as `topojson`) and returns the
2408
+ topojson to draw. It runs when the chart renders, whichever order
2409
+ `topojson` and `topojsonFormat` are set in, and setting it again re-runs
2410
+ it on the next render. Passing a formatter as the second argument of
2411
+ `topojson(url, format)` sets it, and setting `topojson` alone keeps it.
2412
+ */
2413
+ topojsonFormat?: (data: Record<string, unknown>) => object;
2414
+ /** Geomap: the fill of shapes without data (or without a `colorScale` value). Defaults to the theme's `colorScale.missing` when it sets one, else a quiet gray that suits the basemap. */
1612
2415
  topojsonFill?: CssColor;
1613
2416
  /** Accessor function for topojson feature IDs. */
1614
2417
  topojsonId?: (obj: Record<string, unknown>) => string;
@@ -1665,16 +2468,10 @@ export interface D3plusConfig {
1665
2468
  */
1666
2469
  xBreak?: [number, number] | [number, number][];
1667
2470
  /**
1668
- The x domain as an array. On a continuous axis it is `[min, max]`.
1669
- Setting just one end (`[min]` or `[undefined, max]`) pins only that
1670
- end: the data fills the other, rounded where the axis would round it
1671
- with no domain set (left at the data when `xConfig`'s `rounding`
1672
- is "none"; time axes aren't rounded). With both ends set, neither is
1673
- rounded. On a discrete axis it lists the categories to show, in
1674
- order; data in other categories is not drawn. A full `xConfig`
1675
- `domain` is the lower-level override: it wins over this, and is drawn
1676
- exactly as given (rounded only by `xConfig`'s own `rounding`),
1677
- without stretching to the chart's `baseline`.
2471
+ The x domain: `[min, max]` on a continuous axis, or the categories to
2472
+ show, in order, on a discrete one. Setting one end (`[min]` or
2473
+ `[undefined, max]`) pins only that end; the data fills the other. An
2474
+ `xConfig.domain` overrides this.
1678
2475
  */
1679
2476
  xDomain?: (number | string | Date)[];
1680
2477
  /** The x2 domain as an array. If either value is undefined, it is calculated from the data. */
@@ -1695,16 +2492,10 @@ export interface D3plusConfig {
1695
2492
  */
1696
2493
  yBreak?: [number, number] | [number, number][];
1697
2494
  /**
1698
- The y domain as an array. On a continuous axis it is `[min, max]`.
1699
- Setting just one end (`[min]` or `[undefined, max]`) pins only that
1700
- end: the data fills the other, rounded where the axis would round it
1701
- with no domain set (left at the data when `yConfig`'s `rounding`
1702
- is "none"; time axes aren't rounded). With both ends set, neither is
1703
- rounded. On a discrete axis it lists the categories to show, in
1704
- order; data in other categories is not drawn. A full `yConfig`
1705
- `domain` is the lower-level override: it wins over this, and is drawn
1706
- exactly as given (rounded only by `yConfig`'s own `rounding`),
1707
- without stretching to the chart's `baseline`.
2495
+ The y domain: `[min, max]` on a continuous axis, or the categories to
2496
+ show, in order, on a discrete one. Setting one end (`[min]` or
2497
+ `[undefined, max]`) pins only that end; the data fills the other. A
2498
+ `yConfig.domain` overrides this.
1708
2499
  */
1709
2500
  yDomain?: (number | string | Date)[];
1710
2501
  /** The y2 domain as an array. If either value is undefined, it is calculated from the data. */
@@ -1715,7 +2506,13 @@ export interface D3plusConfig {
1715
2506
  y2Sort?: (a: DataPoint, b: DataPoint) => number;
1716
2507
  /** Calendar: formats the year beside each year block — a d3-time-format specifier (default `"%Y"`), a function of the year's first day, or `false` for none. */
1717
2508
  yearFormat?: string | ((date: Date) => string) | false;
1718
- /** Enables pan/zoom with zoom-control buttons. On by default for every chart. */
2509
+ /**
2510
+ Enables pan and zoom: the mouse wheel or a pinch (see `zoomScroll`), a
2511
+ drag (see `zoomDrag`), a double-click (see `zoomDoubleClick`), the
2512
+ zoom-control buttons (see `zoomControls`), and the `zoomIn`, `zoomOut`,
2513
+ `zoomReset`, and `zoomBrush` methods. On by default for every chart;
2514
+ `false` turns all of them off.
2515
+ */
1719
2516
  zoom?: boolean;
1720
2517
  /** The pixel stroke-width of the zoom brush area. */
1721
2518
  zoomBrushHandleSize?: number;
@@ -1732,7 +2529,21 @@ export interface D3plusConfig {
1732
2529
  */
1733
2530
  zoomControlClassName?: string;
1734
2531
  /**
1735
- Overrides one or more of the four built-in zoom-control icons (`zoomIn`, `zoomOut`, `zoomReset`, `zoomBrush`), which otherwise render as inline SVGs. Each value is either an HTML string — used as the button's content in place of the built-in icon — or a mount function, `(el: HTMLElement) => void | (() => void)`, called once with the button's reserved icon slot (a 12x12px element) so you can mount anything imperative into it: a React tree (`createRoot(el).render(<Icon/>)`), a Vue app, a canvas sprite, a brand `<img>`. Return a cleanup function from the mount function if there's teardown to do; it runs right before that slot is discarded — which happens whenever the whole button panel's markup regenerates (a `.locale(...)` change, a `zoomControlClassName` change, or the brush toggle switching), not just once per chart.
2532
+ Whether the zoom-control buttons (zoom in, zoom out, reset, and brush)
2533
+ show in the chart's top-right corner. `false` hides them and gives the
2534
+ room they take back to the chart's title, legend, and other top
2535
+ content, while zooming stays on: the wheel, pinch, drag, and
2536
+ double-click gestures still work, and the chart's `zoomIn`, `zoomOut`,
2537
+ `zoomReset`, and `zoomBrush` methods let buttons of your own drive it.
2538
+ Defaults to `true`.
2539
+ */
2540
+ zoomControls?: boolean;
2541
+ /**
2542
+ Overrides the zoom-control icons (`zoomIn`, `zoomOut`, `zoomReset`,
2543
+ `zoomBrush`). Each value is an HTML string, or a mount function
2544
+ `(el) => void | (() => void)` called with the button's 12×12px icon slot
2545
+ (for a React tree, an `<img>`, …); a returned cleanup runs when the
2546
+ buttons redraw.
1736
2547
  */
1737
2548
  zoomControlIcons?: Partial<Record<"zoomIn" | "zoomOut" | "zoomReset" | "zoomBrush", string | ((el: HTMLElement) => void | (() => void))>>;
1738
2549
  /**
@@ -1747,11 +2558,27 @@ export interface D3plusConfig {
1747
2558
  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. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.
1748
2559
  */
1749
2560
  zoomControlStyleHover?: Record<string, unknown> | false;
2561
+ /**
2562
+ What a double-click on the chart does: `"in"` (the default) doubles
2563
+ the zoom around the pointer (Shift + double-click halves it),
2564
+ `"reset"` returns to the chart's initial view, like the reset button,
2565
+ and `false` does nothing.
2566
+ */
2567
+ zoomDoubleClick?: "in" | "reset" | false;
2568
+ /**
2569
+ What a mouse drag on the chart does. `"pan"` (the default) pans it
2570
+ (see `zoomPan`). `"brush"` draws a box and zooms into it on release,
2571
+ as the brush button does, without turning brush mode on: a click that
2572
+ doesn't drag still reaches the shape under it, and hovering still
2573
+ shows tooltips. Shift + drag pans in `"brush"` mode, and touch keeps
2574
+ panning and pinching as in `"pan"`.
2575
+ */
2576
+ zoomDrag?: "pan" | "brush";
1750
2577
  /** Multiplier applied to programmatic zoom steps. */
1751
2578
  zoomFactor?: number;
1752
2579
  /** Maximum zoom scale factor. Defaults to the scale at which the smallest shape fills the chart area. */
1753
2580
  zoomMax?: number;
1754
- /** A pixel value to be used to pad all sides of a zoomed area. */
2581
+ /** A pixel value to be used to pad all sides of a zoomed area. A Plot's brushed box fills its plot without it, so its axes show the brushed range. */
1755
2582
  zoomPadding?: number;
1756
2583
  /** Whether panning (drag) is enabled while zoomed. */
1757
2584
  zoomPan?: boolean;