@d3plus/core 4.9.0 → 4.11.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 (687) hide show
  1. package/es/index.js +1 -1
  2. package/es/internal.js +170 -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 +170 -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 +81 -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 +178 -0
  17. package/es/src/charts/ArcDiagram/events.js +144 -0
  18. package/es/src/charts/ArcDiagram/index.js +215 -0
  19. package/es/src/charts/BarChart/index.js +14 -2
  20. package/es/src/charts/BoxWhisker/index.js +95 -4
  21. package/es/src/charts/BoxWhisker/outliers.js +68 -0
  22. package/es/src/charts/BoxWhisker/summary.js +83 -0
  23. package/es/src/charts/BoxWhisker/tooltip.js +122 -0
  24. package/es/src/charts/BubbleChart/emit.js +31 -0
  25. package/es/src/charts/BubbleChart/index.js +54 -0
  26. package/es/src/charts/Bullet/index.js +2 -1
  27. package/es/src/charts/BumpChart/index.js +5 -0
  28. package/es/src/charts/Calendar/emit.js +1 -1
  29. package/es/src/charts/Calendar/index.js +5 -3
  30. package/es/src/charts/Candlestick/aggregate.js +11 -1
  31. package/es/src/charts/Candlestick/buffer.js +6 -4
  32. package/es/src/charts/Candlestick/index.js +7 -6
  33. package/es/src/charts/Chord/applyLayout.js +56 -69
  34. package/es/src/charts/Chord/emit.js +55 -24
  35. package/es/src/charts/Chord/index.js +17 -12
  36. package/es/src/charts/Chord/labels.js +105 -0
  37. package/es/src/charts/Donut/index.js +5 -11
  38. package/es/src/charts/Dumbbell/index.js +2 -4
  39. package/es/src/charts/Funnel/index.js +2 -1
  40. package/es/src/charts/Gantt/applyLayout.js +162 -0
  41. package/es/src/charts/Gantt/emit.js +142 -0
  42. package/es/src/charts/Gantt/ganttDecor.js +207 -0
  43. package/es/src/charts/Gantt/ganttGeometry.js +107 -0
  44. package/es/src/charts/Gantt/ganttLabels.js +85 -0
  45. package/es/src/charts/Gantt/ganttRows.js +111 -0
  46. package/es/src/charts/Gantt/ganttTooltip.js +136 -0
  47. package/es/src/charts/Gantt/index.js +219 -0
  48. package/es/src/charts/Gauge/index.js +2 -1
  49. package/es/src/charts/Geomap/applyLayout.js +90 -49
  50. package/es/src/charts/Geomap/basemapTheme.js +3 -48
  51. package/es/src/charts/Geomap/emit.js +19 -2
  52. package/es/src/charts/Geomap/flowEmit.js +132 -0
  53. package/es/src/charts/Geomap/flowEvents.js +86 -0
  54. package/es/src/charts/Geomap/flowFields.js +91 -0
  55. package/es/src/charts/Geomap/flowGeometry.js +225 -0
  56. package/es/src/charts/Geomap/flowLinks.js +239 -0
  57. package/es/src/charts/Geomap/geoCache.js +180 -0
  58. package/es/src/charts/Geomap/globeKeys.js +131 -0
  59. package/es/src/charts/Geomap/globeRotate.js +208 -0
  60. package/es/src/charts/Geomap/index.js +60 -19
  61. package/es/src/charts/Geomap/pointLabels.js +107 -0
  62. package/es/src/charts/Hexbin/binning.js +103 -0
  63. package/es/src/charts/Hexbin/buffer.js +33 -0
  64. package/es/src/charts/Hexbin/contourLabels.js +234 -0
  65. package/es/src/charts/Hexbin/contours.js +48 -0
  66. package/es/src/charts/Hexbin/emit.js +142 -0
  67. package/es/src/charts/Hexbin/index.js +204 -0
  68. package/es/src/charts/Hexbin/layers.js +212 -0
  69. package/es/src/charts/Hexbin/settings.js +86 -0
  70. package/es/src/charts/Hexbin/tooltip.js +77 -0
  71. package/es/src/charts/Histogram/binData.js +31 -4
  72. package/es/src/charts/Histogram/index.js +37 -16
  73. package/es/src/charts/Histogram/labels.js +18 -0
  74. package/es/src/charts/Icicle/index.js +3 -3
  75. package/es/src/charts/LinePlot/index.js +7 -0
  76. package/es/src/charts/Marimekko/index.js +7 -4
  77. package/es/src/charts/Matrix/index.js +3 -2
  78. package/es/src/charts/Network/applyLayout.js +138 -94
  79. package/es/src/charts/Network/bundle.js +81 -0
  80. package/es/src/charts/Network/clusterLabels.js +423 -0
  81. package/es/src/charts/Network/clusters.js +290 -0
  82. package/es/src/charts/Network/emit.js +253 -70
  83. package/es/src/charts/Network/graph.js +117 -0
  84. package/es/src/charts/Network/graphFluent.js +79 -0
  85. package/es/src/charts/Network/index.js +93 -108
  86. package/es/src/charts/Network/minNodeDistance.js +64 -0
  87. package/es/src/charts/Network/polygonRows.js +44 -0
  88. package/es/src/charts/Pack/index.js +7 -2
  89. package/es/src/charts/Pie/applyLayout.js +86 -27
  90. package/es/src/charts/Pie/arcFit.js +152 -0
  91. package/es/src/charts/Pie/curvedLabels.js +134 -0
  92. package/es/src/charts/Pie/emit.js +43 -96
  93. package/es/src/charts/Pie/index.js +66 -32
  94. package/es/src/charts/Pie/labelRoom.js +154 -0
  95. package/es/src/charts/Pie/outsideLabels.js +224 -0
  96. package/es/src/charts/Pie/outsideNodes.js +267 -0
  97. package/es/src/charts/Pie/pieLabels.js +137 -0
  98. package/es/src/charts/Pie/sectorBox.js +223 -0
  99. package/es/src/charts/Pie/straightLabels.js +96 -0
  100. package/es/src/charts/Pie/straightLayout.js +215 -0
  101. package/es/src/charts/Plot/alongLegend.js +76 -0
  102. package/es/src/charts/Plot/areaLabelsAlong.js +333 -0
  103. package/es/src/charts/Plot/axisHover.js +180 -0
  104. package/es/src/charts/Plot/axisHoverAnchors.js +174 -0
  105. package/es/src/charts/Plot/axisHoverScene.js +203 -0
  106. package/es/src/charts/Plot/axisValues.js +43 -0
  107. package/es/src/charts/Plot/barHitArea.js +81 -0
  108. package/es/src/charts/Plot/barLabelFit.js +123 -0
  109. package/es/src/charts/Plot/barWidth.js +61 -13
  110. package/es/src/charts/Plot/circleLabels.js +98 -0
  111. package/es/src/charts/Plot/confidenceConfig.js +2 -2
  112. package/es/src/charts/Plot/connectGaps.js +237 -0
  113. package/es/src/charts/Plot/connectGapsScene.js +188 -0
  114. package/es/src/charts/Plot/draw.js +14 -4
  115. package/es/src/charts/Plot/fillBetween.js +2 -1
  116. package/es/src/charts/Plot/forecastScene.js +3 -4
  117. package/es/src/charts/Plot/index.js +42 -15
  118. package/es/src/charts/Plot/labelPlacement.js +10 -2
  119. package/es/src/charts/Plot/lineLabelEmit.js +82 -0
  120. package/es/src/charts/Plot/lineLabelSides.js +51 -0
  121. package/es/src/charts/Plot/lineLabelSpread.js +65 -0
  122. package/es/src/charts/Plot/lineLabelsAlong.js +282 -0
  123. package/es/src/charts/Plot/openDomainEnds.js +2 -5
  124. package/es/src/charts/Plot/pipeline.js +71 -22
  125. package/es/src/charts/Plot/pipelineAxisLayout.js +42 -8
  126. package/es/src/charts/Plot/pipelineDomains.js +23 -6
  127. package/es/src/charts/Plot/pipelineLineLabels.js +145 -53
  128. package/es/src/charts/Plot/pipelineScales.js +40 -8
  129. package/es/src/charts/Plot/plotFacet.js +12 -1
  130. package/es/src/charts/Plot/plotInit.js +49 -5
  131. package/es/src/charts/Plot/plotRangeBreaks.js +85 -0
  132. package/es/src/charts/Plot/plotZoom.js +15 -6
  133. package/es/src/charts/Plot/referenceDomains.js +133 -0
  134. package/es/src/charts/Plot/shapeDefaults.js +14 -9
  135. package/es/src/charts/Plot/sharedHoverScene.js +50 -31
  136. package/es/src/charts/Plot/sharedTooltip.js +19 -7
  137. package/es/src/charts/Plot/stackHelpers.js +13 -1
  138. package/es/src/charts/Plot/stackLegendOrder.js +176 -0
  139. package/es/src/charts/Plot/stackShareTooltip.js +9 -4
  140. package/es/src/charts/Plot/stackThreshold.js +154 -0
  141. package/es/src/charts/Plot/trendLabels.js +183 -0
  142. package/es/src/charts/Plot/trendLines.js +1 -0
  143. package/es/src/charts/Plot/trendScene.js +6 -3
  144. package/es/src/charts/Plot/trendTooltip.js +5 -1
  145. package/es/src/charts/PolarArea/index.js +5 -4
  146. package/es/src/charts/Priestley/applyLayout.js +14 -20
  147. package/es/src/charts/Priestley/index.js +4 -34
  148. package/es/src/charts/Priestley/timeAxis.js +100 -0
  149. package/es/src/charts/Pyramid/index.js +4 -2
  150. package/es/src/charts/Radar/axisDecorations.js +49 -12
  151. package/es/src/charts/Radar/curvedLabels.js +187 -0
  152. package/es/src/charts/Radar/index.js +5 -5
  153. package/es/src/charts/RadialBar/curvedLabels.js +111 -0
  154. package/es/src/charts/RadialBar/emit.js +4 -1
  155. package/es/src/charts/RadialBar/index.js +18 -10
  156. package/es/src/charts/RadialBar/trackLayout.js +43 -13
  157. package/es/src/charts/RadialMatrix/index.js +6 -9
  158. package/es/src/charts/Rings/applyLayout.js +41 -24
  159. package/es/src/charts/Rings/emit.js +174 -58
  160. package/es/src/charts/Rings/index.js +65 -30
  161. package/es/src/charts/Rings/ringsGraph.js +28 -9
  162. package/es/src/charts/Rings/ringsLoops.js +73 -0
  163. package/es/src/charts/Rings/ringsParallel.js +166 -0
  164. package/es/src/charts/Sankey/applyLayout.js +116 -39
  165. package/es/src/charts/Sankey/circularLayout.js +208 -0
  166. package/es/src/charts/Sankey/circularLinks.js +301 -0
  167. package/es/src/charts/Sankey/emit.js +164 -94
  168. package/es/src/charts/Sankey/index.js +75 -77
  169. package/es/src/charts/Sankey/labels.js +80 -0
  170. package/es/src/charts/Sankey/ribbons.js +88 -0
  171. package/es/src/charts/Sankey/sankeyCycles.js +117 -0
  172. package/es/src/charts/Sankey/sankeyLayout.js +8 -3
  173. package/es/src/charts/Sankey/sankeyLinks.js +47 -0
  174. package/es/src/charts/Scatter/index.js +25 -0
  175. package/es/src/charts/SlopeChart/index.js +116 -0
  176. package/es/src/charts/SlopeChart/slope.js +95 -0
  177. package/es/src/charts/Streamgraph/index.js +51 -0
  178. package/es/src/charts/Sunburst/curvedLabels.js +74 -0
  179. package/es/src/charts/Sunburst/emit.js +74 -63
  180. package/es/src/charts/Sunburst/index.js +3 -3
  181. package/es/src/charts/Tree/index.js +2 -6
  182. package/es/src/charts/Treemap/applyLayout.js +14 -1
  183. package/es/src/charts/Treemap/emit.js +8 -2
  184. package/es/src/charts/Treemap/emitGroupHeaders.js +104 -0
  185. package/es/src/charts/Treemap/groupHeaders.js +95 -0
  186. package/es/src/charts/Treemap/index.js +17 -7
  187. package/es/src/charts/Treemap/thresholdFunction.js +11 -9
  188. package/es/src/charts/Violin/inner.js +3 -5
  189. package/es/src/charts/Waffle/index.js +4 -2
  190. package/es/src/charts/Waffle/tooltip.js +6 -2
  191. package/es/src/charts/Waterfall/index.js +4 -2
  192. package/es/src/charts/definition/makeChart.js +20 -5
  193. package/es/src/charts/drawSteps/backControl.js +17 -5
  194. package/es/src/charts/drawSteps/gestureHover.js +79 -0
  195. package/es/src/charts/drawSteps/minimap.js +6 -5
  196. package/es/src/charts/drawSteps/minimapMarkup.js +25 -9
  197. package/es/src/charts/drawSteps/saveChart.js +176 -0
  198. package/es/src/charts/drawSteps/saveControl.js +148 -0
  199. package/es/src/charts/drawSteps/saveControlMarkup.js +104 -0
  200. package/es/src/charts/drawSteps/searchControls.js +2 -1
  201. package/es/src/charts/drawSteps/searchControlsMarkup.js +11 -2
  202. package/es/src/charts/drawSteps/tableViewMarkup.js +18 -11
  203. package/es/src/charts/drawSteps/topLeftControls.js +3 -1
  204. package/es/src/charts/drawSteps/topLeftControlsMarkup.js +1 -1
  205. package/es/src/charts/drawSteps/zoomControls.js +21 -5
  206. package/es/src/charts/events/click.legend.js +7 -2
  207. package/es/src/charts/events/click.shape.js +38 -2
  208. package/es/src/charts/events/mouseenter.js +9 -0
  209. package/es/src/charts/events/mousemove.legend.js +3 -0
  210. package/es/src/charts/events/mousemove.shape.js +12 -4
  211. package/es/src/charts/facet/drawFacets.js +14 -5
  212. package/es/src/charts/facet/facetConfig.js +2 -2
  213. package/es/src/charts/facet/facetData.js +2 -2
  214. package/es/src/charts/features/annotationFrame.js +179 -0
  215. package/es/src/charts/features/annotationText.js +83 -0
  216. package/es/src/charts/features/annotationTypes.js +10 -0
  217. package/es/src/charts/features/attributionFeature.js +6 -11
  218. package/es/src/charts/features/axes.js +9 -7
  219. package/es/src/charts/features/axesFinal.js +26 -4
  220. package/es/src/charts/features/axesMeasure.js +61 -6
  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/chartGeometry.js +1 -1
  224. package/es/src/charts/features/circleLabelPlacement.js +297 -0
  225. package/es/src/charts/features/circleLabels.js +207 -0
  226. package/es/src/charts/features/colorScaleBucket.js +19 -1
  227. package/es/src/charts/features/colorScaleHover.js +70 -0
  228. package/es/src/charts/features/colorScaleValue.js +97 -0
  229. package/es/src/charts/features/curvedArrows.js +158 -0
  230. package/es/src/charts/features/edgeArrows.js +160 -4
  231. package/es/src/charts/features/edgeBundling.js +442 -0
  232. package/es/src/charts/features/edgeBundlingSmooth.js +117 -0
  233. package/es/src/charts/features/ensureZoomDom.js +32 -8
  234. package/es/src/charts/features/features.js +45 -15
  235. package/es/src/charts/features/featuresColorScale.js +62 -8
  236. package/es/src/charts/features/featuresLegend.js +21 -32
  237. package/es/src/charts/features/legendKeys.js +64 -0
  238. package/es/src/charts/features/lineLabels.js +55 -46
  239. package/es/src/charts/features/linkBundle.js +19 -0
  240. package/es/src/charts/features/linkColor.js +72 -0
  241. package/es/src/charts/features/linkFields.js +86 -0
  242. package/es/src/charts/features/linkFocus.js +118 -0
  243. package/es/src/charts/features/linkInteraction.js +312 -0
  244. package/es/src/charts/features/linkKeys.js +20 -0
  245. package/es/src/charts/features/linkLabelGeometry.js +209 -0
  246. package/es/src/charts/features/linkLabelPath.js +162 -0
  247. package/es/src/charts/features/linkLabels.js +340 -0
  248. package/es/src/charts/features/linkWidths.js +32 -0
  249. package/es/src/charts/features/pathLabelGeometry.js +232 -0
  250. package/es/src/charts/features/pathLabels.js +50 -0
  251. package/es/src/charts/features/plotAnnotations.js +68 -17
  252. package/es/src/charts/features/plotPaint.js +42 -15
  253. package/es/src/charts/features/polyline.js +129 -0
  254. package/es/src/charts/features/referenceAnnotations.js +403 -0
  255. package/es/src/charts/features/referenceLabelPlacement.js +106 -0
  256. package/es/src/charts/features/ringLabelNodes.js +93 -0
  257. package/es/src/charts/features/ringLabels.js +222 -0
  258. package/es/src/charts/features/sceneBounds.js +26 -6
  259. package/es/src/charts/features/selfLoops.js +306 -0
  260. package/es/src/charts/features/shapeEmit.js +67 -30
  261. package/es/src/charts/features/shareKey.js +15 -0
  262. package/es/src/charts/features/sharedFields.js +15 -2
  263. package/es/src/charts/features/textHalo.js +29 -0
  264. package/es/src/charts/features/thresholdMembers.js +71 -0
  265. package/es/src/charts/helpers/densityChart.js +3 -1
  266. package/es/src/charts/helpers/valueTitle.js +6 -3
  267. package/es/src/charts/index.js +8 -0
  268. package/es/src/charts/partition/chartFields.js +6 -5
  269. package/es/src/charts/partition/hierarchy.js +2 -0
  270. package/es/src/charts/partition/interaction.js +9 -5
  271. package/es/src/charts/partition/zoom.js +7 -6
  272. package/es/src/charts/pipeline/insetPlacement.js +14 -6
  273. package/es/src/charts/pipeline/preDrawData.js +77 -13
  274. package/es/src/charts/pipeline/runVizPipeline.js +5 -0
  275. package/es/src/charts/pipeline/vizDraw.js +40 -29
  276. package/es/src/charts/pipeline/vizPreDraw.js +29 -18
  277. package/es/src/charts/plotBuffers/discreteBuffer.js +7 -4
  278. package/es/src/charts/polar/config.js +2 -3
  279. package/es/src/charts/viz/Viz.js +82 -44
  280. package/es/src/charts/viz/VizBase.js +47 -19
  281. package/es/src/charts/viz/backgroundInk.js +13 -7
  282. package/es/src/charts/viz/dataPoller.js +52 -0
  283. package/es/src/charts/viz/focusRing.js +104 -0
  284. package/es/src/charts/viz/focusTargets.js +208 -0
  285. package/es/src/charts/viz/groupRow.js +35 -0
  286. package/es/src/charts/viz/history.js +74 -0
  287. package/es/src/charts/viz/interactionOpacity.js +19 -5
  288. package/es/src/charts/viz/keyboardNav.js +297 -0
  289. package/es/src/charts/viz/keyboardNavHost.js +95 -0
  290. package/es/src/charts/viz/loaderFormat.js +114 -0
  291. package/es/src/charts/viz/missingFields.js +123 -0
  292. package/es/src/charts/viz/mountTarget.js +9 -0
  293. package/es/src/charts/viz/nearestHover.js +183 -0
  294. package/es/src/charts/viz/nearestHoverSurface.js +92 -0
  295. package/es/src/charts/viz/ordinalColor.js +14 -12
  296. package/es/src/charts/viz/pageTheme.js +83 -0
  297. package/es/src/charts/viz/pointTooltipAnchor.js +59 -0
  298. package/es/src/charts/viz/pointVoronoi.js +124 -0
  299. package/es/src/charts/viz/reducedMotion.js +27 -0
  300. package/es/src/charts/viz/reportHandlerError.js +10 -0
  301. package/es/src/charts/viz/shapeClassTargets.js +18 -2
  302. package/es/src/charts/viz/simpleHover.js +2 -0
  303. package/es/src/charts/viz/vizClassName.js +31 -0
  304. package/es/src/charts/viz/vizDataPolling.js +172 -0
  305. package/es/src/charts/viz/vizDefaults.js +81 -23
  306. package/es/src/charts/viz/vizFields.js +53 -2
  307. package/es/src/charts/viz/vizRender.js +49 -28
  308. package/es/src/charts/viz/vizTheme.js +96 -0
  309. package/es/src/charts/viz/vizVisibility.js +14 -0
  310. package/es/src/components/Axis/Axis.js +34 -0
  311. package/es/src/components/Axis/AxisBottom.js +1 -0
  312. package/es/src/components/Axis/AxisLeft.js +1 -0
  313. package/es/src/components/Axis/AxisRight.js +1 -0
  314. package/es/src/components/Axis/AxisTop.js +1 -0
  315. package/es/src/components/Axis/axisBreak.js +4 -1
  316. package/es/src/components/Axis/axisDefaults.js +8 -10
  317. package/es/src/components/Axis/axisLabelAngle.js +175 -0
  318. package/es/src/components/Axis/axisLabelThinning.js +13 -4
  319. package/es/src/components/Axis/axisLayout.js +86 -19
  320. package/es/src/components/Axis/axisLayoutLabels.js +66 -13
  321. package/es/src/components/Axis/axisLayoutScale.js +10 -1
  322. package/es/src/components/Axis/axisRangeBreaks.js +77 -0
  323. package/es/src/components/Axis/axisRender.js +38 -9
  324. package/es/src/components/Axis/axisRounding.js +15 -4
  325. package/es/src/components/Axis/axisSlantWrap.js +39 -0
  326. package/es/src/components/Axis/brokenTimeScale.js +196 -0
  327. package/es/src/components/Axis/powTicks.js +73 -0
  328. package/es/src/components/Axis/rangeBreaks.js +201 -0
  329. package/es/src/components/Axis/timeValues.js +19 -4
  330. package/es/src/components/ColorScale/ColorScale.js +42 -36
  331. package/es/src/components/ColorScale/bucketBounds.js +64 -0
  332. package/es/src/components/ColorScale/colorScaleHoverMark.js +327 -0
  333. package/es/src/components/ColorScale/colorScaleRender.js +25 -1
  334. package/es/src/components/ColorScale/colorScaleScale.js +43 -24
  335. package/es/src/components/ColorScale/colorScaleType.js +26 -0
  336. package/es/src/components/Legend/Legend.js +3 -0
  337. package/es/src/components/Legend/legendConfig.js +2 -6
  338. package/es/src/components/SizeLegend/SizeLegend.js +1 -0
  339. package/es/src/components/TextBox.js +31 -65
  340. package/es/src/components/Timeline/Timeline.js +54 -54
  341. package/es/src/components/Timeline/brushSpan.js +78 -0
  342. package/es/src/components/Timeline/timelineConfig.js +27 -10
  343. package/es/src/components/Timeline/timelineMode.js +26 -0
  344. package/es/src/components/Timeline/timelineRender.js +51 -9
  345. package/es/src/components/Tooltip.js +28 -13
  346. package/es/src/components/fontStack.js +20 -0
  347. package/es/src/components/textBoxLayout.js +58 -21
  348. package/es/src/components/textBoxPath.js +73 -0
  349. package/es/src/components/textBoxScene.js +223 -0
  350. package/es/src/components/textBoxWords.js +70 -0
  351. package/es/src/shapes/Area.js +1 -0
  352. package/es/src/shapes/Bar.js +1 -0
  353. package/es/src/shapes/Box.js +67 -79
  354. package/es/src/shapes/Circle.js +1 -0
  355. package/es/src/shapes/Line.js +1 -0
  356. package/es/src/shapes/Path.js +1 -0
  357. package/es/src/shapes/Rect.js +1 -0
  358. package/es/src/shapes/Shape.js +1 -0
  359. package/es/src/shapes/Whisker.js +1 -0
  360. package/es/src/shapes/boxOutlierShape.js +19 -0
  361. package/es/src/shapes/boxStats.js +35 -0
  362. package/es/src/shapes/boxStyle.js +78 -0
  363. package/es/src/shapes/boxSummary.js +174 -0
  364. package/es/src/shapes/shapeStandalone.js +2 -0
  365. package/es/src/utils/BaseClass.js +44 -12
  366. package/es/src/utils/className.js +78 -0
  367. package/es/src/utils/configPrep.js +2 -1
  368. package/es/src/utils/configWarnings.js +25 -0
  369. package/es/src/utils/constant.js +13 -1
  370. package/es/src/utils/displayName.js +12 -0
  371. package/es/src/utils/fieldAccessor.js +31 -0
  372. package/es/src/utils/paintComponentScene.js +2 -0
  373. package/es/src/utils/theme.js +190 -0
  374. package/es/src/utils/themeInk.js +68 -0
  375. package/package.json +14 -10
  376. package/types/index.d.ts +8 -2
  377. package/types/internal.d.ts +253 -9
  378. package/types/src/charts/Alluvial/aggregate.d.ts +98 -0
  379. package/types/src/charts/Alluvial/applyLayout.d.ts +67 -0
  380. package/types/src/charts/Alluvial/dimensions.d.ts +40 -0
  381. package/types/src/charts/Alluvial/emit.d.ts +9 -0
  382. package/types/src/charts/Alluvial/hover.d.ts +31 -0
  383. package/types/src/charts/Alluvial/index.d.ts +27 -0
  384. package/types/src/charts/Alluvial/layout.d.ts +70 -0
  385. package/types/src/charts/Alluvial/meta.d.ts +54 -0
  386. package/types/src/charts/Alluvial/titles.d.ts +33 -0
  387. package/types/src/charts/ArcDiagram/applyLayout.d.ts +70 -0
  388. package/types/src/charts/ArcDiagram/arcGeometry.d.ts +150 -0
  389. package/types/src/charts/ArcDiagram/arcLabels.d.ts +89 -0
  390. package/types/src/charts/ArcDiagram/arcLoops.d.ts +48 -0
  391. package/types/src/charts/ArcDiagram/emit.d.ts +23 -0
  392. package/types/src/charts/ArcDiagram/events.d.ts +28 -0
  393. package/types/src/charts/ArcDiagram/index.d.ts +28 -0
  394. package/types/src/charts/BoxWhisker/index.d.ts +3 -1
  395. package/types/src/charts/BoxWhisker/outliers.d.ts +25 -0
  396. package/types/src/charts/BoxWhisker/summary.d.ts +39 -0
  397. package/types/src/charts/BoxWhisker/tooltip.d.ts +36 -0
  398. package/types/src/charts/BubbleChart/emit.d.ts +20 -0
  399. package/types/src/charts/BubbleChart/index.d.ts +16 -0
  400. package/types/src/charts/Candlestick/aggregate.d.ts +6 -0
  401. package/types/src/charts/Chord/applyLayout.d.ts +3 -0
  402. package/types/src/charts/Chord/labels.d.ts +66 -0
  403. package/types/src/charts/Donut/index.d.ts +2 -1
  404. package/types/src/charts/Gantt/applyLayout.d.ts +64 -0
  405. package/types/src/charts/Gantt/emit.d.ts +17 -0
  406. package/types/src/charts/Gantt/ganttDecor.d.ts +41 -0
  407. package/types/src/charts/Gantt/ganttGeometry.d.ts +57 -0
  408. package/types/src/charts/Gantt/ganttLabels.d.ts +41 -0
  409. package/types/src/charts/Gantt/ganttRows.d.ts +84 -0
  410. package/types/src/charts/Gantt/ganttTooltip.d.ts +57 -0
  411. package/types/src/charts/Gantt/index.d.ts +36 -0
  412. package/types/src/charts/Geomap/applyLayout.d.ts +8 -0
  413. package/types/src/charts/Geomap/basemapTheme.d.ts +2 -19
  414. package/types/src/charts/Geomap/emit.d.ts +2 -2
  415. package/types/src/charts/Geomap/flowEmit.d.ts +35 -0
  416. package/types/src/charts/Geomap/flowEvents.d.ts +20 -0
  417. package/types/src/charts/Geomap/flowFields.d.ts +7 -0
  418. package/types/src/charts/Geomap/flowGeometry.d.ts +91 -0
  419. package/types/src/charts/Geomap/flowLinks.d.ts +97 -0
  420. package/types/src/charts/Geomap/geoCache.d.ts +47 -0
  421. package/types/src/charts/Geomap/globeKeys.d.ts +41 -0
  422. package/types/src/charts/Geomap/globeRotate.d.ts +70 -0
  423. package/types/src/charts/Geomap/index.d.ts +3 -0
  424. package/types/src/charts/Geomap/pointLabels.d.ts +24 -0
  425. package/types/src/charts/Hexbin/binning.d.ts +64 -0
  426. package/types/src/charts/Hexbin/buffer.d.ts +18 -0
  427. package/types/src/charts/Hexbin/contourLabels.d.ts +95 -0
  428. package/types/src/charts/Hexbin/contours.d.ts +48 -0
  429. package/types/src/charts/Hexbin/emit.d.ts +23 -0
  430. package/types/src/charts/Hexbin/index.d.ts +25 -0
  431. package/types/src/charts/Hexbin/layers.d.ts +94 -0
  432. package/types/src/charts/Hexbin/settings.d.ts +122 -0
  433. package/types/src/charts/Hexbin/tooltip.d.ts +26 -0
  434. package/types/src/charts/Histogram/binData.d.ts +20 -1
  435. package/types/src/charts/Histogram/index.d.ts +3 -2
  436. package/types/src/charts/Histogram/labels.d.ts +7 -0
  437. package/types/src/charts/Marimekko/index.d.ts +2 -1
  438. package/types/src/charts/Network/bundle.d.ts +67 -0
  439. package/types/src/charts/Network/clusterLabels.d.ts +112 -0
  440. package/types/src/charts/Network/clusters.d.ts +115 -0
  441. package/types/src/charts/Network/graph.d.ts +65 -0
  442. package/types/src/charts/Network/graphFluent.d.ts +20 -0
  443. package/types/src/charts/Network/minNodeDistance.d.ts +18 -0
  444. package/types/src/charts/Network/polygonRows.d.ts +29 -0
  445. package/types/src/charts/Pie/applyLayout.d.ts +31 -3
  446. package/types/src/charts/Pie/arcFit.d.ts +63 -0
  447. package/types/src/charts/Pie/curvedLabels.d.ts +57 -0
  448. package/types/src/charts/Pie/labelRoom.d.ts +83 -0
  449. package/types/src/charts/Pie/outsideLabels.d.ts +119 -0
  450. package/types/src/charts/Pie/outsideNodes.d.ts +93 -0
  451. package/types/src/charts/Pie/pieLabels.d.ts +85 -0
  452. package/types/src/charts/Pie/sectorBox.d.ts +95 -0
  453. package/types/src/charts/Pie/straightLabels.d.ts +24 -0
  454. package/types/src/charts/Pie/straightLayout.d.ts +88 -0
  455. package/types/src/charts/Plot/alongLegend.d.ts +42 -0
  456. package/types/src/charts/Plot/areaLabelsAlong.d.ts +119 -0
  457. package/types/src/charts/Plot/axisHover.d.ts +68 -0
  458. package/types/src/charts/Plot/axisHoverAnchors.d.ts +88 -0
  459. package/types/src/charts/Plot/axisHoverScene.d.ts +88 -0
  460. package/types/src/charts/Plot/axisValues.d.ts +24 -0
  461. package/types/src/charts/Plot/barHitArea.d.ts +59 -0
  462. package/types/src/charts/Plot/barLabelFit.d.ts +81 -0
  463. package/types/src/charts/Plot/barWidth.d.ts +38 -4
  464. package/types/src/charts/Plot/circleLabels.d.ts +29 -0
  465. package/types/src/charts/Plot/connectGaps.d.ts +99 -0
  466. package/types/src/charts/Plot/connectGapsScene.d.ts +55 -0
  467. package/types/src/charts/Plot/forecastScene.d.ts +5 -0
  468. package/types/src/charts/Plot/index.d.ts +28 -8
  469. package/types/src/charts/Plot/labelPlacement.d.ts +5 -0
  470. package/types/src/charts/Plot/lineLabelEmit.d.ts +48 -0
  471. package/types/src/charts/Plot/lineLabelSides.d.ts +50 -0
  472. package/types/src/charts/Plot/lineLabelSpread.d.ts +15 -0
  473. package/types/src/charts/Plot/lineLabelsAlong.d.ts +116 -0
  474. package/types/src/charts/Plot/pipeline.d.ts +15 -1
  475. package/types/src/charts/Plot/pipelineLineLabels.d.ts +68 -0
  476. package/types/src/charts/Plot/plotFacet.d.ts +5 -0
  477. package/types/src/charts/Plot/plotInit.d.ts +23 -2
  478. package/types/src/charts/Plot/plotRangeBreaks.d.ts +35 -0
  479. package/types/src/charts/Plot/plotZoom.d.ts +2 -0
  480. package/types/src/charts/Plot/referenceDomains.d.ts +49 -0
  481. package/types/src/charts/Plot/sharedHoverScene.d.ts +3 -3
  482. package/types/src/charts/Plot/sharedTooltip.d.ts +11 -4
  483. package/types/src/charts/Plot/stackHelpers.d.ts +5 -0
  484. package/types/src/charts/Plot/stackLegendOrder.d.ts +83 -0
  485. package/types/src/charts/Plot/stackThreshold.d.ts +75 -0
  486. package/types/src/charts/Plot/trendLabels.d.ts +73 -0
  487. package/types/src/charts/Plot/trendTooltip.d.ts +6 -0
  488. package/types/src/charts/Priestley/timeAxis.d.ts +76 -0
  489. package/types/src/charts/Radar/axisDecorations.d.ts +7 -2
  490. package/types/src/charts/Radar/curvedLabels.d.ts +94 -0
  491. package/types/src/charts/RadialBar/curvedLabels.d.ts +31 -0
  492. package/types/src/charts/RadialBar/trackLayout.d.ts +34 -3
  493. package/types/src/charts/Rings/emit.d.ts +50 -0
  494. package/types/src/charts/Rings/ringsGraph.d.ts +10 -2
  495. package/types/src/charts/Rings/ringsLoops.d.ts +13 -0
  496. package/types/src/charts/Rings/ringsParallel.d.ts +43 -0
  497. package/types/src/charts/Sankey/circularLayout.d.ts +103 -0
  498. package/types/src/charts/Sankey/circularLinks.d.ts +178 -0
  499. package/types/src/charts/Sankey/emit.d.ts +58 -0
  500. package/types/src/charts/Sankey/labels.d.ts +19 -0
  501. package/types/src/charts/Sankey/ribbons.d.ts +36 -0
  502. package/types/src/charts/Sankey/sankeyCycles.d.ts +24 -0
  503. package/types/src/charts/Sankey/sankeyLayout.d.ts +6 -0
  504. package/types/src/charts/Sankey/sankeyLinks.d.ts +36 -0
  505. package/types/src/charts/Scatter/index.d.ts +15 -0
  506. package/types/src/charts/SlopeChart/index.d.ts +43 -0
  507. package/types/src/charts/SlopeChart/slope.d.ts +43 -0
  508. package/types/src/charts/Streamgraph/index.d.ts +28 -0
  509. package/types/src/charts/Sunburst/curvedLabels.d.ts +56 -0
  510. package/types/src/charts/Treemap/emit.d.ts +2 -1
  511. package/types/src/charts/Treemap/emitGroupHeaders.d.ts +16 -0
  512. package/types/src/charts/Treemap/groupHeaders.d.ts +91 -0
  513. package/types/src/charts/Treemap/index.d.ts +2 -0
  514. package/types/src/charts/Treemap/thresholdFunction.d.ts +5 -2
  515. package/types/src/charts/definition/ChartDefinition.d.ts +27 -2
  516. package/types/src/charts/definition/makeChart.d.ts +5 -3
  517. package/types/src/charts/drawSteps/backControl.d.ts +7 -22
  518. package/types/src/charts/drawSteps/gestureHover.d.ts +33 -0
  519. package/types/src/charts/drawSteps/minimapMarkup.d.ts +5 -4
  520. package/types/src/charts/drawSteps/saveChart.d.ts +47 -0
  521. package/types/src/charts/drawSteps/saveControl.d.ts +9 -0
  522. package/types/src/charts/drawSteps/saveControlMarkup.d.ts +44 -0
  523. package/types/src/charts/drawSteps/tableViewMarkup.d.ts +4 -1
  524. package/types/src/charts/drawSteps/topLeftControls.d.ts +1 -1
  525. package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +1 -1
  526. package/types/src/charts/drawSteps/zoomGesture.d.ts +32 -0
  527. package/types/src/charts/events/click.legend.d.ts +2 -1
  528. package/types/src/charts/facet/facetConfig.d.ts +4 -2
  529. package/types/src/charts/facet/facetData.d.ts +1 -1
  530. package/types/src/charts/features/annotationFrame.d.ts +108 -0
  531. package/types/src/charts/features/annotationText.d.ts +57 -0
  532. package/types/src/charts/features/annotationTypes.d.ts +161 -0
  533. package/types/src/charts/features/axesMeasure.d.ts +13 -1
  534. package/types/src/charts/features/calloutLayout.d.ts +78 -0
  535. package/types/src/charts/features/calloutScene.d.ts +40 -0
  536. package/types/src/charts/features/chartGeometry.d.ts +1 -1
  537. package/types/src/charts/features/circleLabelPlacement.d.ts +97 -0
  538. package/types/src/charts/features/circleLabels.d.ts +130 -0
  539. package/types/src/charts/features/colorScaleBucket.d.ts +9 -0
  540. package/types/src/charts/features/colorScaleHover.d.ts +32 -0
  541. package/types/src/charts/features/colorScaleValue.d.ts +35 -0
  542. package/types/src/charts/features/curvedArrows.d.ts +105 -0
  543. package/types/src/charts/features/edgeArrows.d.ts +74 -2
  544. package/types/src/charts/features/edgeBundling.d.ts +86 -0
  545. package/types/src/charts/features/edgeBundlingSmooth.d.ts +29 -0
  546. package/types/src/charts/features/ensureZoomDom.d.ts +19 -1
  547. package/types/src/charts/features/features.d.ts +8 -0
  548. package/types/src/charts/features/featuresLegend.d.ts +4 -3
  549. package/types/src/charts/features/legendKeys.d.ts +34 -0
  550. package/types/src/charts/features/lineLabels.d.ts +15 -12
  551. package/types/src/charts/features/linkBundle.d.ts +16 -0
  552. package/types/src/charts/features/linkColor.d.ts +48 -0
  553. package/types/src/charts/features/linkFields.d.ts +16 -0
  554. package/types/src/charts/features/linkFocus.d.ts +51 -0
  555. package/types/src/charts/features/linkInteraction.d.ts +183 -0
  556. package/types/src/charts/features/linkKeys.d.ts +11 -0
  557. package/types/src/charts/features/linkLabelGeometry.d.ts +67 -0
  558. package/types/src/charts/features/linkLabelPath.d.ts +85 -0
  559. package/types/src/charts/features/linkLabels.d.ts +77 -0
  560. package/types/src/charts/features/linkWidths.d.ts +19 -0
  561. package/types/src/charts/features/pathLabelGeometry.d.ts +99 -0
  562. package/types/src/charts/features/pathLabels.d.ts +41 -0
  563. package/types/src/charts/features/plotAnnotations.d.ts +23 -8
  564. package/types/src/charts/features/plotPaint.d.ts +19 -0
  565. package/types/src/charts/features/polyline.d.ts +32 -0
  566. package/types/src/charts/features/referenceAnnotations.d.ts +130 -0
  567. package/types/src/charts/features/referenceLabelPlacement.d.ts +58 -0
  568. package/types/src/charts/features/ringLabelNodes.d.ts +63 -0
  569. package/types/src/charts/features/ringLabels.d.ts +164 -0
  570. package/types/src/charts/features/sceneBounds.d.ts +6 -0
  571. package/types/src/charts/features/selfLoops.d.ts +165 -0
  572. package/types/src/charts/features/shapeEmit.d.ts +5 -1
  573. package/types/src/charts/features/shareKey.d.ts +9 -0
  574. package/types/src/charts/features/sharedFields.d.ts +11 -2
  575. package/types/src/charts/features/textHalo.d.ts +14 -0
  576. package/types/src/charts/features/thresholdMembers.d.ts +38 -0
  577. package/types/src/charts/helpers/valueTitle.d.ts +4 -2
  578. package/types/src/charts/index.d.ts +8 -0
  579. package/types/src/charts/partition/interaction.d.ts +6 -3
  580. package/types/src/charts/partition/zoom.d.ts +4 -4
  581. package/types/src/charts/pipeline/preDrawData.d.ts +14 -1
  582. package/types/src/charts/pipeline/stages.d.ts +9 -0
  583. package/types/src/charts/pipeline/vizDraw.d.ts +8 -3
  584. package/types/src/charts/pipeline/vizPreDraw.d.ts +3 -2
  585. package/types/src/charts/plotBuffers/discreteBuffer.d.ts +0 -5
  586. package/types/src/charts/viz/Viz.d.ts +44 -6
  587. package/types/src/charts/viz/VizBase.d.ts +16 -7
  588. package/types/src/charts/viz/backgroundInk.d.ts +11 -4
  589. package/types/src/charts/viz/dataPoller.d.ts +28 -0
  590. package/types/src/charts/viz/focusRing.d.ts +25 -0
  591. package/types/src/charts/viz/focusTargets.d.ts +56 -0
  592. package/types/src/charts/viz/groupRow.d.ts +24 -0
  593. package/types/src/charts/viz/history.d.ts +35 -0
  594. package/types/src/charts/viz/interactionOpacity.d.ts +3 -1
  595. package/types/src/charts/viz/keyboardNav.d.ts +55 -0
  596. package/types/src/charts/viz/keyboardNavHost.d.ts +53 -0
  597. package/types/src/charts/viz/loaderFormat.d.ts +78 -0
  598. package/types/src/charts/viz/missingFields.d.ts +57 -0
  599. package/types/src/charts/viz/mountTarget.d.ts +7 -0
  600. package/types/src/charts/viz/nearestHover.d.ts +75 -0
  601. package/types/src/charts/viz/nearestHoverSurface.d.ts +21 -0
  602. package/types/src/charts/viz/ordinalColor.d.ts +10 -8
  603. package/types/src/charts/viz/pageTheme.d.ts +34 -0
  604. package/types/src/charts/viz/pointTooltipAnchor.d.ts +36 -0
  605. package/types/src/charts/viz/pointVoronoi.d.ts +65 -0
  606. package/types/src/charts/viz/reducedMotion.d.ts +25 -0
  607. package/types/src/charts/viz/reportHandlerError.d.ts +7 -0
  608. package/types/src/charts/viz/shapeClassTargets.d.ts +6 -0
  609. package/types/src/charts/viz/simpleHover.d.ts +2 -1
  610. package/types/src/charts/viz/vizClassName.d.ts +23 -0
  611. package/types/src/charts/viz/vizDataPolling.d.ts +48 -0
  612. package/types/src/charts/viz/vizDefaults.d.ts +49 -9
  613. package/types/src/charts/viz/vizFields.d.ts +47 -0
  614. package/types/src/charts/viz/vizRender.d.ts +2 -1
  615. package/types/src/charts/viz/vizTheme.d.ts +40 -0
  616. package/types/src/charts/viz/vizTypes.d.ts +117 -8
  617. package/types/src/charts/viz/vizVisibility.d.ts +6 -0
  618. package/types/src/components/Axis/Axis.d.ts +37 -8
  619. package/types/src/components/Axis/AxisBottom.d.ts +1 -0
  620. package/types/src/components/Axis/AxisLeft.d.ts +1 -0
  621. package/types/src/components/Axis/AxisRight.d.ts +1 -0
  622. package/types/src/components/Axis/AxisTop.d.ts +1 -0
  623. package/types/src/components/Axis/axisBreak.d.ts +2 -0
  624. package/types/src/components/Axis/axisLabelAngle.d.ts +110 -0
  625. package/types/src/components/Axis/axisLabelThinning.d.ts +3 -7
  626. package/types/src/components/Axis/axisLayout.d.ts +5 -0
  627. package/types/src/components/Axis/axisLayoutLabels.d.ts +13 -0
  628. package/types/src/components/Axis/axisRangeBreaks.d.ts +25 -0
  629. package/types/src/components/Axis/axisRounding.d.ts +6 -3
  630. package/types/src/components/Axis/axisSlantWrap.d.ts +22 -0
  631. package/types/src/components/Axis/brokenTimeScale.d.ts +51 -0
  632. package/types/src/components/Axis/powTicks.d.ts +29 -0
  633. package/types/src/components/Axis/rangeBreaks.d.ts +82 -0
  634. package/types/src/components/Axis/timeValues.d.ts +1 -1
  635. package/types/src/components/ColorScale/ColorScale.d.ts +14 -0
  636. package/types/src/components/ColorScale/bucketBounds.d.ts +28 -0
  637. package/types/src/components/ColorScale/colorScaleHoverMark.d.ts +86 -0
  638. package/types/src/components/ColorScale/colorScaleScale.d.ts +3 -0
  639. package/types/src/components/ColorScale/colorScaleType.d.ts +17 -0
  640. package/types/src/components/Legend/Legend.d.ts +1 -0
  641. package/types/src/components/SizeLegend/SizeLegend.d.ts +1 -0
  642. package/types/src/components/TextBox.d.ts +1 -0
  643. package/types/src/components/Timeline/Timeline.d.ts +1 -0
  644. package/types/src/components/Timeline/brushSpan.d.ts +41 -0
  645. package/types/src/components/Timeline/timelineConfig.d.ts +11 -0
  646. package/types/src/components/Timeline/timelineMode.d.ts +17 -0
  647. package/types/src/components/Timeline/timelineRender.d.ts +8 -0
  648. package/types/src/components/Tooltip.d.ts +12 -3
  649. package/types/src/components/fontStack.d.ts +10 -0
  650. package/types/src/components/textBoxLayout.d.ts +18 -9
  651. package/types/src/components/textBoxPath.d.ts +59 -0
  652. package/types/src/components/textBoxScene.d.ts +51 -0
  653. package/types/src/components/textBoxWords.d.ts +33 -0
  654. package/types/src/shapes/Area.d.ts +1 -0
  655. package/types/src/shapes/Bar.d.ts +1 -0
  656. package/types/src/shapes/Box.d.ts +2 -8
  657. package/types/src/shapes/Circle.d.ts +1 -0
  658. package/types/src/shapes/Line.d.ts +1 -0
  659. package/types/src/shapes/Path.d.ts +1 -0
  660. package/types/src/shapes/Rect.d.ts +1 -0
  661. package/types/src/shapes/Shape.d.ts +1 -0
  662. package/types/src/shapes/Whisker.d.ts +1 -0
  663. package/types/src/shapes/boxOutlierShape.d.ts +9 -0
  664. package/types/src/shapes/boxStats.d.ts +19 -0
  665. package/types/src/shapes/boxStyle.d.ts +25 -0
  666. package/types/src/shapes/boxSummary.d.ts +66 -0
  667. package/types/src/shapes/emitLabels.d.ts +1 -1
  668. package/types/src/shapes/shapeConfig.d.ts +42 -4
  669. package/types/src/utils/BaseClass.d.ts +32 -0
  670. package/types/src/utils/D3Scale.d.ts +3 -0
  671. package/types/src/utils/D3plusConfig.d.ts +1240 -33
  672. package/types/src/utils/className.d.ts +64 -0
  673. package/types/src/utils/configPrep.d.ts +2 -0
  674. package/types/src/utils/configWarnings.d.ts +21 -2
  675. package/types/src/utils/constant.d.ts +8 -0
  676. package/types/src/utils/displayName.d.ts +10 -0
  677. package/types/src/utils/fieldAccessor.d.ts +24 -0
  678. package/types/src/utils/index.d.ts +1 -1
  679. package/types/src/utils/paintComponentScene.d.ts +3 -1
  680. package/types/src/utils/theme.d.ts +170 -0
  681. package/types/src/utils/themeInk.d.ts +56 -0
  682. package/umd/d3plus-core.full.js +87388 -56271
  683. package/umd/d3plus-core.full.min.js +2 -2
  684. package/umd/d3plus-core.js +37988 -11768
  685. package/umd/d3plus-core.min.js +2 -2
  686. package/es/src/components/Axis/gridStroke.js +0 -10
  687. package/types/src/components/Axis/gridStroke.d.ts +0 -8
@@ -2,13 +2,24 @@ 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";
18
+ import type { ColorScaleTypeSetting } from "../components/ColorScale/colorScaleType.js";
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";
12
23
  type Position = "top" | "right" | "bottom" | "left";
13
24
  /** 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). */
14
25
  type PanelPosition = Position | "auto";
@@ -89,6 +100,28 @@ export interface AxisConfig {
89
100
  same defaults, as `baselineBreakConfig`.
90
101
  */
91
102
  breakConfig?: Record<string, string | number | boolean | Record<string, string | number>>;
103
+ /**
104
+ Stretches of time to hide from a time axis, so the data closes up
105
+ around them (like weekends and nights on a stock chart): one rule or a
106
+ list of them. `"weekends"` hides every Saturday and Sunday;
107
+ `{days: [5, 6]}` hides those days of the week (0 is Sunday);
108
+ `{hours: [17, 9]}` hides the same hours every day, wrapping past
109
+ midnight when the first is later (fractions are minutes, so `9.5` is
110
+ 9:30); `{values: [date, …]}` hides each listed date's whole day, such
111
+ as holidays; and `{bounds: [start, end]}` hides one range, from `start`
112
+ up to `end`. Rules read the calendar in local time, as the axis's date
113
+ labels do. In a Plot, rules on an axis whose values are dates make it
114
+ a time axis even without `time`, and a chart's timeline takes the
115
+ rules of the axis that plots its `time` (see `timelineConfig`). Shown time keeps one shared scale, ticks and labels never
116
+ land in hidden time, lines and areas connect across it, and rows whose
117
+ time is hidden are not drawn. A rule's `marker` draws the `break`
118
+ marker where its time was removed, in a gap of `breakConfig.space`
119
+ pixels: on by default for `bounds`, off for the others, which recur
120
+ too often to mark.
121
+ @example
122
+ {rangeBreaks: ["weekends", {hours: [16, 9.5]}, {values: ["2024-07-04"]}]}
123
+ */
124
+ rangeBreaks?: false | RangeBreakRule | RangeBreakRule[];
92
125
  /** Grid values of the axis. */
93
126
  grid?: unknown[];
94
127
  gridConfig?: Record<string, string | number>;
@@ -103,6 +136,18 @@ export interface AxisConfig {
103
136
  */
104
137
  labels?: unknown[];
105
138
  labelOffset?: false | number;
139
+ /**
140
+ Whether to rotate the axis labels, and by how much: `true` rotates
141
+ them -90 degrees, `false` keeps them flat, and a number rotates them
142
+ by that many degrees (clockwise, so `-45` rises to the right), each
143
+ label hanging off the axis from the end of its text nearest the axis,
144
+ across from its tick, and wrapping onto up to three lines when its
145
+ neighbors leave room. Left `undefined` (the default), a horizontal
146
+ axis of categories slants its labels 30 degrees when they would not
147
+ fit flat, or stands them at -90 when they are too crowded to slant.
148
+ See Axis's `labelRotation`.
149
+ */
150
+ labelRotation?: boolean | number;
106
151
  /**
107
152
  Exact size of the space that contains the axis tick labels and title.
108
153
  Labels that need more room overflow outward instead of moving the axis
@@ -141,6 +186,25 @@ export interface AxisConfig {
141
186
  rounding?: "none" | "outside" | "inside";
142
187
  /** Scale of the axis. */
143
188
  scale?: AxisScale;
189
+ /**
190
+ The exponent of a `"pow"` axis (`scale: "pow"`): below 1 it spreads the
191
+ small values out and squeezes the large ones together (`0.5` matches
192
+ a `"sqrt"` axis), above 1 it does the opposite. Defaults to `1`, which
193
+ draws like a linear axis. Only a `"pow"` axis reads it; on any other
194
+ scale it has no effect, and a value that isn't a positive number falls
195
+ back to `1`. Ticks are spaced evenly along a power axis and rounded to
196
+ round values.
197
+ */
198
+ exponent?: number;
199
+ /**
200
+ Whether to flip the axis's direction, so its values run the other
201
+ way: a horizontal axis from right to left, a vertical one from top to
202
+ bottom (a Plot's y axis, categories included, normally runs bottom to
203
+ top, so reversing it lists them from the top). Everything placed on
204
+ the axis follows it: shapes, tick labels, gridlines, breaks, zooming,
205
+ and hover badges. Defaults to `false`.
206
+ */
207
+ reverse?: boolean;
144
208
  /** The shape drawn at each tick: `"Line"` (the default), `"Rect"`, or `"Circle"`. */
145
209
  shape?: "Line" | "Rect" | "Circle";
146
210
  /** Tick style of the axis. */
@@ -172,6 +236,12 @@ export interface AxisConfig {
172
236
  export interface TooltipConfig {
173
237
  /** The inner HTML content of the arrow element, empty by default. */
174
238
  arrow?: ((d: DataPoint) => string) | string;
239
+ /**
240
+ CSS classes added to each tooltip element, beside its fixed
241
+ `d3plus-tooltip` class, so page CSS can style one chart's tooltips: a
242
+ space-separated string or an array.
243
+ */
244
+ className?: string | string[];
175
245
  /** The background color accessor for each tooltip. */
176
246
  background?: ((d: DataPoint) => CssColor) | CssColor;
177
247
  /** The border accessor for each tooltip. */
@@ -251,11 +321,22 @@ export interface TextBoxConfig {
251
321
  /**
252
322
  Handles truncated lines, returning the new line value. Passed the line's
253
323
  text and number; by default appends an ellipsis to every line except a
254
- first word that cannot fit (which returns "").
324
+ first word that cannot fit (which returns ""). The ended line is
325
+ measured, and words come off its end until it fits the box.
255
326
  */
256
327
  ellipsis?: (text: string, line: number) => string;
328
+ /**
329
+ Lets truncated text cut a word: the word that did not fit (or a first
330
+ word wider than the box) is cut to the longest start that fits with the
331
+ `ellipsis`, by whole characters, so emoji and accented letters are never
332
+ split. Defaults to `false`, which only breaks between words, and draws
333
+ nothing when the first word does not fit.
334
+ */
335
+ truncateWord?: Accessor<boolean>;
257
336
  /** The padding as a CSS shorthand string or number. Defaults to 0. */
258
337
  padding?: Accessor<string | number>;
338
+ /** The rotation of each text box, in degrees about its `rotateAnchor`. */
339
+ rotate?: Accessor<number>;
259
340
  /** The anchor point around which to rotate the text box. */
260
341
  rotateAnchor?: Accessor<[number, number]>;
261
342
  /** The word split function: given a string, returns it split into an array of words. */
@@ -268,21 +349,113 @@ export interface TextBoxConfig {
268
349
  x?: Accessor<number>;
269
350
  /** The y position (top edge) for each text box. */
270
351
  y?: Accessor<number>;
352
+ /**
353
+ The horizontal alignment of each line in its box. `"start"`,
354
+ `"middle"`, and `"end"` align lines to the box's start edge, center, or
355
+ end edge (the start is the right edge in right-to-left text).
356
+ `"justify"` spreads each line's words across the box, or its characters
357
+ in CJK text, leaving a paragraph's last line and any line that ends at a
358
+ newline start-aligned. A percentage such as `"25%"` places each line
359
+ that share of the way across the box, so `"0%"`, `"50%"`, and `"100%"`
360
+ match start, middle, and end; percentages follow the writing direction.
361
+ */
362
+ textAnchor?: Accessor<"start" | "middle" | "end" | "justify" | `${number}%`>;
363
+ /**
364
+ An SVG path `d` (or a `(datum, index)` accessor returning one) for the
365
+ text to follow, in coordinates relative to the box's `x` and `y`. The
366
+ text is drawn as one line with its baseline on the path, wrapped to the
367
+ path's length past `startOffset` (and cut short with the `ellipsis` and
368
+ `truncateWord`). `textAnchor` places it along that stretch of path:
369
+ `"middle"` centers it, `"end"` ends it at the path's end, a percentage
370
+ places it that share along, and `"justify"` reads as `"start"`, since
371
+ the one line ends its paragraph. Falsy draws the text in its box.
372
+ */
373
+ textPath?: Accessor<string | false | null>;
374
+ /**
375
+ Where along the `textPath` the text's room begins: a distance in pixels,
376
+ or a percentage of the path's length such as `"25%"`. Defaults to 0.
377
+ */
378
+ startOffset?: Accessor<number | `${number}%`>;
379
+ /**
380
+ Which side of the `textPath` the text sits on, read in the path's
381
+ direction: `"left"` (the default) follows the path as drawn, with the
382
+ text above a left-to-right path, and `"right"` follows it backwards, so
383
+ the text sits on its other side.
384
+ */
385
+ side?: Accessor<"left" | "right">;
386
+ /**
387
+ Draws a transparent rect behind each box, so a hover or click anywhere
388
+ in the box (padding included), not just on its glyphs, reaches the
389
+ box's datum. `true`, or `{padding}` (a number or CSS shorthand) to
390
+ reach further than the box. Text on a path gets the path's bounds grown
391
+ by a font size. Defaults to `false`.
392
+ */
393
+ hitbox?: Accessor<boolean | {
394
+ padding?: number | string;
395
+ }>;
396
+ /** The vertical alignment of the lines in each box. */
397
+ verticalAlign?: Accessor<"top" | "middle" | "bottom">;
398
+ /** Whether the text receives pointer events (`"none"` lets them through to what is underneath). */
399
+ pointerEvents?: Accessor<"auto" | "none">;
400
+ /**
401
+ The inline HTML tags to draw as styles: a map of tag names to CSS
402
+ declarations, `true` for the defaults (`<b>`, `<strong>`, `<i>`, `<em>`),
403
+ or `false` to draw tags as text.
404
+ */
405
+ html?: boolean | Record<string, string>;
271
406
  /** The outline text wraps within, `"square"` or `"circle"`, or a `(datum, index)` accessor. */
272
407
  shape?: "square" | "circle" | ((d: DataPoint, i: number) => "square" | "circle");
273
408
  }
274
409
  export interface TimelineConfig {
410
+ /**
411
+ The cursor shown over the timeline's brush area, where a click or drag
412
+ picks periods: a CSS cursor, or a function given how the timeline is
413
+ drawn (`"ticks"` or `"buttons"`) that returns one. Defaults to
414
+ `"pointer"`. The handles keep `ew-resize` and the selected range
415
+ `move`; `handleConfig` and `selectionConfig` take a `cursor` too.
416
+ @example
417
+ {brushCursor: mode => (mode === "buttons" ? "pointer" : "crosshair")}
418
+ */
419
+ brushCursor?: string | ((mode: "ticks" | "buttons") => string);
275
420
  /** Brush event filter. */
276
421
  brushFilter?: () => boolean;
277
422
  /**
278
- The minimum number of ticks that can be highlighted when using "ticks"
279
- `buttonBehavior`. Helpful for x/y plots where selecting fewer than 2 time
280
- periods is undesirable.
423
+ Stretches of time the timeline hides, as an axis config's
424
+ `rangeBreaks` takes them. By default the timeline takes the rules of
425
+ the axis that plots the chart's `time` values (such as
426
+ `xConfig.rangeBreaks`); set this to use others, or `false` for none.
427
+ */
428
+ rangeBreaks?: false | RangeBreakRule | RangeBreakRule[];
429
+ /**
430
+ The maximum number of ticks (or buttons) a selection can span; unlimited
431
+ by default. A wider brush is pulled in to it on release, keeping the end
432
+ being dragged, and a wider starting selection keeps its latest periods.
433
+ A `brushMax` below `brushMin` rises to it.
434
+ */
435
+ brushMax?: number;
436
+ /**
437
+ The minimum number of ticks (or buttons) a selection can span. Helpful
438
+ for x/y plots where selecting fewer than 2 time periods is undesirable.
439
+ A narrower brush widens to it on release: a drag keeps the end being
440
+ dragged (or, with ticks, its first tick), and a click selects the
441
+ clicked period and the ones after it. A narrower starting selection
442
+ keeps its latest period, and a chart that starts on its latest period
443
+ starts on its latest `brushMin` instead. Either way, the selection grows the other way where the
444
+ timeline runs out. Unused with `brushing: false`.
281
445
  */
282
446
  brushMin?: number;
283
447
  /** Toggles the horizontal alignment of the button timeline. */
284
448
  buttonAlign?: "start" | "middle" | "end";
285
- /** Toggles the style of the timeline. */
449
+ /**
450
+ How the timeline draws its periods: `"ticks"` along an axis,
451
+ `"buttons"` in a row, or `"auto"` (the default), which draws buttons
452
+ when every label fits and ticks otherwise, and checks again whenever
453
+ the chart redraws. The timeline's group carries a class naming the
454
+ result, for page CSS: `d3plus-viz-timeline-ticks` or
455
+ `d3plus-viz-timeline-buttons` on a chart's `g.d3plus-viz-timeline`, and
456
+ `d3plus-Timeline-ticks` or `d3plus-Timeline-buttons` on the Timeline's
457
+ own group.
458
+ */
286
459
  buttonBehavior?: "auto" | "buttons" | "ticks";
287
460
  /** Button height. */
288
461
  buttonHeight?: number;
@@ -292,6 +465,21 @@ export interface TimelineConfig {
292
465
  handleConfig?: Record<string, unknown>;
293
466
  /** Handle size. */
294
467
  handleSize?: number;
468
+ /**
469
+ Listeners for the brush's `start`, `brush` and `end` events. On a chart,
470
+ `end` receives the period the viewer picked once a click, drag or
471
+ playback step settles (a Date, or `[start, end]` Dates for a range),
472
+ and `brush` receives it, snapped to whole periods, as a drag moves
473
+ (with `brushing` on and `snapping` off, the last committed one);
474
+ `start` receives the d3-brush event.
475
+ @example
476
+ {on: {end: period => console.log(period)}}
477
+ */
478
+ on?: {
479
+ start?: (event: unknown) => void;
480
+ brush?: (selection: Date | Date[]) => void;
481
+ end?: (selection: Date | Date[]) => void;
482
+ };
295
483
  /**
296
484
  Determines the visibility of the play button to the left of the timeline,
297
485
  which cycles through the available periods at a rate set by `playButtonInterval`.
@@ -303,8 +491,18 @@ export interface TimelineConfig {
303
491
  otherwise playback steps once per `duration` so each step animates in full.
304
492
  */
305
493
  playButtonInterval?: number;
306
- /** The current selection. Defaults to the most recent period in the timeline. */
494
+ /**
495
+ The current selection. Defaults to the most recent period in the
496
+ timeline. On a chart it is where the timeline starts, and the chart
497
+ starts on the same period(s); the viewer's picks replace it.
498
+ */
307
499
  selection?: (Date | number)[] | Date | number | false;
500
+ /**
501
+ Whether to run the timeline from its latest period to its earliest.
502
+ Selections, the default selection, and playback still read from
503
+ earliest to latest. Defaults to `false`.
504
+ */
505
+ reverse?: boolean;
308
506
  /** Toggles the snapping value. */
309
507
  snapping?: boolean;
310
508
  }
@@ -368,9 +566,110 @@ export interface TrendLineConfig {
368
566
  strokeWidth?: number;
369
567
  /** Line dash pattern. Defaults to `"6 4"`. */
370
568
  strokeDasharray?: string;
569
+ /**
570
+ Labels each trend line along its own path, near its end and just above
571
+ it, in the line's color: `true` names the series ("Trend" for a line
572
+ fit to every point), `"equation"` shows its fitted equation and R²
573
+ (e.g. "y = 2.1x + 3.4, R² = 0.84", or just R² along a time axis), and
574
+ a function of the fit (its `label`, `color`, and regression `fit` with
575
+ `coefficients` and `r2`) returns any text. The text follows the line's
576
+ curve, reads upright whichever way the line runs, and is cut short with
577
+ an ellipsis when the line is too short for it; a line too short for a
578
+ few letters gets no label. It labels the fitted stretch, not a
579
+ projection. Labels never overlap one another or the line labels: one
580
+ whose spot near its line's end is taken slides back along the line, or
581
+ moves below it, and is skipped only when no clear spot exists.
582
+ Defaults to `"equation"`; `false` turns labels off.
583
+ */
584
+ label?: boolean | "equation" | ((fit: {
585
+ label: string;
586
+ color: string;
587
+ fit: {
588
+ coefficients: number[];
589
+ r2: number;
590
+ type: string;
591
+ };
592
+ }) => string | false | null | undefined);
593
+ /** TextBox config for the trend line labels, such as `fontSize` (default 11) or `fontColor`. */
594
+ labelConfig?: Record<string, unknown>;
371
595
  /** Other Line shape config. */
372
596
  [key: string]: unknown;
373
597
  }
598
+ /** The `linkLabelConfig` options. */
599
+ export interface LinkLabelConfig {
600
+ /**
601
+ `"along"` runs text along its link, kept upright: on a curved link
602
+ (a Rings spline, an ArcDiagram arc, a self-loop, a bundled edge, a
603
+ Geomap flow arc, a Sankey band), the text follows the curve over a
604
+ pad that curves with it, and is cut short with an ellipsis where the
605
+ curve has too little room. `"horizontal"` keeps it level.
606
+ */
607
+ rotate?: "along" | "horizontal";
608
+ fontSize?: number;
609
+ /** The pad around the text, in pixels. */
610
+ padding?: number;
611
+ /** The opacity of the pad, which takes the chart's background color. */
612
+ backgroundOpacity?: number;
613
+ /**
614
+ The tightest bend an `"along"` label follows, as a radius in ems of
615
+ `fontSize`. A label is cut short of a tighter bend, and keeps a
616
+ straight label when too little of the curve is left for a few
617
+ letters, as on a small self-loop. Defaults to `2`.
618
+ */
619
+ minRadius?: number;
620
+ /** Any other TextBox setting, such as `fontColor`, `fontFamily`, or `fontWeight`. */
621
+ [key: string]: unknown;
622
+ }
623
+ /** The `linkBundleConfig` options. */
624
+ export interface LinkBundleConfig {
625
+ /**
626
+ How closely each link keeps to its bundle, from `0` (drawn straight)
627
+ to `1` (fully bundled). Defaults to `0.85`.
628
+ */
629
+ strength?: number;
630
+ /**
631
+ How many times the points along each link double as the bundling
632
+ settles (finer bends, more work). Defaults to `6`.
633
+ */
634
+ cycles?: number;
635
+ /**
636
+ The simulation steps in the first cycle; each later cycle takes two
637
+ thirds as many. Defaults to `50`.
638
+ */
639
+ iterations?: number;
640
+ /**
641
+ How alike two links must be, from `0` to `1`, to pull on each other:
642
+ the product of how parallel they are, how alike their lengths are,
643
+ how near they are, and how much each lies alongside the other. Lower
644
+ values bundle more links. Defaults to `0.4`.
645
+ */
646
+ compatibility?: number;
647
+ /**
648
+ Whether each bundled link is drawn as a smooth curve (`true`, the
649
+ default) or as straight runs between its bend points.
650
+ */
651
+ smoothing?: boolean;
652
+ }
653
+ /** The `clusterConfig.labelConfig` options. */
654
+ export interface ClusterLabelConfig {
655
+ /** The largest font size a cluster name takes, in pixels. Defaults to `16`. */
656
+ fontMax?: number;
657
+ /** The smallest font size a cluster name may shrink to before it is left off, in pixels. Defaults to `10`. */
658
+ fontMin?: number;
659
+ /** The space kept clear around each name, in pixels. Defaults to `4`. */
660
+ padding?: number;
661
+ /** Any other TextBox setting, such as `fontColor` (defaults to the chart's text color), `fontFamily`, `fontOpacity`, or `fontWeight`. */
662
+ [key: string]: unknown;
663
+ }
664
+ /** The `clusterConfig` options. */
665
+ export interface ClusterConfig {
666
+ /** 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. */
667
+ max?: number;
668
+ /** 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. */
669
+ label?: (d: DataPoint, i: number, nodes: DataPoint[]) => string;
670
+ /** Styles the cluster names a Network draws inside its clusters, or `false` for none. */
671
+ labelConfig?: ClusterLabelConfig | false;
672
+ }
374
673
  export interface ColorScaleConfig {
375
674
  /** The scale's colors: one color, expanded into a light→dark ramp, or an array of colors to step through. */
376
675
  color?: string | string[];
@@ -387,6 +686,53 @@ export interface ColorScaleConfig {
387
686
  bucketFormat?: (start: number, i: number, buckets: number[], values: number[]) => string;
388
687
  /** Given a bucket's minimum and maximum values, returns the full label. */
389
688
  bucketJoiner?: (min: string, max: string) => string;
689
+ /**
690
+ The kind of scale: `"linear"` or `"log"` (a continuous gradient), or
691
+ `"jenks"`, `"buckets"`, or `"quantile"` (discrete buckets). A function
692
+ picks one on each render: it receives the numeric values the scale is
693
+ built from (sorted, without null or NaN) and their `[min, max]` extent,
694
+ with the ColorScale as `this`, and returns a scale name, as in
695
+ `(values, [min, max]) => max - min > 5 ? "jenks" : "linear"`. An unknown
696
+ name logs a warning and builds a linear scale. Defaults to `"linear"`,
697
+ and to `"jenks"` in a chart's `colorScaleConfig`.
698
+ */
699
+ scale?: ColorScaleTypeSetting;
700
+ /**
701
+ Whether hovering a chart shape marks its value on the scale: an extra
702
+ axis tick at the value on the color bar, and a badge reading the value
703
+ in the axis's tick format where that tick's label would sit, covering
704
+ the labels it overlaps (a value outside the domain marks the bar's
705
+ end). A bucketed bar (`bucketAxis`) also outlines the value's bucket.
706
+ A scale drawn as discrete swatches gets no mark; the value's swatch
707
+ stays lit and the others dim instead. On charts whose shape hover is
708
+ off (`hoverOpacity: 1`, as on Geomap and Calendar or past
709
+ `dataCutoff`), that swatch highlight comes from this option too, so
710
+ `false` turns it off there. Defaults to `true`.
711
+ */
712
+ hoverMark?: boolean;
713
+ /**
714
+ Holds the palest step of a single-hue ramp darker on a light theme
715
+ (`colorRamp`'s `ordinal` option), so the lowest values still read as
716
+ thin lines against the background instead of fading into it. Dark
717
+ themes keep their ramps. Defaults to `false`.
718
+ */
719
+ ordinalRamp?: boolean;
720
+ /**
721
+ Styles the `hoverMark`. `tickConfig` takes `stroke` and `strokeWidth`
722
+ (the axis ticks' own by default) and `length` (the axis's `tickSize`
723
+ by default); the badge starts where the tick ends. `badgeConfig` takes `fill`
724
+ (the value's color by default), `stroke` (the background-legible text
725
+ color by default), `strokeWidth` (default `1`), `fontColor` (a color
726
+ contrasting the fill by default), `fontFamily`, `fontSize` (default
727
+ `11`), `fontWeight` (default `400`), `padding` around the text (default
728
+ `3`; across the bar it is padded to sit as far out as the tick
729
+ labels), and `rx` corner radius (default `2`). `outlineConfig`, the
730
+ bucket outline on a `bucketAxis` bar, takes `stroke` (the
731
+ background-legible text color by default) and `strokeWidth` (default
732
+ `2`). Each is a value or a function of the
733
+ hovered value.
734
+ */
735
+ hoverMarkConfig?: ColorScaleHoverMarkConfig;
390
736
  }
391
737
  /** `colorDefaults` input: any subset of the color defaults, with `scale` also accepting an array of colors. */
392
738
  export type ColorDefaultsConfig = Partial<Omit<ColorDefaults, "scale">> & {
@@ -400,9 +746,50 @@ export type ConfidenceBandSetting = [ConfidenceBound, ConfidenceBound] | [Confid
400
746
  upper?: ConfidenceBound;
401
747
  label?: string;
402
748
  };
749
+ /** A file type the top-left download button can save the chart as. */
750
+ export type SaveFormat = "png" | "svg" | "jpg";
751
+ export interface SaveControlConfig {
752
+ /** The saved file's name, without its extension. Defaults to the chart's title, or `"download"` when it has none. */
753
+ filename?: string;
754
+ /** The file types offered, in menu order. With a single format, the button saves that format in one click, with no menu. Defaults to `["png", "svg", "jpg"]`. */
755
+ formats?: SaveFormat[];
756
+ /** The color painted behind the chart. Defaults to the page color behind the chart, so a JPG never comes out black. `false` leaves PNG and SVG files transparent. */
757
+ background?: string | false;
758
+ /** Called once the file is handed to the browser, or with the `Error` when the chart could not be saved. Without it, errors are logged to the console. */
759
+ callback?: (error?: Error) => void;
760
+ /** Other options are passed to html-to-image when saving a PNG or JPG, such as `pixelRatio` or `quality`. */
761
+ [key: string]: unknown;
762
+ }
763
+ /** 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. */
764
+ export interface KeyboardNavConfig {
765
+ /** 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). */
766
+ stroke?: string | ((d: DataPoint, i: number) => string);
767
+ /** The ring's width in pixels. Defaults to `2`. */
768
+ strokeWidth?: number | ((d: DataPoint, i: number) => number);
769
+ /** 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. */
770
+ padding?: number | ((d: DataPoint, i: number) => number);
771
+ }
772
+ /** Fits and styles circle labels (see `labelPosition`). The TextBox keys style labels drawn beside their circles. */
773
+ export interface PointLabelConfig extends Omit<TextBoxConfig, "fontMin" | "fontSize" | "padding"> {
774
+ /** The smallest font size, in pixels, of a label inside its circle under `"auto"` (default `10`). */
775
+ fontMin?: number;
776
+ /** The font size, in pixels, of a label beside its circle (default `11`). */
777
+ fontSize?: number;
778
+ /** The space, in pixels, between a circle's edge and a label beside it (default `3`). */
779
+ padding?: number;
780
+ }
403
781
  export interface D3plusConfig {
404
782
  /** Data array or URL string to load data from. */
405
783
  data?: DataPoint[] | string;
784
+ /**
785
+ CSS classes added to the outermost element the chart or component draws
786
+ into, beside its fixed classes, so page CSS can target it: a chart's root
787
+ `<svg class="d3plus-viz">` (and, with the Canvas renderer, its
788
+ `<canvas>`), the HTML layer holding its controls, and a standalone
789
+ component's `<svg>`. A space-separated string or an array; a new value
790
+ replaces the classes the previous one added.
791
+ */
792
+ className?: string | string[];
406
793
  /** Locale code used for text and number formatting. */
407
794
  locale?: string;
408
795
  /** The active callback function for highlighting shapes. */
@@ -411,6 +798,14 @@ export interface D3plusConfig {
411
798
  aggs?: {
412
799
  [k: string]: (d: DataPoint[]) => unknown;
413
800
  };
801
+ /**
802
+ Which side of ArcDiagram's line the arcs take: `"above"` (the default),
803
+ `"below"`, or `"both"`, where a link running forward along the line
804
+ (its source before its target) arcs above and one running backward arcs
805
+ below. On a vertical line, "above" is its right side. Node labels sit
806
+ on the other side of the line (below it with `"both"`).
807
+ */
808
+ arcSide?: "above" | "below" | "both";
414
809
  /** Hides the SVG from assistive technology when true (`aria-hidden`). */
415
810
  ariaHidden?: boolean;
416
811
  /**
@@ -428,6 +823,33 @@ export interface D3plusConfig {
428
823
  gridConfig?: Record<string, unknown>;
429
824
  shapeConfig?: Record<string, unknown>;
430
825
  };
826
+ /**
827
+ Whether hovering a Plot's mark draws a dashed guide from its point to
828
+ each axis and a badge on that axis with the point's value there,
829
+ formatted as the tooltip formats that axis's values (the axis's
830
+ `tickFormat` when set). `"x"` or `"y"` draws them for that direction
831
+ only (each including its secondary axis). A bar is badged on its value
832
+ axis only. With a discrete axis, the shared tooltip's crosshair is that
833
+ axis's guide, and the value axis follows the hovered series' point (or
834
+ the one nearest the pointer). Defaults to `true` (`"x"` on BumpChart,
835
+ whose y axes label series rather than values, and on Streamgraph, whose
836
+ y positions name no values).
837
+ */
838
+ axisHover?: boolean | "x" | "y";
839
+ /**
840
+ Styles the `axisHover` guides and badges. `guideConfig` takes `stroke`
841
+ (the hovered mark's color by default), `strokeWidth` (default `1`),
842
+ `strokeDasharray` (default `"4 3"`), and `strokeOpacity`. `badgeConfig`
843
+ takes `fill` (the hovered mark's color by default), `fontColor` (a
844
+ color contrasting the fill by default), `fontFamily`, `fontSize`
845
+ (default `12`), `fontWeight` (default `400`), `padding` around the text
846
+ (default `4`), and `rx` corner radius (default `2`). Each is a value or
847
+ a `(d, i) => value` accessor of the hovered data row.
848
+ */
849
+ axisHoverConfig?: {
850
+ guideConfig?: Record<string, unknown>;
851
+ badgeConfig?: Record<string, unknown>;
852
+ };
431
853
  /**
432
854
  Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).
433
855
  */
@@ -465,13 +887,25 @@ export interface D3plusConfig {
465
887
  a narrow bar, widening into room its neighbors leave; a label that
466
888
  still can't fit is left out, and the labels rotate, showing the name
467
889
  alone, only when half or more can't fit. The tooltip always shows the
468
- share. In small
890
+ share. `"opposite"` moves the shares to the axis across the bars from
891
+ the names, above them along a horizontal axis and to their right along
892
+ a vertical one, leaving the names alone on their own axis; style it
893
+ with `x2Config` (or `y2Config`). In small
469
894
  multiples (`facet`), each panel's shares are of that panel's own total
470
895
  width and add to 100%, even when shared scales draw a smaller panel
471
- narrower.
472
- On for Marimekko, off for BarChart.
896
+ narrower. `barWidthShareFormat` changes what the label says.
897
+ `"opposite"` for Marimekko, off for BarChart.
473
898
  */
474
- barWidthShare?: boolean;
899
+ barWidthShare?: boolean | "opposite";
900
+ /**
901
+ BarChart/Marimekko with `barWidthShare`: returns each bar's width-share
902
+ label. Called with the merge of the bar's rows' data (numbers summed
903
+ unless `aggs` says otherwise) and the bar's `{share, size, total,
904
+ text}`: its share of the total width (0–1), its width measure, every
905
+ bar's combined width, and the default label (such as "23%"). The
906
+ tooltip keeps showing the share.
907
+ */
908
+ barWidthShareFormat?: (d: DataPoint, info: BarShareInfo) => unknown;
475
909
  /**
476
910
  Starts a Plot's value axis (the x axis for horizontal charts) at a
477
911
  value: `baseline(n)` renders exactly like `yDomain([n])` (or
@@ -518,8 +952,50 @@ export interface D3plusConfig {
518
952
  max?: number;
519
953
  color?: string;
520
954
  })[]);
955
+ /**
956
+ Hexbin: the bin shape, `"hex"` (default) for hexagons or `"square"`
957
+ for squares, or `false` to draw no bins (for contours alone).
958
+ */
959
+ binShape?: "hex" | "square" | false;
960
+ /**
961
+ Hexbin: the bin size in pixels, a hexagon's radius or a square's side.
962
+ Bins keep this size at any zoom: the observations are binned again for
963
+ each view, and the colorScale refits to the bins in view. Defaults to
964
+ `12`.
965
+ */
966
+ binSize?: number;
967
+ /**
968
+ Hexbin: what each bin measures, which its color shows. `"count"`
969
+ (default) is the number of observations in the bin; `{value, agg,
970
+ label}` is the `"sum"` (default) or `"mean"` of `value` (a data key or
971
+ accessor) over the bin's observations, named `label` in the tooltip.
972
+ */
973
+ binValue?: BinValueOption;
521
974
  /** Candlestick: the share of each period's room its candle body (or OHLC ticks) spans, from 0 to 1. Defaults to `0.7`. */
522
975
  bodyWidth?: number;
976
+ /** BoxWhisker: accessor or data key for each summary row's upper whisker end. See `boxMedian`. */
977
+ boxMax?: string | ((d: DataPoint, i: number) => number);
978
+ /**
979
+ BoxWhisker: accessor or data key for each summary row's median. Setting
980
+ it, `boxMin`, `boxQ1`, `boxQ3`, or `boxMax` draws boxes from statistics
981
+ you already have: each row is one box (placed by its `x`, or `y` when
982
+ `discrete` is `"y"`) drawn from those values, with nothing computed and
983
+ `whiskerMode` unused. All five are needed (a warning names any left
984
+ unset), and a row whose values aren't all numbers draws no box. The
985
+ value axis spans every row's statistics and outliers, and the tooltip
986
+ lists them.
987
+ */
988
+ boxMedian?: string | ((d: DataPoint, i: number) => number);
989
+ /** BoxWhisker: accessor or data key for each summary row's lower whisker end. See `boxMedian`. */
990
+ boxMin?: string | ((d: DataPoint, i: number) => number);
991
+ /** 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`. */
992
+ boxOutliers?: string | ((d: DataPoint, i: number) => number[]);
993
+ /** Alluvial: the fill opacity of the bands between columns (default `0.5`). */
994
+ bandOpacity?: number;
995
+ /** BoxWhisker: accessor or data key for each summary row's lower quartile, where its box starts. See `boxMedian`. */
996
+ boxQ1?: string | ((d: DataPoint, i: number) => number);
997
+ /** BoxWhisker: accessor or data key for each summary row's upper quartile, where its box ends. See `boxMedian`. */
998
+ boxQ3?: string | ((d: DataPoint, i: number) => number);
523
999
  /**
524
1000
  ParallelCoordinates: the brush strips over each axis — `width` (px), the
525
1001
  selection's `fill`, `fillOpacity`, `stroke`, and `strokeWidth`, and
@@ -542,7 +1018,17 @@ export interface D3plusConfig {
542
1018
  brushing?: boolean;
543
1019
  /** Bullet: the most each bullet's band can be thick, in pixels (default 40); raise it to let rows fill a tall chart. */
544
1020
  bulletSize?: number;
545
- /** Whether to cache the processed data between renders. */
1021
+ /**
1022
+ Whether the chart keeps the files it fetches for `data`, `links`,
1023
+ `nodes`, `topojson`, and `fitObject`. Each chart has its own cache of
1024
+ its 10 most recent requests, keyed by the request (the URL, and a
1025
+ request object's `fetch` options), so loaders naming the same URL share
1026
+ one request. It holds each response as fetched, before its `*Format`
1027
+ formatter runs, so setting the same URL again, or a new formatter, draws
1028
+ from the cache without a request. A failed request is not kept. Defaults to `true`; set it to `false` to
1029
+ fetch on every load, or use `dataPollingInterval` to re-fetch `data` on
1030
+ a schedule (polls always fetch).
1031
+ */
546
1032
  cache?: boolean;
547
1033
  /** Calendar: styles the weekday, month, and year labels (`fontColor`, `fontFamily`, `fontSize`, default `11`, and `fontWeight`). */
548
1034
  calendarLabelConfig?: {
@@ -555,6 +1041,44 @@ export interface D3plusConfig {
555
1041
  cellPadding?: number;
556
1042
  /** Calendar: each cell's corner radius, in pixels (kept below a third of the cell). Defaults to `2`. */
557
1043
  cellRadius?: number;
1044
+ /**
1045
+ Sankey: draws the links that loop back into a node they left (a link
1046
+ from a node to itself, or one that closes a loop through several
1047
+ nodes, A → B → A) as circular bands. Each leaves its source's right
1048
+ side, turns up or down, runs along a lane above or below the nodes,
1049
+ and turns back into its target's left side. The lightest link on each
1050
+ loop is the one drawn this way, and its lane runs above the nodes
1051
+ when its two ends sit in the upper half of the chart, else below.
1052
+ Nodes are sized by the flow through them, returns included. `false`
1053
+ leaves these links out instead, with a warning naming them. Defaults
1054
+ to `true`.
1055
+ */
1056
+ circularLinks?: boolean;
1057
+ /**
1058
+ Network and ArcDiagram: colors each node by the cluster it belongs to,
1059
+ found with the Louvain method (links weighted by `linkSize`). Each
1060
+ cluster is named after its most-connected node ("alpha cluster"), and
1061
+ the legend lists the clusters, largest first, even for a network drawn
1062
+ from `nodes` alone; clicking a cluster zooms to it. A Network also writes each name
1063
+ inside its cluster, where it fits clear of the nodes and their labels.
1064
+ Applies only while the chart's color is its default: setting `color`,
1065
+ `colorScale`, `colorOrdinal`, or a `shapeConfig` fill, or more than one
1066
+ `groupBy` level, colors nodes as configured instead. A network with
1067
+ fewer than two clusters of two or more nodes keeps one color per node.
1068
+ A node with no links keeps its own color and label. `false` turns
1069
+ clustering off. Defaults to `true`.
1070
+ */
1071
+ cluster?: boolean;
1072
+ /**
1073
+ Network and ArcDiagram: names and styles the clusters (see `cluster`).
1074
+ `label` names each cluster: it receives the row of the cluster's
1075
+ most-connected node, the cluster's index (0 is the largest), and every
1076
+ member's row. `max` is the most clusters to keep (default `12`): while
1077
+ there are more, the smallest joins the cluster it shares the most link
1078
+ weight with, or the largest when it has none. `labelConfig` styles the
1079
+ names a Network draws inside its clusters, or `false` draws none.
1080
+ */
1081
+ clusterConfig?: ClusterConfig;
558
1082
  /**
559
1083
  Candlestick: accessor or data key for each period's closing value
560
1084
  (default `"close"`). It is the chart's `y`: setting `y` sets it.
@@ -566,6 +1090,13 @@ export interface D3plusConfig {
566
1090
  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.
567
1091
  */
568
1092
  color?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
1093
+ /**
1094
+ Alluvial: the column whose categories color the bands — a column index,
1095
+ or a dimension's data key or title (default `0`, the first column). Each
1096
+ row's band keeps its category's color through every column, and the
1097
+ legend lists that column's categories.
1098
+ */
1099
+ colorBy?: number | string;
569
1100
  /** Overrides for the default colors used for data fills and legible text (see `colorDefaults` in @d3plus/color). */
570
1101
  colorDefaults?: ColorDefaultsConfig;
571
1102
  /** Treat a discrete color field as ordered: color it with a single-hue light→dark ramp instead of nominal categorical hues. */
@@ -579,10 +1110,20 @@ export interface D3plusConfig {
579
1110
  axisConfig?: AxisConfig;
580
1111
  centered?: boolean;
581
1112
  colors?: string[];
1113
+ /** 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. */
582
1114
  colorMin?: CssColor;
1115
+ /** The midpoint of a diverging scale. Defaults to `colorDefaults.light`, or the theme's `colorScale.mid` on a dark or custom theme. */
583
1116
  colorMid?: CssColor;
1117
+ /** 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. */
584
1118
  colorMax?: CssColor;
585
- scale?: AxisScale;
1119
+ /** The kind of scale, or a function that picks one from the colorScale values on each render (see `ColorScaleConfig.scale`). Defaults to `"jenks"`. */
1120
+ scale?: ColorScaleTypeSetting;
1121
+ /** Marks a hovered shape's value on the colorScale (see `ColorScaleConfig.hoverMark`). Defaults to `true`. */
1122
+ hoverMark?: boolean;
1123
+ /** Styles the hover mark (see `ColorScaleConfig.hoverMarkConfig`). */
1124
+ hoverMarkConfig?: ColorScaleHoverMarkConfig;
1125
+ /** 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. */
1126
+ ordinalRamp?: boolean;
586
1127
  };
587
1128
  /**
588
1129
  The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.
@@ -632,6 +1173,25 @@ export interface D3plusConfig {
632
1173
  (Path keys and `capWidth`); any other key logs a warning.
633
1174
  */
634
1175
  confidenceConfig?: Record<string, unknown>;
1176
+ /**
1177
+ How a line crosses a missing value: a step of the discrete axis that
1178
+ another line has and this one skips, or a row whose value is `null` or
1179
+ `NaN`. `true` (the default) or `"solid"` draws the line straight on
1180
+ through it. `false` breaks the line there, leaving the gap empty.
1181
+ `"dashed"` breaks the line and bridges the gap with a short dash
1182
+ (`"2 4"`) in the line's color, distinct from a forecast's longer dash.
1183
+ An object styles the bridge: `stroke` (default the line's color),
1184
+ `strokeDasharray` (default `"2 4"`; `false` for a solid bridge),
1185
+ `strokeWidth` (default the line's width), and `opacity` (default `1`).
1186
+ A bridge follows the line's curve, since it is drawn along the same
1187
+ path, and is decoration only: it has no tooltip, takes no keyboard
1188
+ focus, and a shared tooltip at a missing step lists no value for that
1189
+ line. Confidence bands are clipped to the stretches between gaps. A
1190
+ point with a gap on both sides draws no line of its own, so turn on
1191
+ `lineMarkers` to show it. Areas, including stacked ones, are drawn as
1192
+ before.
1193
+ */
1194
+ connectGaps?: ConnectGaps;
635
1195
  /** Funnel: fills the gap between consecutive stages with a neck joining their widths. */
636
1196
  connector?: boolean;
637
1197
  /**
@@ -642,6 +1202,36 @@ export interface D3plusConfig {
642
1202
  optionally a function of the row the connector leaves and its index.
643
1203
  */
644
1204
  connectorConfig?: Record<string, unknown>;
1205
+ /**
1206
+ Hexbin: contour options. `bandwidth` is the density kernel's standard
1207
+ deviation in pixels (default `20`); `thresholds` is about how many
1208
+ levels to draw (default `8`, rounded to nice values) or the levels
1209
+ themselves, in observations per bin; `strokeWidth` is the outline
1210
+ width of `"lines"` contours (default `1.5`); and `fillOpacity` is the
1211
+ opacity of the highest `"filled"` level (default `0.8`). `labels`
1212
+ (default `true`) writes each level's value along its contour lines, as
1213
+ a topographic map labels elevation: centered on the line, which breaks
1214
+ beneath it, reading upright, and clear of the other contours and
1215
+ labels. A long contour takes more than one label, at least
1216
+ `labelSpacing` pixels apart (default `"auto"`: 20 ems or half the
1217
+ plot's mean side, whichever is longer); `labelStep` labels every n-th
1218
+ level (`1` all of them, `2` every other one, keeping the multiples of
1219
+ twice the levels' spacing; default `"auto"`: all of up to five levels,
1220
+ else every other one); and a level with no clear, gently curving
1221
+ stretch goes unlabelled. `labelConfig` is TextBox config for the
1222
+ labels (`fontSize` defaults to `10`), and `levelFormat` formats their
1223
+ values. Merged into the current config.
1224
+ */
1225
+ contourConfig?: ContourConfig;
1226
+ /**
1227
+ Hexbin: draws density contours. `"lines"` (or `true`) outlines each
1228
+ density level in its color, and `"filled"` fills the levels with an
1229
+ opacity ramp. Levels are in observations per bin (the count a bin
1230
+ would hold there), so contours share the bins' colorScale. Over bins,
1231
+ contour lines take the chart's text color and leave hover to the bins.
1232
+ Defaults to `false`.
1233
+ */
1234
+ contours?: ContoursOption;
645
1235
  /** Funnel: the conversion rates each stage's label shows: `"first"`, `"previous"`, `"both"` (or `true`), or `false`. */
646
1236
  conversion?: boolean | "first" | "previous" | "both" | ("first" | "previous")[];
647
1237
  /**
@@ -658,6 +1248,25 @@ export interface D3plusConfig {
658
1248
  curve?: "linear" | "smooth" | "bump";
659
1249
  /** Maximum number of data points to render before downsampling. */
660
1250
  dataCutoff?: number;
1251
+ /**
1252
+ Transforms `data` before it is drawn. The function receives the loaded
1253
+ file (or the parsed JSON response, or an Array of them when `data` lists
1254
+ several URLs), or the Array passed as `data`, and returns the rows to
1255
+ draw. It may instead return a config object holding the rows as its
1256
+ `data` key, and the rest of that object is applied to the chart, so a
1257
+ response can set options such as `title` from what it contains.
1258
+
1259
+ It runs when the chart renders, whichever order `data` and `dataFormat`
1260
+ are set in, and setting it again re-runs it on the next render, over the
1261
+ cached response (see `cache`). Every `dataPollingInterval` poll runs it too. Passing a
1262
+ formatter as the second argument of `data(url, format)` sets it, and
1263
+ setting `data` alone keeps it.
1264
+ */
1265
+ dataFormat?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>;
1266
+ /**
1267
+ 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 `dataFormat` 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).
1268
+ */
1269
+ dataPollingInterval?: number | false;
661
1270
  /**
662
1271
  Calendar: the day each row falls on, as a data key or accessor returning
663
1272
  a `Date`, a millisecond timestamp, or a date string (a bare
@@ -688,6 +1297,20 @@ export interface D3plusConfig {
688
1297
  shape to the full width (Violin) or height (Ridgeline).
689
1298
  */
690
1299
  densityScale?: "area" | "count" | "width";
1300
+ /**
1301
+ Gantt: accessor or data key for each task's predecessors, the ids (by
1302
+ `groupBy`) of the tasks it waits on, as an array or a comma-separated
1303
+ string (default `"dependencies"`). Each draws an elbow arrow from the
1304
+ predecessor's end to the task's start.
1305
+ */
1306
+ dependencies?: string | ((d: DataPoint, i: number) => unknown) | false;
1307
+ /** Gantt: styles the dependency arrows: `stroke` (the chart's text color by default), `strokeWidth` (1), `strokeOpacity` (0.55), and `arrowSize` (6, in pixels). */
1308
+ dependencyConfig?: {
1309
+ stroke?: string;
1310
+ strokeWidth?: number;
1311
+ strokeOpacity?: number;
1312
+ arrowSize?: number;
1313
+ };
691
1314
  /** Active depth level for nested groupings. */
692
1315
  depth?: number;
693
1316
  /**
@@ -716,19 +1339,32 @@ export interface D3plusConfig {
716
1339
  and any Axis config (`tickFormat`, `ticks`, `scale`, …).
717
1340
  */
718
1341
  dimensionConfig?: Record<string, DimensionOptions>;
1342
+ /** Alluvial: styles the column titles drawn above each column (any TextBox config). */
1343
+ dimensionTitleConfig?: Record<string, unknown>;
719
1344
  /**
720
1345
  ParallelCoordinates: the data keys to draw an axis for, in order.
721
1346
  Defaults to every numeric key except the `groupBy` keys and `id`; a key
722
1347
  whose values aren't all numbers gets a categorical axis.
1348
+
1349
+ Alluvial: the categorical dimensions, one column each, left to right —
1350
+ data keys, accessor functions `(d, i) => category`, or `{value, title}`
1351
+ objects. A key is its column's title; a bare accessor has none. Rows
1352
+ missing a category on any dimension (`undefined`, `null`, or `""`) are
1353
+ left out.
723
1354
  */
724
- dimensions?: string[];
1355
+ dimensions?: AlluvialDimensionInput[];
725
1356
  /** Sets orientation of main category axis. */
726
1357
  discrete?: "x" | "y" | "radius" | "angle";
727
1358
  /** Candlestick: the color of periods that closed below their open, or an accessor of the row. Defaults to red. */
728
1359
  downColor?: string | ((d: DataPoint, i: number) => string);
729
1360
  /** Default duration of transitions, in milliseconds. */
730
1361
  duration?: number;
731
- /** 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. */
1362
+ /**
1363
+ Priestley and Gantt: accessor or data key for each row's end (default
1364
+ `"end"`). A key also aggregates grouped rows by their latest end.
1365
+ */
1366
+ end?: string | ((d: DataPoint, i: number) => unknown);
1367
+ /** 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. */
732
1368
  emptyFill?: string;
733
1369
  /** 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. */
734
1370
  facet?: string | ((d: DataPoint, i: number) => unknown) | false;
@@ -812,8 +1448,49 @@ export interface D3plusConfig {
812
1448
  order. A `ySort`/`xSort` comparator on the category axis takes precedence.
813
1449
  */
814
1450
  gapSort?: false | "ascending" | "descending";
1451
+ /**
1452
+ Gantt: accessor or data key for each task's group, such as its project
1453
+ phase. Grouped tasks sit under a header row naming the group, with a
1454
+ bracket spanning its tasks.
1455
+ */
1456
+ group?: string | ((d: DataPoint, i: number) => unknown) | false;
815
1457
  /** Grouping key(s) or accessor function(s). */
816
1458
  groupBy?: string | string[] | ((d: DataPoint) => string | number) | ((d: DataPoint) => string | number)[];
1459
+ /**
1460
+ Treemap: style of the group header strips (see `groupLabels`). The
1461
+ accessors receive the group's merged row.
1462
+ */
1463
+ groupLabelConfig?: {
1464
+ /** Strip color. Defaults to a darker shade of the group's color, or a neutral tone when `colorScale` colors the tiles. */
1465
+ fill?: CssColor | ((d: DataPoint, i: number) => CssColor);
1466
+ /** Text color. Defaults to the color that contrasts with the strip. */
1467
+ fontColor?: CssColor | ((d: DataPoint, i: number) => CssColor);
1468
+ /** Font family. Defaults to the chart's `fontFamily`. */
1469
+ fontFamily?: string | string[];
1470
+ /** Font size, in pixels, which sets the strip's height. Defaults to `11`. */
1471
+ fontSize?: number;
1472
+ /** Font weight. Defaults to `600`. */
1473
+ fontWeight?: number | string;
1474
+ /**
1475
+ The strip's text, given the group's merged row (the same row the
1476
+ strip's hover and click handlers receive). Its tooltip title uses it
1477
+ too. Unset, or returning nothing, the strip shows the group's
1478
+ `groupBy` value at its level; the chart's own `label` names only the
1479
+ tiles, since on a merged row it can't tell a group-level field from a
1480
+ tile-level one.
1481
+ */
1482
+ label?: (d: DataPoint, i: number) => string;
1483
+ /** Space around the text inside the strip, in pixels. Defaults to `3`. */
1484
+ padding?: number;
1485
+ };
1486
+ /**
1487
+ Treemap: whether each group above the drawn tiles of a nested `groupBy`
1488
+ gets a header strip naming it, with its tiles below the strip. Every
1489
+ level above the tiles gets its own strip; a group too small for one
1490
+ gets none. Hovering a strip highlights its group, and clicking it zooms
1491
+ into that group (Back steps out). Defaults to `true`.
1492
+ */
1493
+ groupLabels?: boolean;
817
1494
  /** Padding between groups of bars in pixels. */
818
1495
  groupPadding?: number;
819
1496
  /** Overall height of the visualization in pixels. */
@@ -828,6 +1505,22 @@ export interface D3plusConfig {
828
1505
  hiddenOpacity?: number | ((d: DataPoint, i: number) => number);
829
1506
  /** The hover callback function for highlighting shapes on mouseover. */
830
1507
  hover?: ((d: DataPoint, i: number) => boolean) | false | null;
1508
+ /**
1509
+ How close, in pixels, the pointer has to come to a point mark for it to
1510
+ count as hovering that point. Over empty space, or over something other
1511
+ than a point (a gridline, a link), the pointer acts on the closest point
1512
+ whose edge lies within this distance: its tooltip, hover highlight, and
1513
+ axis guides show, and a click there clicks it. A point's tooltip points
1514
+ at the top of the point (on it or near it) and holds still until
1515
+ another point takes over. Applies to the point
1516
+ marks of scatter and bubble plots (Circle and Rect shapes, Beeswarm
1517
+ included), Network nodes, and Geomap points; bars, areas, lines, and
1518
+ other area-filling marks keep exact hit-testing.
1519
+ Plots with a discrete axis and `tooltipShared` on snap to the nearest
1520
+ column instead. Defaults to `20`; `0` turns it off, along with the
1521
+ anchored tooltip.
1522
+ */
1523
+ hoverDistance?: number;
831
1524
  /** Candlestick: accessor or data key for each period's highest value (default `"high"`). */
832
1525
  high?: string | ((d: DataPoint, i: number) => number);
833
1526
  /** Persistently emphasizes matching marks (keep color) and grays the rest. */
@@ -853,12 +1546,123 @@ export interface D3plusConfig {
853
1546
  quartiles?: Record<string, unknown>;
854
1547
  points?: Record<string, unknown>;
855
1548
  };
1549
+ /**
1550
+ Lets keyboard users move between the chart's data marks. The chart is
1551
+ one Tab stop (a focusable `role="application"` element laid over it,
1552
+ named by `svgTitle` or the chart's `title`); once it has focus, the
1553
+ arrow keys move to the nearest mark in that direction, Home and End
1554
+ jump to the first and last mark, Enter or Space selects the focused
1555
+ mark as a click would (drilling down, or toggling a legend item), and
1556
+ Escape clears it. The focused mark shows its tooltip and hover
1557
+ highlight, a ring outlines it (see `keyboardNavConfig`), and a live
1558
+ region announces its label to screen readers. Legend items are
1559
+ included after the chart's marks; Line and Area series are visited
1560
+ point by point. On by default; `false` removes the Tab stop.
1561
+ */
1562
+ keyboardNav?: boolean;
1563
+ /** Styles the focus ring around the mark keyboard navigation has focused (see `KeyboardNavConfig`). */
1564
+ keyboardNavConfig?: KeyboardNavConfig;
856
1565
  /**
857
1566
  Accessor function, or a constant string applied to every data point's
858
1567
  label (unlike `value`/`nodeId`/etc., a string here is not treated as a
859
1568
  per-datum object key — pass a function for that).
860
1569
  */
861
1570
  label?: string | string[] | false | AccessorFn;
1571
+ /**
1572
+ Gantt: the most the task label column may take: a share of the chart's
1573
+ width when 1 or below (default `0.3`), else pixels. The column fits the
1574
+ widest label up to it, wrapping or truncating longer ones; `0` hides it.
1575
+ */
1576
+ labelWidth?: number;
1577
+ /**
1578
+ Where each shape's label goes, as a string for every shape or a
1579
+ `(d, i) => string` accessor of the data row.
1580
+
1581
+ - Ring segments (Donut slices and those of a Pie with an
1582
+ `innerRadius`, Sunburst arcs, Chord groups, and RadialBar tracks):
1583
+ `"along"` runs a segment's name along its arc, following the ring,
1584
+ reading left to right on the bottom half as on the top. `"auto"`
1585
+ picks, segment by segment, whichever reads better: the curve when
1586
+ its arc is long enough for the whole name and it shows it larger
1587
+ than a straight label could (a thin ring), the straight label when
1588
+ that fits as well, and a curve cut short with an ellipsis when
1589
+ nothing else fits. A full Pie (no `innerRadius`) keeps its labels
1590
+ inside straight: its wedges run to a point at the center. On a Pie
1591
+ or Donut (any `innerRadius`, and partial rings such as a half pie),
1592
+ a slice whose label inside can't show its whole name under
1593
+ `"auto"` is labelled outside the ring instead, and `"outside"`
1594
+ labels every slice there: its name and share, horizontal, in the
1595
+ Path `labelConfig`'s font at its `fontSize` (12px by default), in
1596
+ the theme's text color unless `labelConfig.fontColor` sets one,
1597
+ joined to the slice by a thin leader line. These labels stack in a
1598
+ column on the side of the ring their slice faces, wrapping onto a
1599
+ second line between words when their column is narrow; the ring
1600
+ shrinks (its hole with it) to leave room for them, never below 60%
1601
+ of its full radius, and when they don't all fit, the smallest
1602
+ slices' labels are left out (those slices keep their label inside,
1603
+ if any). `"inside"` keeps a Pie or Donut's labels straight inside
1604
+ their slices, and on the other ring segments both `"inside"` and
1605
+ `"outside"` keep the straight labels. A Donut's curves
1606
+ follow the middle of its ring (the rim, when its hole is small),
1607
+ with the slice's share on a smaller second line when there is room.
1608
+ A Sunburst also weighs a label turned along its radius, which suits
1609
+ the narrow arcs of the outer rings. Curved Donut and Sunburst names
1610
+ keep 5px from the ring's edges and at least 0.3em from the
1611
+ segment's ends, at the largest size from the Path `labelConfig`'s
1612
+ `fontSize` (else `fontMax`, 24px by default) down to its `fontMin`
1613
+ (8px). A Chord curves its group names just outside the ring when
1614
+ every name fits along its arc, which leaves the ring more room;
1615
+ otherwise it curves those that fit and turns the rest along their
1616
+ spokes, all at the Path `labelConfig`'s `fontSize` (11px by
1617
+ default). A Radar does the same with its metric names, just outside
1618
+ the web, each between its neighbors' spokes, wrapping a long name
1619
+ onto a second curved line. A RadialBar curves each track's name along the track, inside
1620
+ its bar (or past its end when the bar is too short), when the sweep
1621
+ leaves no room before the start for the straight labels, and at any
1622
+ sweep for `"along"`; when every track is named this way, the default
1623
+ legend hides. Curved text takes the color that contrasts with what
1624
+ lies under it (the theme's ink outside the ring) and dims with its
1625
+ segment on hover. A label with no room is left out.
1626
+ - Bars: `"inside"` or `"outside"` the bar, or `"auto"`, which goes
1627
+ outside when the bar is shorter than half the room along its axis.
1628
+ Stacked bars always label inside.
1629
+ - Circles (scatter and bubble points, Beeswarm points given a `label`,
1630
+ Network nodes, and Geomap coordinate points): `"auto"` keeps a label
1631
+ inside its circle when it fits there at `pointLabelConfig.fontMin` or
1632
+ larger, else moves it beside the circle, else hides it. A Network or
1633
+ Geomap's labels beside their circles stay in the chart area, a
1634
+ Plot's in its plot area. `"inside"` keeps every label
1635
+ inside, shrinking it to fit (a label that can't fit is dropped).
1636
+ `"outside"` always puts it beside the circle. A label goes beside its
1637
+ circle on the side with the most open room: the side facing its
1638
+ Voronoi cell's centroid first, then right, left, top, bottom, and the
1639
+ diagonals. A side is taken only where the label lies mostly in the
1640
+ circle's Voronoi cell, stays in that area, and overlaps no circle and
1641
+ no label placed before it. Larger circles are
1642
+ placed first. A label with no room is hidden; the circle's tooltip and
1643
+ aria-label still name it. Geomap points are labeled by
1644
+ `shapeConfig.Circle.label` when it is set (`false` turns their labels
1645
+ off), else by `label`. Labels are placed when the chart draws: a
1646
+ zoomed Plot places them again for its new scales, while a zoomed
1647
+ Network or Geomap scales them with the picture.
1648
+ - Stacked areas (StackedArea, Streamgraph, and a stacked AreaPlot):
1649
+ `"auto"` or `"along"` runs each series' name along its band's
1650
+ centerline, following its curve, on the stretch where the band is at
1651
+ least the font size plus 4px thick under the whole label and flattest.
1652
+ The text reads upright, in the color that contrasts with the band's
1653
+ fill (or the Area `labelConfig`'s `fontColor`, when you set one), and
1654
+ dims with its band on hover. It starts at the Area `labelConfig`'s
1655
+ `fontSize` (or `fontMax`, else 16px) and shrinks a pixel at a time
1656
+ down to its `fontMin`, but no lower than 8px, before giving up; a
1657
+ band too thin for its name everywhere goes unlabeled. When every band
1658
+ gets a name, the default legend hides (a `legend` of your own always
1659
+ wins, and the legend stays while a series is hidden from it).
1660
+ `"inside"` (or `"outside"`) puts the label in the band's largest box
1661
+ instead. `shapeConfig.Area.label` sets the text, or `false` for none.
1662
+
1663
+ Defaults to `"auto"`.
1664
+ */
1665
+ labelPosition?: "auto" | "along" | "inside" | "outside" | ((d: DataPoint, i: number) => "auto" | "along" | "inside" | "outside");
862
1666
  /**
863
1667
  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.
864
1668
  */
@@ -876,9 +1680,13 @@ export interface D3plusConfig {
876
1680
  shapeConfig?: Record<string, string | number>;
877
1681
  };
878
1682
  /**
879
- 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.
1683
+ 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`).
880
1684
  */
881
1685
  legendFilterInvert?: boolean | ((viz: VizBase) => boolean);
1686
+ /**
1687
+ Whether legend clicks go on the chart's Back history. A click or shift+click (or Enter or Space on a legend item) that changes what is hidden or solo'd shows the Back button, and Back undoes legend clicks and drill-downs in the order they happened, restoring the legend exactly as it was. A drill-down to a deeper level starts with every group shown, and Back out of it brings back the legend it left. A click that changes nothing adds no step, and new `data` clears the legend's steps along with the legend. Clicking a Sunburst or Icicle center zooms out without undoing the legend clicks made since the zoom. Defaults to `true`; `false` leaves legend clicks off the history, so Back only steps out of drill-downs.
1688
+ */
1689
+ legendHistory?: boolean;
882
1690
  /**
883
1691
  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.
884
1692
  */
@@ -907,14 +1715,17 @@ export interface D3plusConfig {
907
1715
  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.
908
1716
  */
909
1717
  legendPosition?: false | PanelPosition | (() => false | PanelPosition);
910
- /** Custom sort comparator for legend items. */
1718
+ /**
1719
+ 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.
1720
+ */
911
1721
  legendSort?: (a: DataPoint, b: DataPoint) => number;
912
1722
  /** Configuration object for the legend tooltip. */
913
1723
  legendTooltip?: TooltipConfig;
914
1724
  /**
915
- Formats the Radar's level value labels. Receives the ring's value and
916
- returns its label. Defaults to the abbreviated number format the axes
917
- use (`1.5k`, `2M`, …).
1725
+ Formats the Radar's level value labels, or the Hexbin's contour level
1726
+ labels and tooltips. Receives the level's value and returns its label.
1727
+ Defaults to the abbreviated number format the axes use (`1.5k`, `2M`,
1728
+ …).
918
1729
  */
919
1730
  levelFormat?: (d: number) => string | number;
920
1731
  /**
@@ -950,15 +1761,163 @@ export interface D3plusConfig {
950
1761
  levels?: number | number[];
951
1762
  /** ParallelCoordinates: the lines' stroke opacity, or `"auto"` (default) to fade them as their number grows. */
952
1763
  lineOpacity?: number | "auto";
953
- /** Whether to show labels on line charts. */
954
- lineLabels?: boolean;
1764
+ /**
1765
+ Labels each line of a line chart with its series name, just past the
1766
+ line's ends: `true` or `"end"` labels the right end, `"start"` the left
1767
+ end, and `"both"` both ends. A function of each row returns any of
1768
+ these (or `false`) to choose per series. The plot leaves room for the
1769
+ labels on the side they sit, at most a quarter of its width past the y
1770
+ axis per side;
1771
+ a label wider than that drops its value, then shortens its name with
1772
+ an ellipsis, then hides. Labels that would overlap are moved apart,
1773
+ each side on its own, with a dotted connector back to their line; when
1774
+ the plot is too short for them all, the last that fits reads "+N more".
1775
+ `lineLabelConfig` adds each end's value to its label.
1776
+
1777
+ `"along"` writes each series name along its own line instead, following
1778
+ its curve: on the stretch that bends and slopes least and stays clear
1779
+ of the other lines and labels, reading upright whichever way the line
1780
+ runs. A line with no clear stretch for its name goes unlabeled, a chart
1781
+ (or small-multiples panel) with a single line names none, and the plot
1782
+ leaves no room past the lines for these labels. The Line shape's
1783
+ `labelConfig` sets their `fontSize`, `fontFamily`, and `fontWeight`.
1784
+ When every line gets a name, the default legend hides (a `legend` of
1785
+ your own always wins). LinePlot defaults to `"along"`; other charts
1786
+ default to no labels.
1787
+ */
1788
+ lineLabels?: LineLabelsSetting;
1789
+ /**
1790
+ Options for `lineLabels`. `value: true` adds the line's value at each
1791
+ labeled end after the series name (e.g. "Brazil 37%"), formatted as the
1792
+ y axis formats its ticks (its `tickFormat` when set). `valueFormat`
1793
+ formats it instead, as a function of the value, the row it belongs to,
1794
+ and the row's index. Defaults to `{value: false}`.
1795
+ */
1796
+ lineLabelConfig?: LineLabelConfig;
955
1797
  /**
956
1798
  RadialBar's sweep, in degrees from `startAngle`. Defaults to 270 for
957
1799
  tracks and 360 for the circular bar chart.
958
1800
  */
959
1801
  maxAngle?: number;
1802
+ /**
1803
+ Geomap: how far each link bows into an arc, as a share of the distance
1804
+ between its ends. `0` draws the plain great-circle path; the default
1805
+ `0.2` lifts a link's middle by a fifth of that distance, to the left
1806
+ of its direction (a negative value bows to the right), so links
1807
+ running both ways between two places stay apart. On a flat map, a
1808
+ link whose great circle the projection cuts (across the antimeridian,
1809
+ or between `"geoAlbersUsa"`'s insets) is drawn on the screen between
1810
+ its ends, bowed the same way, so it crosses the map instead of leaving
1811
+ by one edge. On a projection that clips to a circle (a globe such as
1812
+ `"geoOrthographic"`), links follow the great circle without the lift.
1813
+ */
1814
+ linkCurve?: number;
1815
+ /**
1816
+ Network and Geomap: bundles the links (force-directed edge bundling,
1817
+ after Holten and van Wijk). Links that run the same way near each
1818
+ other are pulled together into shared curves that fan out at their
1819
+ ends, so the main flows read through the clutter of a dense chart.
1820
+ Arrowheads, labels, hover, and click focus follow each bundled curve.
1821
+ A Network's links from a node to itself, and a Geomap's links on a
1822
+ globe or cut by its projection, are drawn as usual; a bundled Geomap
1823
+ link ignores `linkCurve`. The bundling is worked out once per layout
1824
+ (under a second for 2,500 links) and reused while the chart zooms,
1825
+ pans, or is hovered. Defaults to `false`.
1826
+ */
1827
+ linkBundle?: boolean;
1828
+ /**
1829
+ Tunes `linkBundle`: `strength` (how closely links keep to their
1830
+ bundles, `0.85`), `cycles` (`6`), `iterations` (`50`),
1831
+ `compatibility` (how alike two links must be to bundle, `0.4`; lower
1832
+ bundles more), and `smoothing` (`true` draws smooth curves). Merged
1833
+ into the defaults.
1834
+ */
1835
+ linkBundleConfig?: LinkBundleConfig;
1836
+ /**
1837
+ Network, Rings, and Geomap: the widest link, in pixels, when `linkSize`
1838
+ values differ. Network and Rings default to half the smallest node's
1839
+ radius (never thinner than `linkSizeMin`); Geomap defaults to `10`. A
1840
+ `linkSizeMin` wider than a set `linkSizeMax` is held to it.
1841
+ */
1842
+ linkSizeMax?: number;
1843
+ /**
1844
+ Network, Rings, ArcDiagram, and Geomap: the thinnest link, in pixels,
1845
+ when `linkSize` values differ (default `1`).
1846
+ */
1847
+ linkSizeMin?: number;
1848
+ /**
1849
+ Colors each link of a Network, Rings, Sankey, ArcDiagram, or Geomap,
1850
+ and its arrowheads: `"source"` or `"target"` takes that end node's color, and
1851
+ a key or accessor function reads a value from each link (receiving the
1852
+ link, with `source` and `target` set to the data of its nodes, and its
1853
+ index in `links`). A number is colored on the chart's
1854
+ colorScale, which then shows the links' values beside the nodes' color
1855
+ legend (when the chart also has a `colorScale` for its nodes, nodes and
1856
+ links share it, on one domain); a string is a color when it parses as
1857
+ one, or else a category in the chart's palette, as `color` colors
1858
+ nodes. `false` (the default) draws every link in the theme's `link`
1859
+ gray (on a Geomap, a gray halfway between the chart's background and
1860
+ text colors, which reads over land and water alike).
1861
+ */
1862
+ linkColor?: false | "source" | "target" | string | ((d: DataPoint, i: number) => unknown);
1863
+ /**
1864
+ Text drawn at the middle of each link of a Network, Rings, Sankey,
1865
+ ArcDiagram, or Geomap: a key or accessor function (receiving the link, with
1866
+ `source` and `target` set to the data of its nodes, and its index in
1867
+ `links`). It sits halfway along a link's length, centered on
1868
+ a Sankey band, and at the top of an ArcDiagram arc, on a pad of the
1869
+ chart's background, and follows a curved link's curve (see
1870
+ `linkLabelConfig`). Numbers are abbreviated in the chart's locale.
1871
+ Labels that would cover a node or another label are hidden, the
1872
+ widest links' labels kept first. Defaults to none.
1873
+ */
1874
+ linkLabel?: string | ((d: DataPoint, i: number) => unknown);
1875
+ /**
1876
+ Styles the link labels (see `linkLabel`): `rotate`, `"along"` (the
1877
+ default) to run text along its link, kept upright, or `"horizontal"`;
1878
+ `fontSize` (10); `padding`, the pad around the text (2);
1879
+ `backgroundOpacity`, the opacity of that pad in the chart's background
1880
+ color (0.85); `minRadius`, the tightest bend a curved label follows,
1881
+ in ems (2); and any other TextBox setting, such as `fontColor`
1882
+ (defaults to the chart's text color), `fontFamily`, or `fontWeight`.
1883
+ Along a curved link (a Rings spline or fanned parallel link, an
1884
+ ArcDiagram arc, a self-loop, a bundled Network edge, a Geomap flow
1885
+ arc, or a Sankey band or return lane), an `"along"` label follows the
1886
+ curve, centered where a straight label would sit, over a pad that
1887
+ curves with it, and is cut short with an ellipsis when the curve has
1888
+ too little room (or left out when fewer than three letters fit). A
1889
+ loop bending tighter than `minRadius` keeps a straight label.
1890
+ */
1891
+ linkLabelConfig?: LinkLabelConfig;
960
1892
  /** 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. */
961
1893
  link?: LinkOption;
1894
+ /**
1895
+ Network, Rings, ArcDiagram, and Geomap: the thickness of each link, as
1896
+ a pixel number used for every link, or an accessor function whose
1897
+ values are scaled (see `linkSizeScale`) from `linkSizeMin` up to
1898
+ `linkSizeMax` on a Network, Rings, or Geomap (by default half the
1899
+ smallest node's radius on the first two, and 10 pixels on a Geomap),
1900
+ or up to the smallest node's radius on an ArcDiagram. The
1901
+ function receives each link with its own fields, with `source` and
1902
+ `target` set to the data of the nodes at its ends (not their ids or
1903
+ indices), and its index in `links`. Link `shapeConfig` functions, arrow
1904
+ accessors, and tooltip accessors receive the same object.
1905
+ */
1906
+ linkSize?: number | ((d: DataPoint & {
1907
+ source: DataPoint;
1908
+ target: DataPoint;
1909
+ }, i: number) => number);
1910
+ /**
1911
+ Network, Rings, Sankey, Chord, ArcDiagram, and Geomap: transforms
1912
+ `links`
1913
+ before they are drawn. The function receives the loaded file (or the
1914
+ Array passed as `links`) and returns the links Array. It runs when the
1915
+ chart renders, whichever order `links` and `linksFormat` are set in,
1916
+ and setting it again re-runs it on the next render. Passing a formatter
1917
+ as the second argument of `links(url, format)` sets it, and setting
1918
+ `links` alone keeps it.
1919
+ */
1920
+ linksFormat?: (data: DataPoint[]) => DataPoint[];
962
1921
  /**
963
1922
  Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.
964
1923
  */
@@ -973,6 +1932,12 @@ export interface D3plusConfig {
973
1932
  measureSize?: number;
974
1933
  /** Orders Violin and Ridgeline categories by median: `false` (default; data order), `"ascending"`, or `"descending"`. */
975
1934
  medianSort?: false | "ascending" | "descending";
1935
+ /**
1936
+ Gantt: accessor or data key for whether a task is a milestone, drawn as
1937
+ a diamond at its `end` (default `"milestone"`). Without one, a task that
1938
+ starts and ends at the same time is a milestone.
1939
+ */
1940
+ milestone?: string | ((d: DataPoint, i: number) => unknown) | false;
976
1941
  /**
977
1942
  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.
978
1943
  */
@@ -1027,10 +1992,37 @@ export interface D3plusConfig {
1027
1992
  Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.
1028
1993
  */
1029
1994
  noDataMessage?: boolean;
1995
+ /**
1996
+ The order of ArcDiagram's nodes along its line: `"data"` (the default,
1997
+ their order in `nodes`), `"label"` (alphabetical), `"group"` (by the
1998
+ top `groupBy` or `nodeGroupBy` level when there are several, else by
1999
+ the `color` value, then by label), `"degree"`
2000
+ (most connected first), or a comparator function receiving two node
2001
+ rows, as for `Array.prototype.sort`.
2002
+ */
2003
+ nodeSort?: "data" | "label" | "group" | "degree" | ((a: DataPoint, b: DataPoint) => number);
2004
+ /**
2005
+ Network, Rings, Sankey, Chord, and ArcDiagram: transforms `nodes`
2006
+ before they are drawn. The function receives the loaded file (or the
2007
+ Array passed as `nodes`) and returns the nodes Array. It runs when the
2008
+ chart renders, whichever order `nodes` and `nodesFormat` are set in,
2009
+ and setting it again re-runs it on the next render. Passing a formatter
2010
+ as the second argument of `nodes(url, format)` sets it, and setting
2011
+ `nodes` alone keeps it.
2012
+ */
2013
+ nodesFormat?: (data: DataPoint[]) => DataPoint[];
2014
+ /**
2015
+ Network, Rings, Sankey, ArcDiagram, and Geomap: how many links a node's tooltip
2016
+ lists below its number of connections, strongest first, each as the
2017
+ node at its other end ("→ Target" or "← Source") and its value. A
2018
+ number, or `false` to list none. Defaults to 3 when the links differ
2019
+ in value (`linkSize`, or Sankey's `value`), and none when they don't.
2020
+ */
2021
+ nodeTooltipLinks?: number | false;
1030
2022
  /**
1031
2023
  Ocean color for geomaps (any CSS value including 'transparent'), or a
1032
- `{light, dark}` pair chosen by the chart's backdrop. Defaults to the
1033
- default basemap's own water colors.
2024
+ `{light, dark}` pair chosen by the chart's `theme` (the page behind it
2025
+ in `"auto"` mode). Defaults to the default basemap's own water colors.
1034
2026
  */
1035
2027
  ocean?: string | {
1036
2028
  light: string;
@@ -1055,25 +2047,62 @@ export interface D3plusConfig {
1055
2047
  overlap?: number;
1056
2048
  /**
1057
2049
  Room (px) the Radar reserves around its web for the metric labels.
1058
- `"auto"` (the default) measures the labels and gives the web the largest
1059
- radius at which every label fits inside the chart, wrapping long labels
1060
- onto two lines (and truncating what still doesn't fit) rather than
1061
- shrinking the web below half its largest possible size. A number
1062
- reserves exactly that much room and wraps labels to that width.
2050
+ `"auto"` (the default) curves every metric name along the web when
2051
+ they all fit (see `labelPosition`), on one line or, for long names,
2052
+ two, which needs only that much room.
2053
+ Otherwise it measures the labels along their spokes and gives the web
2054
+ the largest radius at which every label fits inside the chart,
2055
+ wrapping long labels onto two lines (and truncating what still doesn't
2056
+ fit) rather than shrinking the web below half its largest possible
2057
+ size; names that fit along the web at that radius still curve. A
2058
+ number reserves exactly that much room and wraps labels to that width.
1063
2059
  */
1064
2060
  outerPadding?: number | "auto";
2061
+ /** Priestley and Gantt: the space between neighboring bars, as a share of each row (d3's band `paddingInner`). */
2062
+ paddingInner?: number;
2063
+ /** Priestley and Gantt: the space before the first row and after the last, as a share of a row (d3's band `paddingOuter`). */
2064
+ paddingOuter?: number;
1065
2065
  /** Pyramid: draws each value as a fraction of the frame's total, with the axis and tooltip reading percentages. */
1066
2066
  percent?: boolean;
1067
2067
  /** Calendar: what each block covers — `"year"` (the default; whole years, stacked) or `"month"` (whole months, as a grid of small calendars). */
1068
2068
  period?: "year" | "month";
1069
2069
  /** Coordinate accessor for point-based geomaps. */
1070
2070
  point?: (d: DataPoint) => number[];
2071
+ /**
2072
+ Hexbin: the style of the observations `points` draws: `r`, the dot
2073
+ radius in pixels (default `1.5`); `fill` (defaults to the chart's text
2074
+ color); and `fillOpacity` (default `0.35`). Merged into the current
2075
+ config.
2076
+ */
2077
+ pointConfig?: PointConfig;
2078
+ /**
2079
+ Fits and styles circle labels (see `labelPosition`): `fontMin` is the
2080
+ smallest font size a label may shrink to inside its circle before
2081
+ `"auto"` moves it beside the circle (default `10`, the size of the
2082
+ chart's smallest text, its total); `fontSize` is the size of a label
2083
+ beside its circle (default `11`); `padding` is the space between the
2084
+ circle's edge and that label (default `3`). The other TextBox keys
2085
+ (`fontColor`, `fontFamily`, `fontWeight`, `fontOpacity`, …) style the
2086
+ labels beside their circles, which default to the chart's text color.
2087
+ Merged into the current config.
2088
+ */
2089
+ pointLabelConfig?: PointLabelConfig;
2090
+ /** Hexbin: draws the raw observations as small dots beneath the bins and contours. Defaults to `false`. */
2091
+ points?: boolean;
1071
2092
  /** Point size accessor for geomaps. */
1072
2093
  pointSize?: string | ((d: DataPoint) => number);
1073
2094
  /** Minimum point size for geomaps. */
1074
2095
  pointSizeMin?: number;
1075
2096
  /** Maximum point size for geomaps. */
1076
2097
  pointSizeMax?: number;
2098
+ /**
2099
+ Gantt: accessor or data key for each task's progress, a fraction from 0
2100
+ to 1 (`0.6`) or a percent string (`"60%"`); default `"progress"`. The
2101
+ done part of the bar fills in the task's color and the rest in a paler
2102
+ shade, and the tooltip lists it. A milestone below 100% draws pale and
2103
+ outlined. A key also averages grouped rows' progress.
2104
+ */
2105
+ progress?: string | ((d: DataPoint, i: number) => unknown) | false;
1077
2106
  /** Map projection name or function. */
1078
2107
  projection?: string | ((x: number, y: number) => [number, number]);
1079
2108
  /** Outer padding between the visualization edge and map shapes. */
@@ -1085,8 +2114,99 @@ export interface D3plusConfig {
1085
2114
  wedge's area proportional to its value; `"linear"` its radius.
1086
2115
  */
1087
2116
  radialScale?: "sqrt" | "linear";
2117
+ /**
2118
+ Whether the chart animates. `"auto"` (default) follows the viewer's OS
2119
+ setting, read from the `(prefers-reduced-motion: reduce)` media query at
2120
+ each draw (server-side rendering counts as not reduced). `true` always
2121
+ draws without motion: shapes, axes, legends, zooms, and fades jump
2122
+ straight to their final state. `false` always animates. `duration` keeps
2123
+ the value you set either way.
2124
+ */
2125
+ reducedMotion?: "auto" | boolean;
2126
+ /**
2127
+ Plot: shaded spans across the plot between two values, such as a
2128
+ recession or a target range. Give each entry `x` (a vertical band) or
2129
+ `y` (a horizontal one) as `[start, end]` in data units (numbers, dates,
2130
+ or categories; on a category axis the band covers each end category's
2131
+ whole slot), or `x2`/`y2` for the secondary axes, or `ref: "plot"` for
2132
+ fractions of the plot area. An optional `label` sits inside the band's
2133
+ top-left corner (`labelPosition: "end"` for the top-right), with
2134
+ `fontColor`, `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, and
2135
+ `maxWidth`. The fill defaults to the chart's text color at `fillOpacity`
2136
+ `0.08`, so it reads on light and dark themes; `stroke`, `strokeWidth`,
2137
+ and `strokeOpacity` add edges. On a continuous or time axis the band's
2138
+ ends count toward the axis domain, widening it to show the whole band
2139
+ (an end set by `xDomain`/`yDomain`/`x2Domain`/`y2Domain` or the axis
2140
+ config's `domain` stays put). Each entry expands into a
2141
+ `"ReferenceBand"` annotation (see `annotations`) behind the data
2142
+ (`layer: "front"` to draw it over; its label always draws above), which follows zoom and never
2143
+ responds to the pointer or keyboard. A label that would cover a data
2144
+ label or another reference label moves to the band's other corners or
2145
+ along its length, inside the plot, and is hidden when no spot is free.
2146
+ */
2147
+ referenceBands?: ReferenceBandConfig[];
2148
+ /**
2149
+ Plot: lines across the whole plot at one value, such as a target or a
2150
+ launch date. Give each entry `x` (a vertical line) or `y` (a horizontal
2151
+ one) in data units (a number, a date, or a category), or `x2`/`y2` for
2152
+ the secondary axes, or `ref: "plot"` for a fraction of the plot area.
2153
+ An optional `label` sits at the line's `"end"` (the right of a
2154
+ horizontal line, the top of a vertical one) or `"start"`
2155
+ (`labelPosition`), with `fontColor`, `fontFamily`, `fontSize`,
2156
+ `fontWeight`, `lineHeight`, and `maxWidth`. The line's `stroke`
2157
+ defaults to the chart's text color at `strokeOpacity` `0.6`, `strokeWidth`
2158
+ `1`; `dash: true` dashes it ("4 4"), or give a dash pattern. On a
2159
+ continuous or time axis the value counts toward the axis domain,
2160
+ widening it to show the line (an end set by `xDomain`/`yDomain`/
2161
+ `x2Domain`/`y2Domain` or the axis config's `domain` stays put; a value
2162
+ outside such a domain is not drawn). Each entry
2163
+ expands into a `"ReferenceLine"` annotation (see `annotations`) behind
2164
+ the data (`layer: "front"` to draw it over; its label always draws
2165
+ above), which follows zoom and
2166
+ never responds to the pointer or keyboard. A label that would cover a
2167
+ data label or another reference label moves to the line's other side
2168
+ or end, or along it, inside the plot, and is hidden when no spot is
2169
+ free.
2170
+ */
2171
+ referenceLines?: ReferenceLineConfig[];
1088
2172
  /** Row key for matrix-style layouts. */
1089
2173
  row?: string;
2174
+ /** 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. */
2175
+ saveControl?: boolean;
2176
+ /**
2177
+ An additional CSS class name (or space-separated list of class names) applied to the download button, alongside the fixed `save-control`/`save-toggle` classes. Setting this automatically disables d3plus's built-in inline `saveControlStyle`/`saveControlStyleActive`/`saveControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling applies through the cascade with no other configuration needed.
2178
+ */
2179
+ saveControlClassName?: string;
2180
+ /** Options for the download button: the saved file's `filename`, the `formats` it offers, the `background` painted behind the chart, a `callback`, and html-to-image options for PNG and JPG files. */
2181
+ saveControlConfig?: SaveControlConfig;
2182
+ /**
2183
+ An additional CSS class name (or space-separated list of class names) applied to the download menu, alongside its fixed `d3plus-save-menu` class (each item has the fixed `save-menu-item` class). Setting this automatically disables d3plus's built-in inline `saveControlMenuStyle`/`saveControlMenuItemStyle`/`saveControlMenuItemStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own menu styling applies through the cascade. The menu's position and open/closed display stay inline.
2184
+ */
2185
+ saveControlMenuClassName?: string;
2186
+ /**
2187
+ An object containing CSS key/value pairs that is used to style each item in the download menu. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.saveControlMenuClassName(...)` is set, unless you've explicitly customized this yourself.
2188
+ */
2189
+ saveControlMenuItemStyle?: Record<string, unknown> | false;
2190
+ /**
2191
+ An object containing CSS key/value pairs that is used to style the download menu item under the pointer or keyboard focus. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.saveControlMenuClassName(...)` is set, unless you've explicitly customized this yourself.
2192
+ */
2193
+ saveControlMenuItemStyleHover?: Record<string, unknown> | false;
2194
+ /**
2195
+ An object containing CSS key/value pairs that is used to style the download menu: its background, border, shadow, and spacing. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.saveControlMenuClassName(...)` is set, unless you've explicitly customized this yourself.
2196
+ */
2197
+ saveControlMenuStyle?: Record<string, unknown> | false;
2198
+ /**
2199
+ An object containing CSS key/value pairs that is used to style the download button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.saveControlClassName(...)` is set, unless you've explicitly customized this yourself.
2200
+ */
2201
+ saveControlStyle?: Record<string, unknown> | false;
2202
+ /**
2203
+ An object containing CSS key/value pairs that is used to style the download button while its menu is open. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.saveControlClassName(...)` is set, unless you've explicitly customized this yourself.
2204
+ */
2205
+ saveControlStyleActive?: Record<string, unknown> | false;
2206
+ /**
2207
+ An object containing CSS key/value pairs that is used to style the download button on hover. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.saveControlClassName(...)` is set, unless you've explicitly customized this yourself.
2208
+ */
2209
+ saveControlStyleHover?: Record<string, unknown> | false;
1090
2210
  /**
1091
2211
  If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.
1092
2212
  */
@@ -1167,12 +2287,29 @@ export interface D3plusConfig {
1167
2287
  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.
1168
2288
  */
1169
2289
  sizeLegendPosition?: "right" | "bottom";
2290
+ /**
2291
+ 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"`.
2292
+ */
2293
+ sizeZero?: boolean;
2294
+ /**
2295
+ SlopeChart: colors each line by its direction between its first and
2296
+ last period. `true` draws rising lines green, falling lines red, and
2297
+ flat lines in the theme's muted text color, in shades that suit a light
2298
+ or dark theme; an object sets any of `up`, `down`, and `flat` itself.
2299
+ The legend and markers follow.
2300
+ */
2301
+ slopeColor?: SlopeColorSetting;
1170
2302
  /**
1171
2303
  With two groupBy levels, Violin places violins by the first and sets
1172
2304
  them side by side by the second. `split` draws a category holding
1173
2305
  exactly two violins as the two halves of one shape instead.
1174
2306
  */
1175
2307
  split?: boolean;
2308
+ /**
2309
+ Priestley and Gantt: accessor or data key for each row's start (default
2310
+ `"start"`). A key also aggregates grouped rows by their earliest start.
2311
+ */
2312
+ start?: string | ((d: DataPoint, i: number) => unknown);
1176
2313
  /** Funnel: the gap between consecutive stages, as a fraction (0–1) of each stage's slot. */
1177
2314
  stagePadding?: number;
1178
2315
  /** Whether to stack series. */
@@ -1190,7 +2327,8 @@ export interface D3plusConfig {
1190
2327
  `"key"` / `"keyReverse"` alphabetically, `"none"` / `"data"` for input
1191
2328
  order, or d3's `"insideOut"` / `"appearance"` / `"reverse"`), an Array of
1192
2329
  series keys for an explicit order, a value accessor, or a `{value, order}`
1193
- config to rank series by an aggregate of any data field.
2330
+ config to rank series by an aggregate of any data field. The default
2331
+ legend lists the series in this order, from the baseline outward.
1194
2332
  */
1195
2333
  stackOrder?: string | string[] | {
1196
2334
  value: string | ((d: DataPoint) => unknown);
@@ -1276,18 +2414,57 @@ export interface D3plusConfig {
1276
2414
  tableViewSort?: boolean;
1277
2415
  /** Funnel: narrows each stage toward the next stage's width, drawing a continuous funnel instead of flat bars. */
1278
2416
  taper?: boolean;
2417
+ /** Gantt: styles the task label column: `fontColor` (the chart's text color by default), `fontFamily`, and `fontSize` (12). */
2418
+ taskLabelConfig?: {
2419
+ fontColor?: string;
2420
+ fontFamily?: string | string[];
2421
+ fontSize?: number;
2422
+ };
2423
+ /**
2424
+ Gantt: the order of the tasks: `"data"` (the default) keeps the data's
2425
+ order, `"start"` sorts by start, and a function compares two data rows.
2426
+ Groups follow their first task.
2427
+ */
2428
+ taskSort?: "data" | "start" | ((a: DataPoint, b: DataPoint) => number);
1279
2429
  /** 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`. */
1280
2430
  target?: string | number | ((d: DataPoint, i: number) => number) | false;
1281
2431
  /** Bullet: the target marker's `size` (a fraction of the band's thickness), `stroke`, and `strokeWidth`, each a value or a `(d, i)` accessor. */
1282
2432
  targetConfig?: Record<string, unknown>;
1283
- /** Threshold value for grouping small slices. */
2433
+ /**
2434
+ The chart's colors. `"auto"` (the default) paints no background and
2435
+ follows the page behind the chart: its chrome text contrasts with the
2436
+ page, its tooltip, table view, and overlays turn dark on a dark page,
2437
+ and it redraws when the page flips between light and dark. `"light"` and
2438
+ `"dark"` paint the theme's background behind the chart (so it reads the
2439
+ same on any page, and in a saved image) and take every chrome color
2440
+ from the theme. An object sets your own tokens on top of the preset its
2441
+ `base` names (`"light"` or `"dark"`), for example
2442
+ `{base: "dark", background: "#123", accent: "#ffd43b"}`. A dark theme
2443
+ also turns color scale ramps around, from a dim tint near the background
2444
+ up to a bright pole (see the `colorScale` tokens). Colors you set in the
2445
+ other config (`titleConfig.fontColor`, `tooltipConfig`,
2446
+ `colorScaleConfig.colorMax`, the `*Style` options, …) win over the
2447
+ theme.
2448
+ */
2449
+ theme?: ThemeSetting;
2450
+ /**
2451
+ Threshold value for grouping small slices, as a share of the total
2452
+ (`0.05` is 5%). On a stacked Plot (StackedArea, or an AreaPlot,
2453
+ BarChart, or LinePlot with `stacked`), the series whose summed value
2454
+ across every position is under that share of the whole chart's total
2455
+ merge into one series, labelled by `thresholdName` and stacked on top.
2456
+ A bucket needs at least two items (a lone small item stays as
2457
+ itself), and its tooltips list the items it holds with their values.
2458
+ Off by default on Plot charts.
2459
+ */
1284
2460
  threshold?: number;
1285
2461
  /** Label for the threshold group, or a `(datum, index)` accessor. */
1286
2462
  thresholdName?: string | ((d: DataPoint, i: number) => string);
1287
2463
  /**
1288
2464
  URL template for XYZ map tiles, with `{z}`, `{x}`, `{y}` (and optional
1289
2465
  `{s}` subdomain) placeholders — or a `{light, dark}` pair, chosen by the
1290
- chart's backdrop. Defaults to Esri's Light Gray and Dark Gray Canvas.
2466
+ chart's `theme` (the page behind it in `"auto"` mode). Defaults to
2467
+ Esri's Light Gray and Dark Gray Canvas.
1291
2468
  */
1292
2469
  tileUrl?: string | {
1293
2470
  light: string;
@@ -1297,7 +2474,15 @@ export interface D3plusConfig {
1297
2474
  tiles?: boolean;
1298
2475
  /** Time key for temporal data. */
1299
2476
  time?: string;
1300
- /** Predicate filtering which time slices are shown, or false to disable. */
2477
+ /**
2478
+ Predicate filtering which time slices are shown, or false to disable.
2479
+ With `time` set and no `timeFilter`, a chart starts on its latest
2480
+ period, or on `timelineDefault`/`timelineConfig.selection`; setting it
2481
+ starts the chart (and its timeline) on the periods it keeps. A
2482
+ viewer's pick on the timeline replaces it.
2483
+ @example
2484
+ {timeFilter: d => d.year === 2015}
2485
+ */
1301
2486
  timeFilter?: ((d: DataPoint, i: number) => boolean) | false;
1302
2487
  /** Whether to show the timeline component. */
1303
2488
  timeline?: boolean;
@@ -1315,6 +2500,19 @@ export interface D3plusConfig {
1315
2500
  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.
1316
2501
  */
1317
2502
  titlePadding?: boolean | ((viz: VizBase) => boolean);
2503
+ /**
2504
+ Gantt: draws a "today" line across the rows: `true` at the current
2505
+ time, or a date (or anything the axis parses) to mark that time. Off
2506
+ (`false`) by default; it only draws inside the time axis.
2507
+ */
2508
+ today?: boolean | Date | string | number;
2509
+ /**
2510
+ Gantt: styles the "today" line like a `referenceLines` entry: `stroke`,
2511
+ `strokeWidth` (1.5), `strokeOpacity` (0.85), `dash`, and its `label`
2512
+ (the translated "Today"; `false` for none), with the label's font and
2513
+ `labelPosition`.
2514
+ */
2515
+ todayConfig?: Omit<ReferenceLineConfig, "x" | "y" | "x2" | "y2" | "ref">;
1318
2516
  /** Whether to show tooltips, or a `(datum, index)` accessor deciding per mark. */
1319
2517
  tooltip?: boolean | ((d: DataPoint, i: number) => boolean);
1320
2518
  /** Configuration for the tooltip component. */
@@ -1352,7 +2550,16 @@ export interface D3plusConfig {
1352
2550
  trendLineConfig?: TrendLineConfig;
1353
2551
  /** Path or object for the topojson data. */
1354
2552
  topojson?: string | object;
1355
- /** CSS color to fill the map shapes. */
2553
+ /**
2554
+ Geomap: transforms `topojson` before it is drawn. The function receives
2555
+ the loaded file (or the object passed as `topojson`) and returns the
2556
+ topojson to draw. It runs when the chart renders, whichever order
2557
+ `topojson` and `topojsonFormat` are set in, and setting it again re-runs
2558
+ it on the next render. Passing a formatter as the second argument of
2559
+ `topojson(url, format)` sets it, and setting `topojson` alone keeps it.
2560
+ */
2561
+ topojsonFormat?: (data: Record<string, unknown>) => object;
2562
+ /** 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. */
1356
2563
  topojsonFill?: CssColor;
1357
2564
  /** Accessor function for topojson feature IDs. */
1358
2565
  topojsonId?: (obj: Record<string, unknown>) => string;