@d3plus/core 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/es/internal.js +15 -5
  2. package/es/src/charts/Alluvial/emit.js +2 -2
  3. package/es/src/charts/Alluvial/index.js +7 -1
  4. package/es/src/charts/Alluvial/titles.js +24 -4
  5. package/es/src/charts/ArcDiagram/emit.js +27 -13
  6. package/es/src/charts/ArcDiagram/events.js +6 -2
  7. package/es/src/charts/ArcDiagram/index.js +2 -0
  8. package/es/src/charts/BarChart/index.js +3 -10
  9. package/es/src/charts/Calendar/index.js +2 -0
  10. package/es/src/charts/Candlestick/index.js +4 -10
  11. package/es/src/charts/Gantt/applyLayout.js +2 -4
  12. package/es/src/charts/Geomap/flowEmit.js +11 -6
  13. package/es/src/charts/Hexbin/index.js +2 -0
  14. package/es/src/charts/Icicle/index.js +3 -1
  15. package/es/src/charts/Matrix/applyLayout.js +20 -9
  16. package/es/src/charts/Matrix/index.js +19 -1
  17. package/es/src/charts/Network/applyLayout.js +36 -5
  18. package/es/src/charts/Network/bundle.js +5 -4
  19. package/es/src/charts/Network/emit.js +39 -40
  20. package/es/src/charts/Network/graph.js +34 -5
  21. package/es/src/charts/Network/graphFluent.js +5 -3
  22. package/es/src/charts/Network/index.js +6 -1
  23. package/es/src/charts/Pack/applyLayout.js +16 -5
  24. package/es/src/charts/Pack/emit.js +15 -8
  25. package/es/src/charts/Pack/groupRows.js +61 -0
  26. package/es/src/charts/Pack/index.js +3 -0
  27. package/es/src/charts/Pack/neutralPaint.js +20 -0
  28. package/es/src/charts/Pack/nodeNames.js +35 -0
  29. package/es/src/charts/ParallelCoordinates/axes.js +22 -22
  30. package/es/src/charts/ParallelCoordinates/chrome.js +18 -0
  31. package/es/src/charts/ParallelCoordinates/index.js +3 -1
  32. package/es/src/charts/ParallelCoordinates/titles.js +17 -9
  33. package/es/src/charts/Pie/emit.js +9 -1
  34. package/es/src/charts/Pie/index.js +10 -0
  35. package/es/src/charts/Plot/areaEnter.js +68 -0
  36. package/es/src/charts/Plot/draw.js +26 -12
  37. package/es/src/charts/Plot/index.js +4 -10
  38. package/es/src/charts/Plot/lineMarkerKeys.js +19 -0
  39. package/es/src/charts/Plot/plotInit.js +6 -0
  40. package/es/src/charts/Plot/shapeLabelLegend.js +67 -0
  41. package/es/src/charts/Plot/sharedHover.js +2 -1
  42. package/es/src/charts/Plot/sharedTooltip.js +13 -3
  43. package/es/src/charts/PolarArea/index.js +2 -1
  44. package/es/src/charts/Priestley/applyLayout.js +11 -7
  45. package/es/src/charts/Priestley/index.js +0 -2
  46. package/es/src/charts/Priestley/timeAxis.js +11 -8
  47. package/es/src/charts/Pyramid/gutter.js +52 -16
  48. package/es/src/charts/Pyramid/index.js +55 -7
  49. package/es/src/charts/Pyramid/scene.js +4 -4
  50. package/es/src/charts/Radar/applyLayout.js +31 -33
  51. package/es/src/charts/Radar/axisDecorations.js +29 -17
  52. package/es/src/charts/Radar/curvedLabels.js +43 -2
  53. package/es/src/charts/Radar/emit.js +30 -15
  54. package/es/src/charts/Radar/index.js +41 -2
  55. package/es/src/charts/Radar/points.js +85 -0
  56. package/es/src/charts/RadialBar/emit.js +6 -1
  57. package/es/src/charts/RadialBar/index.js +10 -0
  58. package/es/src/charts/RadialMatrix/applyLayout.js +115 -31
  59. package/es/src/charts/RadialMatrix/index.js +15 -2
  60. package/es/src/charts/Rings/applyLayout.js +11 -150
  61. package/es/src/charts/Rings/emit.js +80 -40
  62. package/es/src/charts/Rings/index.js +27 -4
  63. package/es/src/charts/Rings/ringsCurves.js +156 -0
  64. package/es/src/charts/Rings/ringsParallel.js +20 -3
  65. package/es/src/charts/Rings/ringsPlacement.js +152 -0
  66. package/es/src/charts/Rings/ringsSizing.js +61 -38
  67. package/es/src/charts/Sankey/applyLayout.js +18 -4
  68. package/es/src/charts/Sankey/index.js +7 -1
  69. package/es/src/charts/Sunburst/emit.js +9 -1
  70. package/es/src/charts/Sunburst/index.js +13 -1
  71. package/es/src/charts/Tree/applyLayout.js +44 -14
  72. package/es/src/charts/Tree/emit.js +5 -5
  73. package/es/src/charts/Tree/index.js +10 -12
  74. package/es/src/charts/Tree/keys.js +33 -0
  75. package/es/src/charts/Tree/nodeLabel.js +15 -0
  76. package/es/src/charts/Treemap/emitGroupHeaders.js +3 -5
  77. package/es/src/charts/definition/makeChart.js +6 -2
  78. package/es/src/charts/drawSteps/minimap.js +4 -20
  79. package/es/src/charts/drawSteps/zoomActions.js +36 -0
  80. package/es/src/charts/drawSteps/zoomControls.js +31 -18
  81. package/es/src/charts/drawSteps/zoomControlsMarkup.js +23 -4
  82. package/es/src/charts/drawSteps/zoomDrag.js +188 -0
  83. package/es/src/charts/drawSteps/zoomFit.js +69 -0
  84. package/es/src/charts/events/click.legend.js +4 -2
  85. package/es/src/charts/events/click.shape.js +5 -3
  86. package/es/src/charts/events/mouseenter.js +6 -16
  87. package/es/src/charts/events/mouseleave.js +9 -2
  88. package/es/src/charts/events/mousemove.legend.js +28 -32
  89. package/es/src/charts/events/mousemove.shape.js +44 -44
  90. package/es/src/charts/features/axes.js +15 -4
  91. package/es/src/charts/features/axesFinal.js +7 -2
  92. package/es/src/charts/features/axesMeasure.js +26 -8
  93. package/es/src/charts/features/axisTooltip.js +138 -0
  94. package/es/src/charts/features/centerLabel.js +177 -0
  95. package/es/src/charts/features/colorScaleBivariate.js +83 -0
  96. package/es/src/charts/features/colorScaleBucket.js +18 -0
  97. package/es/src/charts/features/colorScaleHover.js +30 -5
  98. package/es/src/charts/features/colorScaleLimit.js +73 -0
  99. package/es/src/charts/features/colorScaleTooltip.js +77 -0
  100. package/es/src/charts/features/colorScaleTop.js +61 -0
  101. package/es/src/charts/features/curvedArrows.js +33 -0
  102. package/es/src/charts/features/depthKey.js +26 -0
  103. package/es/src/charts/features/edgeArrows.js +61 -2
  104. package/es/src/charts/features/featuresColorScale.js +57 -16
  105. package/es/src/charts/features/hoverTicks.js +41 -0
  106. package/es/src/charts/features/idleQueue.js +72 -0
  107. package/es/src/charts/features/linkInteraction.js +59 -7
  108. package/es/src/charts/features/networkMeasures.js +241 -0
  109. package/es/src/charts/features/nodeStats.js +309 -0
  110. package/es/src/charts/features/plotEndLabels.js +28 -7
  111. package/es/src/charts/features/plotPaint.js +9 -2
  112. package/es/src/charts/features/shapeEmit.js +7 -1
  113. package/es/src/charts/features/textHalo.js +3 -2
  114. package/es/src/charts/partition/chartFields.js +12 -3
  115. package/es/src/charts/partition/interaction.js +10 -5
  116. package/es/src/charts/pipeline/insetPlacement.js +8 -3
  117. package/es/src/charts/polar/chrome.js +81 -9
  118. package/es/src/charts/polar/config.js +4 -0
  119. package/es/src/charts/polar/wedgeLayout.js +2 -1
  120. package/es/src/charts/viz/Viz.js +24 -15
  121. package/es/src/charts/viz/VizBase.js +39 -4
  122. package/es/src/charts/viz/backgroundInk.js +10 -0
  123. package/es/src/charts/viz/emphasis.js +14 -0
  124. package/es/src/charts/viz/fillStroke.js +10 -0
  125. package/es/src/charts/viz/interactionOpacity.js +115 -32
  126. package/es/src/charts/viz/reportDrawError.js +15 -0
  127. package/es/src/charts/viz/setCursor.js +29 -0
  128. package/es/src/charts/viz/tooltipEnabled.js +38 -0
  129. package/es/src/charts/viz/userClick.js +34 -0
  130. package/es/src/charts/viz/vizDataPolling.js +0 -1
  131. package/es/src/charts/viz/vizDefaults.js +13 -34
  132. package/es/src/charts/viz/vizFields.js +6 -1
  133. package/es/src/charts/viz/vizRender.js +35 -5
  134. package/es/src/charts/viz/vizVisibility.js +12 -2
  135. package/es/src/components/Axis/Axis.js +29 -2
  136. package/es/src/components/Axis/axisBreak.js +29 -7
  137. package/es/src/components/Axis/axisDefaults.js +11 -0
  138. package/es/src/components/Axis/axisLabelKinds.js +36 -0
  139. package/es/src/components/Axis/axisLabelLineHeight.js +19 -0
  140. package/es/src/components/Axis/axisLabelRoom.js +37 -0
  141. package/es/src/components/Axis/axisLabelSize.js +171 -0
  142. package/es/src/components/Axis/axisLabelThinning.js +98 -4
  143. package/es/src/components/Axis/axisLayout.js +71 -46
  144. package/es/src/components/Axis/axisLayoutLabels.js +82 -140
  145. package/es/src/components/Axis/axisLayoutScale.js +9 -10
  146. package/es/src/components/Axis/axisLimit.js +27 -0
  147. package/es/src/components/Axis/axisMaxSize.js +39 -0
  148. package/es/src/components/Axis/axisRender.js +20 -8
  149. package/es/src/components/Axis/axisRounding.js +16 -1
  150. package/es/src/components/Axis/axisScene.js +11 -2
  151. package/es/src/components/Axis/axisTitle.js +53 -0
  152. package/es/src/components/Axis/axisTooltipTargets.js +128 -0
  153. package/es/src/components/ColorScale/ColorScale.js +62 -18
  154. package/es/src/components/ColorScale/bivariateRender.js +353 -0
  155. package/es/src/components/ColorScale/bivariateScale.js +150 -0
  156. package/es/src/components/ColorScale/colorScaleRender.js +32 -2
  157. package/es/src/components/ColorScale/colorScaleSwatchTooltips.js +77 -0
  158. package/es/src/components/Legend/Legend.js +10 -2
  159. package/es/src/components/Legend/legendCut.js +108 -0
  160. package/es/src/components/Legend/legendRender.js +38 -13
  161. package/es/src/components/TextBox.js +5 -2
  162. package/es/src/components/Timeline/timelineRender.js +2 -1
  163. package/es/src/components/textBoxScene.js +3 -0
  164. package/es/src/components/textEllipsis.js +7 -0
  165. package/es/src/components/tooltipDom.js +8 -5
  166. package/es/src/fluent.js +48 -0
  167. package/es/src/utils/BaseClass.js +7 -2
  168. package/es/src/utils/configValue.js +9 -0
  169. package/package.json +10 -10
  170. package/types/index.d.ts +1 -1
  171. package/types/internal.d.ts +22 -5
  172. package/types/src/charts/Alluvial/titles.d.ts +16 -3
  173. package/types/src/charts/ArcDiagram/emit.d.ts +3 -2
  174. package/types/src/charts/ArcDiagram/events.d.ts +2 -1
  175. package/types/src/charts/Geomap/flowEmit.d.ts +3 -2
  176. package/types/src/charts/Matrix/applyLayout.d.ts +4 -2
  177. package/types/src/charts/Network/applyLayout.d.ts +11 -0
  178. package/types/src/charts/Network/bundle.d.ts +3 -1
  179. package/types/src/charts/Network/graph.d.ts +12 -4
  180. package/types/src/charts/Pack/applyLayout.d.ts +2 -0
  181. package/types/src/charts/Pack/groupRows.d.ts +46 -0
  182. package/types/src/charts/Pack/index.d.ts +3 -0
  183. package/types/src/charts/Pack/neutralPaint.d.ts +14 -0
  184. package/types/src/charts/Pack/nodeNames.d.ts +23 -0
  185. package/types/src/charts/ParallelCoordinates/chrome.d.ts +12 -0
  186. package/types/src/charts/ParallelCoordinates/index.d.ts +1 -0
  187. package/types/src/charts/ParallelCoordinates/titles.d.ts +7 -2
  188. package/types/src/charts/Plot/areaEnter.d.ts +34 -0
  189. package/types/src/charts/Plot/index.d.ts +4 -10
  190. package/types/src/charts/Plot/lineMarkerKeys.d.ts +11 -0
  191. package/types/src/charts/Plot/shapeLabelLegend.d.ts +19 -0
  192. package/types/src/charts/Plot/sharedTooltip.d.ts +7 -1
  193. package/types/src/charts/Priestley/timeAxis.d.ts +7 -4
  194. package/types/src/charts/Pyramid/gutter.d.ts +28 -6
  195. package/types/src/charts/Pyramid/scene.d.ts +1 -1
  196. package/types/src/charts/Radar/applyLayout.d.ts +2 -3
  197. package/types/src/charts/Radar/axisDecorations.d.ts +5 -2
  198. package/types/src/charts/Radar/curvedLabels.d.ts +35 -0
  199. package/types/src/charts/Radar/emit.d.ts +5 -2
  200. package/types/src/charts/Radar/index.d.ts +7 -2
  201. package/types/src/charts/Radar/points.d.ts +50 -0
  202. package/types/src/charts/RadialMatrix/applyLayout.d.ts +6 -4
  203. package/types/src/charts/Rings/emit.d.ts +24 -2
  204. package/types/src/charts/Rings/index.d.ts +4 -2
  205. package/types/src/charts/Rings/ringsCurves.d.ts +50 -0
  206. package/types/src/charts/Rings/ringsGraph.d.ts +29 -5
  207. package/types/src/charts/Rings/ringsParallel.d.ts +4 -2
  208. package/types/src/charts/Rings/ringsPlacement.d.ts +47 -0
  209. package/types/src/charts/Rings/ringsSizing.d.ts +36 -9
  210. package/types/src/charts/Tree/applyLayout.d.ts +20 -0
  211. package/types/src/charts/Tree/keys.d.ts +25 -0
  212. package/types/src/charts/Tree/nodeLabel.d.ts +11 -0
  213. package/types/src/charts/definition/ChartDefinition.d.ts +13 -0
  214. package/types/src/charts/definition/makeChart.d.ts +2 -2
  215. package/types/src/charts/drawSteps/zoomActions.d.ts +30 -0
  216. package/types/src/charts/drawSteps/zoomControls.d.ts +15 -0
  217. package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +16 -1
  218. package/types/src/charts/drawSteps/zoomDrag.d.ts +71 -0
  219. package/types/src/charts/drawSteps/zoomFit.d.ts +30 -0
  220. package/types/src/charts/features/axisTooltip.d.ts +49 -0
  221. package/types/src/charts/features/centerLabel.d.ts +75 -0
  222. package/types/src/charts/features/colorScaleBivariate.d.ts +50 -0
  223. package/types/src/charts/features/colorScaleBucket.d.ts +10 -0
  224. package/types/src/charts/features/colorScaleHover.d.ts +13 -3
  225. package/types/src/charts/features/colorScaleLimit.d.ts +60 -0
  226. package/types/src/charts/features/colorScaleTooltip.d.ts +43 -0
  227. package/types/src/charts/features/colorScaleTop.d.ts +30 -0
  228. package/types/src/charts/features/curvedArrows.d.ts +14 -0
  229. package/types/src/charts/features/depthKey.d.ts +19 -0
  230. package/types/src/charts/features/edgeArrows.d.ts +29 -2
  231. package/types/src/charts/features/hoverTicks.d.ts +30 -0
  232. package/types/src/charts/features/idleQueue.d.ts +46 -0
  233. package/types/src/charts/features/linkInteraction.d.ts +13 -4
  234. package/types/src/charts/features/networkMeasures.d.ts +53 -0
  235. package/types/src/charts/features/nodeStats.d.ts +93 -0
  236. package/types/src/charts/features/plotEndLabels.d.ts +14 -1
  237. package/types/src/charts/features/textHalo.d.ts +4 -3
  238. package/types/src/charts/partition/chartFields.d.ts +6 -1
  239. package/types/src/charts/pipeline/insetPlacement.d.ts +6 -0
  240. package/types/src/charts/polar/chrome.d.ts +19 -6
  241. package/types/src/charts/viz/Viz.d.ts +10 -3
  242. package/types/src/charts/viz/VizBase.d.ts +31 -2
  243. package/types/src/charts/viz/backgroundInk.d.ts +8 -0
  244. package/types/src/charts/viz/emphasis.d.ts +17 -0
  245. package/types/src/charts/viz/fillStroke.d.ts +7 -0
  246. package/types/src/charts/viz/reportDrawError.d.ts +12 -0
  247. package/types/src/charts/viz/setCursor.d.ts +26 -0
  248. package/types/src/charts/viz/tooltipEnabled.d.ts +31 -0
  249. package/types/src/charts/viz/userClick.d.ts +35 -0
  250. package/types/src/charts/viz/vizFields.d.ts +5 -0
  251. package/types/src/charts/viz/vizTypes.d.ts +16 -0
  252. package/types/src/charts/viz/vizVisibility.d.ts +7 -0
  253. package/types/src/components/Axis/Axis.d.ts +33 -3
  254. package/types/src/components/Axis/axisBreak.d.ts +19 -3
  255. package/types/src/components/Axis/axisDefaults.d.ts +12 -0
  256. package/types/src/components/Axis/axisLabelKinds.d.ts +22 -0
  257. package/types/src/components/Axis/axisLabelLineHeight.d.ts +27 -0
  258. package/types/src/components/Axis/axisLabelRoom.d.ts +17 -0
  259. package/types/src/components/Axis/axisLabelSize.d.ts +82 -0
  260. package/types/src/components/Axis/axisLabelThinning.d.ts +38 -2
  261. package/types/src/components/Axis/axisLayout.d.ts +9 -2
  262. package/types/src/components/Axis/axisLayoutLabels.d.ts +28 -33
  263. package/types/src/components/Axis/axisLayoutScale.d.ts +3 -1
  264. package/types/src/components/Axis/axisLimit.d.ts +18 -0
  265. package/types/src/components/Axis/axisMaxSize.d.ts +48 -0
  266. package/types/src/components/Axis/axisRounding.d.ts +8 -0
  267. package/types/src/components/Axis/axisTitle.d.ts +30 -0
  268. package/types/src/components/Axis/axisTooltipTargets.d.ts +82 -0
  269. package/types/src/components/ColorScale/ColorScale.d.ts +21 -11
  270. package/types/src/components/ColorScale/bivariateRender.d.ts +53 -0
  271. package/types/src/components/ColorScale/bivariateScale.d.ts +92 -0
  272. package/types/src/components/ColorScale/colorScaleSwatchTooltips.d.ts +48 -0
  273. package/types/src/components/Legend/Legend.d.ts +5 -0
  274. package/types/src/components/Legend/legendCut.d.ts +31 -0
  275. package/types/src/components/Legend/legendRender.d.ts +6 -1
  276. package/types/src/components/TextBox.d.ts +4 -0
  277. package/types/src/components/textEllipsis.d.ts +6 -0
  278. package/types/src/fluent.d.ts +18 -0
  279. package/types/src/shapes/emitLabels.d.ts +1 -1
  280. package/types/src/utils/D3plusConfig.d.ts +485 -609
  281. package/types/src/utils/configValue.d.ts +8 -0
  282. package/types/src/utils/index.d.ts +1 -1
  283. package/types/umd-entry.d.ts +4 -0
  284. package/umd/d3plus-core.full.js +22930 -17936
  285. package/umd/d3plus-core.full.min.js +2 -2
  286. package/umd/d3plus-core.js +21240 -16404
  287. package/umd/d3plus-core.min.js +2 -2
@@ -17,7 +17,8 @@ export declare function arcLabelPath(link: ArcLink): [number, number][];
17
17
  /**
18
18
  An arc's (or loop's) visible stroke: along it up to each arrowhead's
19
19
  base, then along the head's axis to end inside it (see `arcArrowEdge`),
20
- whose tips sit a pixel out past the nodes.
20
+ whose tips sit a pixel out past the nodes. `scale` widens the stroke
21
+ (see `emphasizedArrowEdge`).
21
22
  */
22
- export declare function arcVisibleD(viz: VizInstance, link: ArcLink): string;
23
+ export declare function arcVisibleD(viz: VizInstance, link: ArcLink, scale?: number): string;
23
24
  export declare const arcDiagramEmit: ChartEmit;
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  ArcDiagram's pointer handlers. Hovering a node highlights it, its
3
3
  neighbors, and the arcs between them; hovering an arc highlights it and
4
- its two ends. Clicking a node or arc focuses the same set and zooms to it
4
+ its two ends; hovering a legend item highlights its nodes and the arcs
5
+ between them. Clicking a node or arc focuses the same set and zooms to it
5
6
  (clicking it again, or the background, resets), and clicking a legend
6
7
  item focuses its nodes, as Network does.
7
8
  */
@@ -23,9 +23,10 @@ export declare function flowLinkGray(viz: VizInstance): string;
23
23
  its base (`size` further back along the path) to its tip; the stroke
24
24
  follows the path to each base, then runs straight along that chord to
25
25
  end inside the head (see `polylineArrowEdge`). A head goes only on an
26
- end the projection draws.
26
+ end the projection draws. `scale` widens the stroke (see
27
+ `emphasizedArrowEdge`).
27
28
  */
28
- export declare function flowArrowEdge(viz: VizInstance, link: FlowLink, fill: string | undefined): {
29
+ export declare function flowArrowEdge(viz: VizInstance, link: FlowLink, fill: string | undefined, scale?: number): {
29
30
  d: string;
30
31
  arrows: SceneNode[];
31
32
  };
@@ -2,8 +2,10 @@
2
2
  `applyMatrixLayout` — Matrix's chart-specific layout stage.
3
3
 
4
4
  Two-pass axis layout: measure-only pass for padding, then compute-mode
5
- render that absorbs row/column axis scenes into `_chartScene`. Stashes
6
- `columnScale`/`rowScale`/`cellWidth`/`cellHeight` on `viz.ctx`.
5
+ render that absorbs row/column axis scenes into `_chartScene` as chrome
6
+ (see `inertAxis`), their labels following the hover (see
7
+ `tagHoverTicks`). Stashes `columnScale`/`rowScale`/`cellWidth`/
8
+ `cellHeight` on `viz.ctx`.
7
9
  */
8
10
  import type { TransformStage } from "../pipeline/stages.js";
9
11
  export declare const applyMatrixLayout: TransformStage;
@@ -8,6 +8,16 @@
8
8
  */
9
9
  import type { TransformStage } from "../pipeline/stages.js";
10
10
  import type { SizeLegendScale } from "../../components/SizeLegend/sizeLegendLayout.js";
11
+ import type { GraphNode } from "./graph.js";
12
+ /** Single laid-out node — accreted across the layout's passes. */
13
+ type NetworkNode = GraphNode;
14
+ /**
15
+ Places `lone` (nodes no link pulls on) in rows under `placed`, as far
16
+ apart as the placed nodes typically sit from their nearest neighbor,
17
+ the rows centered beneath them. Without placed nodes the rows form a
18
+ square-ish grid.
19
+ */
20
+ export declare function placeLoneNodes(placed: NetworkNode[], lone: NetworkNode[]): void;
11
21
  /**
12
22
  Network's size-legend scale for a chart area of `width` × `height`: the
13
23
  same node set, positions, and fitted radius scale the layout builds, run
@@ -16,3 +26,4 @@ import type { SizeLegendScale } from "../../components/SizeLegend/sizeLegendLayo
16
26
  */
17
27
  export declare function networkSizeLegendScale(v: Parameters<TransformStage>[0]["viz"], width: number, height: number): SizeLegendScale | null;
18
28
  export declare const applyNetworkLayout: TransformStage;
29
+ export {};
@@ -43,7 +43,8 @@ export declare function bundledTipBack(points: Point[], rSource?: number, rTarge
43
43
  /**
44
44
  A bundled link's visible stroke and arrowheads: the stroke follows the
45
45
  path and ends inside each head, and each head's tip sits a pixel off its
46
- node, aimed along the path (see `polylineArrowEdge`).
46
+ node, aimed along the path (see `polylineArrowEdge`). `arrowSize`
47
+ defaults to the chart's.
47
48
  */
48
49
  export declare function bundledLinkEdge(viz: VizInstance, link: BundledLink & {
49
50
  points: Point[];
@@ -51,6 +52,7 @@ export declare function bundledLinkEdge(viz: VizInstance, link: BundledLink & {
51
52
  datum: DataPoint;
52
53
  i: number;
53
54
  strokeWidth: unknown;
55
+ arrowSize?: unknown;
54
56
  keyPrefix: string;
55
57
  fill?: string;
56
58
  }): {
@@ -43,10 +43,18 @@ export declare const graphLinkEnd: (n: GraphNode) => LinkEnd;
43
43
  /** A node row's id: its `groupBy` id, else its `nodeGroupBy` id at the drawn depth. */
44
44
  export declare function graphNodeId(viz: VizInstance, d: Record<string, unknown>, i: number): string;
45
45
  /**
46
- Resolves the filtered data and `nodes` into node records, in the order the
47
- ids first appear (data rows, then nodes). Only ids present in `nodes`
48
- become nodes; a matching data row supplies a node's values. `fx`/`fy` read
49
- the chart's `x`/`y` accessors when it has them.
46
+ The chart's node rows: `nodes` when set, else one row per data row and
47
+ one per link end no data row stands for (the link's own object, or
48
+ `{id}` for an id), so a chart given only `data` and `links` still draws
49
+ its nodes, linked or not.
50
+ */
51
+ export declare function graphNodeRows(v: VizInstance): DataPoint[];
52
+ /**
53
+ Resolves the filtered data and the node rows (see `graphNodeRows`) into
54
+ node records, in the order the ids first appear (data rows, then nodes).
55
+ Only ids present in the node rows become nodes; a matching data row
56
+ supplies a node's values. `fx`/`fy` read the chart's `x`/`y` accessors
57
+ when it has them.
50
58
  */
51
59
  export declare function resolveGraphNodes(v: VizInstance): GraphNode[];
52
60
  /**
@@ -9,6 +9,8 @@ import type { DataPoint } from "@d3plus/data";
9
9
  import type { TransformStage } from "../pipeline/stages.js";
10
10
  type PackLeaf = Omit<HierarchyCircularNode<DataPoint>, "id"> & {
11
11
  __d3plus__: true;
12
+ /** A group circle's row (see `groupRows.ts`), which its circle carries. */
13
+ groupRow?: DataPoint;
12
14
  i: number;
13
15
  id: string | number;
14
16
  };
@@ -0,0 +1,46 @@
1
+ /**
2
+ Pack group rows: a circle enclosing others stands for a group above the
3
+ drawn leaves, so its scene datum is that group's row (see
4
+ `viz/groupRow.ts`), as Treemap's group headers carry theirs: the group's
5
+ rows merged, stamped with its `groupBy` level. Clicking it zooms into the
6
+ group, its tooltip names it at its own level, `packOpacity` reads it,
7
+ and so does its paint (every `shapeConfig` accessor), so it takes its
8
+ group's color.
9
+
10
+ The outermost circle holds every row. Its level, -1, sits above the first
11
+ `groupBy`, so its group is everything drawn and zooming into it changes
12
+ nothing. It names no one group, so it is painted neutral (`neutralFill`,
13
+ between the chart's background and its ink), and so is every group while
14
+ a colorScale colors the leaves, as Treemap's group headers are, rather
15
+ than take the scale's color for its total. A neutral circle's fill is
16
+ that tone, its default stroke that tone a shade darker (see
17
+ `neutralPaint.ts`), and its other paint reads its nest entry, which holds
18
+ no fields.
19
+
20
+ Each row also keeps its nest entry's `key` and, as `values`, the datums of
21
+ the circles directly inside it, unenumerated: hover walks them to light a
22
+ group's descendants (`recursionCircles`), and they stay out of the row's
23
+ fields.
24
+ */
25
+ import type { HierarchyNode } from "d3-hierarchy";
26
+ import { merge } from "@d3plus/data";
27
+ import type { DataPoint } from "@d3plus/data";
28
+ type Aggs = Parameters<typeof merge>[1];
29
+ /** A packed node, carrying its group row once `attachGroupRows` runs. */
30
+ export type GroupedNode = HierarchyNode<DataPoint> & {
31
+ groupRow?: DataPoint;
32
+ };
33
+ /** What the helpers below read off a packed node. */
34
+ type DatumSource = Pick<GroupedNode, "children" | "data" | "groupRow" | "parent">;
35
+ /** The datum a node's circle carries: its group row, or a leaf's own row. */
36
+ export declare function packDatum(node: DatumSource): DataPoint;
37
+ /**
38
+ Whether a node's circle is painted neutral (see above): the outermost
39
+ always, and a group while the chart has a colorScale.
40
+ */
41
+ export declare function packNeutral(node: DatumSource, colorScale: boolean): boolean;
42
+ /** The datum a node's circle is painted from: a neutral one's nest entry. */
43
+ export declare function packPaintDatum(node: DatumSource, neutral: boolean): DataPoint;
44
+ /** Stamps every node with children with its group row, innermost first. */
45
+ export declare function attachGroupRows(root: GroupedNode, aggs: Aggs): void;
46
+ export {};
@@ -4,7 +4,10 @@
4
4
  Implementation files in this folder:
5
5
  - `applyLayout.ts` — chart-specific `TransformStage`.
6
6
  - `emit.ts` — Circle + label scene nodes from the laid-out data.
7
+ - `nodeNames.ts` — each circle's scene key and accessible name.
7
8
  - `recursionCircles.ts` — descendant-walk helper used by hover handlers.
9
+ - `groupRows.ts` — the group row each enclosing circle carries.
10
+ - `neutralPaint.ts` — the fill and stroke of the neutral circles.
8
11
  */
9
12
  import type { ChartDefinition } from "../definition/ChartDefinition.js";
10
13
  export declare const packDef: ChartDefinition;
@@ -0,0 +1,14 @@
1
+ /**
2
+ The paint of Pack's neutral circles (see `groupRows.ts`): the neutral
3
+ fill, and the stroke the chart's default draws around it, unless a stroke
4
+ of the user's own (`shapeConfig.stroke`, or `shapeConfig.Circle.stroke`)
5
+ paints them instead.
6
+ */
7
+ import type { VizInstance } from "../viz/vizTypes.js";
8
+ /** A neutral circle's fill, and its stroke unless the user set one. */
9
+ export interface NeutralPaint {
10
+ fill: string;
11
+ stroke?: string;
12
+ }
13
+ /** The paint of the chart's neutral circles. */
14
+ export declare function packNeutralPaint(viz: Pick<VizInstance, "schema"> & Partial<Pick<VizInstance, "_select" | "_theme">>): NeutralPaint;
@@ -0,0 +1,23 @@
1
+ /**
2
+ A packed circle's scene key and accessible name. Each group and leaf
3
+ circle is keyed by its path of keys, so a redraw pairs it with itself
4
+ however the circles reorder, and a group circle is named after its own
5
+ group, at its own `groupBy` level; the outermost circle, enclosing every
6
+ group, is named as the chart's total.
7
+ */
8
+ import type { VizInstance } from "../viz/vizTypes.js";
9
+ import type { PackLeaf } from "./applyLayout.js";
10
+ type PackNode = Pick<PackLeaf, "children" | "data" | "depth" | "i" | "leaves" | "parent" | "value">;
11
+ /**
12
+ The circle's scene key: a group's path of keys, and a leaf's its groups'
13
+ keys and then its own id (the key of the one-row group it was nested
14
+ in), so no two circles share one and each keeps its own across redraws.
15
+ */
16
+ export declare function packNodeKey(node: PackNode): string;
17
+ /**
18
+ The circle's accessible name and value: a leaf's label, a group's name at
19
+ its own `groupBy` level (as Treemap names its group headers), or the
20
+ translated "Total" for the root.
21
+ */
22
+ export declare function packNodeLabel(viz: VizInstance, node: PackNode): string;
23
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ ParallelCoordinates chrome: the axes and their titles hold no data and
3
+ stay out of hit-testing, all but the labels with an axis tooltip to show.
4
+ */
5
+ import type { SceneNode } from "@d3plus/render";
6
+ /**
7
+ A copy of an axis's or title's scene as chrome (see `inertAxis`), without
8
+ its data: the pointer passes through it to the lines, and catches only on
9
+ a label stamped with a tooltip target.
10
+ @param node An axis's or title's scene, or a node in it.
11
+ */
12
+ export declare function chromeNode(node: SceneNode): SceneNode;
@@ -6,6 +6,7 @@
6
6
  - `dimensions.ts` — which keys get an axis, their types and domains.
7
7
  - `axes.ts` — one Axis per dimension, laid out with its title.
8
8
  - `titles.ts` — dimension titles (TextBox).
9
+ - `chrome.ts` — axes and titles as chrome, hoverable where a label has a tooltip.
9
10
  - `paths.ts` — each row's crossing points and path.
10
11
  - `applyLayout.ts` — chart-specific `TransformStage`.
11
12
  - `emit.ts` — a path (plus hit path) per row.
@@ -17,5 +17,10 @@ export interface DimensionTitle {
17
17
  export declare function titleWidths(texts: string[], style: Record<string, unknown>, locale?: string): number[];
18
18
  /** The height of the tallest title once each wraps to its `width` (0 when there are none). */
19
19
  export declare function titleHeight(titles: DimensionTitle[], style: Record<string, unknown>, locale?: string): number;
20
- /** The title text nodes. Titles are chrome: no datum, no pointer events. */
21
- export declare function titleNodes(titles: DimensionTitle[], style: Record<string, unknown>, locale?: string): SceneNode[];
20
+ /**
21
+ The title text nodes, as chrome (see `chromeNode`). With `tooltips`, each
22
+ dimension's `titleTooltip` by key, a title with a tooltip to show (the
23
+ option's, or its whole text when it is drawn cut short) takes the
24
+ pointer; without it none does.
25
+ */
26
+ export declare function titleNodes(titles: DimensionTitle[], style: Record<string, unknown>, locale?: string, tooltips?: Map<string, unknown>): SceneNode[];
@@ -0,0 +1,34 @@
1
+ /**
2
+ How areas grow in: every band starts flat on the value axis's baseline
3
+ and rises into place. An unstacked area starts on its own baseline; a
4
+ stack starts on the zero line (or the `baseline`, kept inside the
5
+ domain), so its bands rise together, each riding on the one beneath it.
6
+ Their labels fade in as the bands finish growing, where the bands land.
7
+ */
8
+ import type { EnterWindow, SceneNode } from "@d3plus/render";
9
+ import type { ShapeEmitContext } from "../features/shapeEmit.js";
10
+ /**
11
+ The pixel line, along the value axis, that areas grow out of.
12
+ @param ctx The Plot shape-emit context the areas were drawn with.
13
+ */
14
+ export declare function areaBaseline(ctx: ShapeEmitContext): number | null;
15
+ /**
16
+ The share of an area's enter its labels wait out: they fade in over the
17
+ last part, once the bands have nearly reached the places they name.
18
+ */
19
+ export declare const AREA_LABEL_ENTER: EnterWindow;
20
+ /**
21
+ Holds every text node under `nodes` back until late in its enter (see
22
+ `AREA_LABEL_ENTER`), so a label doesn't show where its band has yet to
23
+ grow.
24
+ @param nodes The label nodes, or the groups holding them.
25
+ */
26
+ export declare function holdAreaLabels<T extends SceneNode>(nodes: T[]): T[];
27
+ /**
28
+ Sets each Area path's `enterD`: its outline flattened onto the baseline
29
+ (see `areaBaseline`), so it grows out of the axis and, on exit, sinks
30
+ back into it. The areas' own labels fade in late (see `holdAreaLabels`).
31
+ @param ctx The Plot shape-emit context the areas were drawn with.
32
+ @param nodes The areas' scene nodes.
33
+ */
34
+ export declare function growAreasFromBaseline(ctx: ShapeEmitContext, nodes: SceneNode[]): void;
@@ -139,11 +139,7 @@ export default class Plot extends Viz {
139
139
  */
140
140
  _zoomRescale(t: ZoomState, duration?: number): boolean;
141
141
  /**
142
- Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc).
143
-
144
- Additionally, each config object can also contain an optional "layer" key, which defines whether the annotations will be displayed in "front" or in "back" of the primary visualization shapes. This value defaults to "back" if not present ("front" for callouts).
145
-
146
- Three more kinds draw chart notes: `"Callout"` anchors wrapped text in a box at each data row's `x`/`y` (in data units, or plot-area fractions with `xRef`/`yRef: "plot"`), offset by `dx`/`dy` pixels and joined to its anchor by a connector ending in an arrowhead or dot (see `CalloutAnnotation`); `"ReferenceLine"` and `"ReferenceBand"` draw what `referenceLines` and `referenceBands` entries expand into. All annotations follow zoom and never respond to the pointer or keyboard.
142
+ Custom shapes drawn as annotations on the plot: a [Shape](http://d3plus.org/docs/#Shape) config object, or an array of them, each with a `shape` key naming the Shape class to use (`"Rect"`, `"Line"`, …) and an optional `layer`, `"back"` (the default) or `"front"`. Three more kinds draw chart notes: `"Callout"` (wrapped text joined to a data point by a connector; see `CalloutAnnotation`), and `"ReferenceLine"` and `"ReferenceBand"` (what `referenceLines` and `referenceBands` expand into).
147
143
  */
148
144
  annotations(_?: unknown): this | unknown[];
149
145
  /**
@@ -151,7 +147,7 @@ export default class Plot extends Viz {
151
147
  */
152
148
  axisPersist(_?: boolean): this | boolean;
153
149
  /**
154
- Starts the value axis (the x axis for horizontal charts) at a value: `baseline(n)` renders exactly like `yDomain([n])` (or `xDomain([n])`). Bars, areas, and stems still grow from the chart's own `0` in the Plots that draw from one (such as BarChart, AreaPlot, Histogram, and Lollipop), so with `baselineBreak` on (their default) the axis breaks back to a `0` tick and bars run through the break, with its gap cut across them, and with it off the axis stretches down to `0`. As with `yDomain([n])`, only `n` is pinned: the far end comes from the data and is rounded where the axis would round it with no domain set (left at the data when the axis config's `rounding` is "none"), and marks for values past `n` stop at the axis's edge. When every value sits at or below `n`, it ends the axis instead, like `yDomain([undefined, n])`. A bound given in `yDomain`/`xDomain` wins. Returns the chart's own baseline when none is set.
150
+ Starts the value axis at a value, like `yDomain([n])` (or `xDomain([n])` for horizontal charts); the far end comes from the data. Bars, areas, and stems still grow from `0`, so with `baselineBreak` on the axis breaks back to a `0` tick. A bound in `yDomain`/`xDomain` wins. Returns the chart's own baseline when none is set.
155
151
  */
156
152
  baseline(_?: number): this | number | undefined;
157
153
  /**
@@ -163,9 +159,7 @@ export default class Plot extends Viz {
163
159
  */
164
160
  buffer(_?: boolean | Record<string, boolean>): this | Record<string, unknown>;
165
161
  /**
166
- The confidence interval as an array of [lower, upper] bounds. Lines draw it as a shaded band; bars draw an error bar per bar, from the lower to the upper bound with a cap at each end (a stacked bar's bounds keep their distance from its value, measured from the bar's stacked end). Either bound may be `false` for a one-sided interval, and a row without a bound pinches the band onto its line. The value axis widens to fit the bounds, and tooltips list them (see `confidenceConfig.tooltip`). Pass `false` to turn the interval off.
167
-
168
- Pass an array of bands, outermost first, to draw nested bands around each line (a fan): each band is a `[lower, upper]` pair or `[lower, upper, label]`, or a `{lower, upper, label}` object, and `confidenceConfig.bandOpacity` shades them from the widest (lightest) to the narrowest (darkest). Tooltips list each band's range under its label ("Band 1", "Band 2", … when unlabeled), and bars draw the first band's error bar.
162
+ The confidence interval as `[lower, upper]` bounds (keys or accessors): lines draw a shaded band, bars an error bar. Either bound may be `false` for a one-sided interval, and the value axis widens to fit. Pass an array of bands, outermost first (`[lower, upper, label]` or `{lower, upper, label}`), to draw nested bands (a fan). `false` turns it off.
169
163
 
170
164
  @example <caption>Can be called with accessor functions or static keys:</caption>
171
165
  var data = {id: "alpha", value: 10, lci: 9, hci: 11};
@@ -181,7 +175,7 @@ export default class Plot extends Viz {
181
175
  */
182
176
  confidence(_?: unknown): this | VizInstance["_confidence"] | ConfidenceBand[];
183
177
  /**
184
- Configuration object for shapes rendered as confidence intervals. A line's band is an Area, filled with the line's color at half opacity. A bar's error bar is a Path styled by `stroke` (default a shade darker than the bar), `strokeWidth` (default `2`), `strokeDasharray`, `strokeOpacity`, and `capWidth`: the length of each end cap, in pixels or as a percentage string of the bar's thickness (default `"50%"`). Keys nested under `Area` or `Bar` apply only to that shape's interval. With several bands, `bandOpacity` sets how each band looks where it is the innermost band drawn: an array ramps from the outermost band to the innermost (default `[0.15, 0.6]`), a number gives every band that opacity, and either replaces `fillOpacity`. `tooltip` (default `true`) lists the bounds in tooltips: a "Lower Bound" and "Upper Bound" row for a single mark, and a range after each series' value in a shared tooltip; set it to `false` to leave them out. Accepted keys: any key the Area or Path shape takes at the top level, plus `bandOpacity`, `capWidth`, `tooltip`, `Area` (Area keys), and `Bar` (Path keys and `capWidth`); any other key logs a warning.
178
+ Styles the confidence intervals: a line's band takes Area keys (filled with the line's color), and a bar's error bar takes Path keys (`stroke`, `strokeWidth`, …) plus `capWidth`, in pixels or a percentage of the bar (default `"50%"`). Keys under `Area` or `Bar` apply to that shape only. `bandOpacity` ramps nested bands' opacity (default `[0.15, 0.6]`), and `tooltip: false` leaves the bounds out of tooltips.
185
179
 
186
180
  @example
187
181
  .confidenceConfig({Bar: {stroke: "#333", capWidth: 8}, tooltip: false})
@@ -0,0 +1,11 @@
1
+ import type { PlotDatum } from "../features/plotPaint.js";
2
+ /**
3
+ A unique scene key for each line marker. A marker is its series and its
4
+ discrete value, or its x/y position when the chart has no discrete axis;
5
+ a series that repeats one of those numbers its repeats, so no two markers
6
+ share a key (the renderer keeps one node per key, which would give every
7
+ marker that shares one the last one's datum).
8
+ @param values The markers' points.
9
+ @param discrete The chart's discrete axis, if any.
10
+ */
11
+ export declare function lineMarkerKeys(values: PlotDatum[], discrete: unknown): Map<PlotDatum, string>;
@@ -0,0 +1,19 @@
1
+ import type { SceneNode } from "@d3plus/render";
2
+ import type { VizInstance } from "../viz/vizTypes.js";
3
+ /** The shapes whose own labels can name their legend entries. */
4
+ export declare const LEGEND_LABEL_SHAPES: string[];
5
+ /**
6
+ Whether a Plot's shape labels could name every legend entry: it draws
7
+ only Circles, Rects, and Bars, none of them with `label: false`.
8
+ @param viz The chart.
9
+ */
10
+ export declare function shapeLabelsPossible(viz: VizInstance): boolean;
11
+ /**
12
+ Counts a Plot's labelable shapes and the ones whose drawn label matches
13
+ their legend entry's into `viz._alongStats`, when every shape could be
14
+ named that way (see `shapeLabelsPossible`). A label cut short, or a
15
+ legend entry named by its color category, doesn't match.
16
+ @param viz The chart.
17
+ @param nodes The plot's shapes and their labels.
18
+ */
19
+ export declare function countShapeLabels(viz: VizInstance, nodes: SceneNode[]): void;
@@ -37,11 +37,17 @@ export declare const SHARED_MEMBER_LIMIT = 5;
37
37
  User `tooltipConfig` styles apply first; the shared title/rows win.
38
38
  */
39
39
  export declare function renderSharedTooltip(viz: VizInstance, hover: SharedHover, event: SceneEvent): void;
40
+ /**
41
+ The single-mark tooltip's click hint: "Click to Expand" while the chart's
42
+ own `click.shape` handler is installed and a deeper `groupBy` level
43
+ exists for a click to drill into, else none.
44
+ */
45
+ export declare function singleTooltipFooter(viz: VizInstance): string | false;
40
46
  /**
41
47
  The single-mark tooltip (one series, `tooltipShared(false)`, or a
42
48
  side-by-side bar): the default title (the mark's label, unless
43
49
  `tooltipConfig` sets one), its x and y values, its `confidence` bounds,
44
- then any rows the chart's `tooltipConfig` adds, and a threshold bucket's
50
+ its colorScale value, then any rows the chart's `tooltipConfig` adds, and a threshold bucket's
45
51
  series.
46
52
  */
47
53
  export declare function renderSingleTooltip(viz: VizInstance, hover: SharedHover, event: SceneEvent): void;
@@ -5,7 +5,8 @@
5
5
  returns its scale.
6
6
  */
7
7
  import type { DataPoint } from "@d3plus/data";
8
- import type { SceneNode, Transform } from "@d3plus/render";
8
+ import type { Transform } from "@d3plus/render";
9
+ import type { AxisConfig } from "../../utils/D3plusConfig.js";
9
10
  import type { ConfigField } from "../../fluent.js";
10
11
  import type { VizInstance } from "../viz/vizTypes.js";
11
12
  /** A start or end value: a date on a time axis, a number otherwise. */
@@ -26,6 +27,8 @@ export interface TimeAxisLike {
26
27
  schema: {
27
28
  padding: number;
28
29
  orient?: string;
30
+ height: number;
31
+ maxSize?: AxisConfig["maxSize"];
29
32
  };
30
33
  _d3Scale: (v: TimeValue) => number;
31
34
  }
@@ -68,9 +71,9 @@ export interface TimeAxisSize {
68
71
  export declare function measureTimeAxis(viz: VizInstance, frame: Pick<TimeAxisFrame, "domain" | "width" | "height" | "config">): TimeAxisSize;
69
72
  /**
70
73
  Renders the chart's time axis (`viz.ctx.axis`) over `frame`, pushes its
71
- scene onto `viz._chartScene` (with any extra `group` fields), and returns
72
- its scale.
74
+ scene onto `viz._chartScene` as chrome (see `inertAxis`), and returns its
75
+ scale.
73
76
  */
74
- export declare function renderTimeAxis(viz: VizInstance, frame: TimeAxisFrame, group?: Partial<SceneNode>): (v: TimeValue) => number;
77
+ export declare function renderTimeAxis(viz: VizInstance, frame: TimeAxisFrame): (v: TimeValue) => number;
75
78
  /** Reads a row's raw start or end through the chart's accessor. */
76
79
  export declare function rowTime(viz: VizInstance, key: "start" | "end", d: DataPoint, i: number): unknown;
@@ -26,6 +26,12 @@ export interface LabelFont {
26
26
  export declare function labelFont(config: Record<string, unknown>, d: unknown, i: number): LabelFont;
27
27
  /** The gutter's width: the widest label plus its padding on both sides. */
28
28
  export declare function gutterWidth(texts: string[], fonts: LabelFont[], measure?: typeof textWidth): number;
29
+ /**
30
+ The narrowest the gutter shrinks to on a chart too narrow for `width`
31
+ (see `gutterWidth`): room for a few characters of the largest font plus
32
+ its padding on both sides, or `width` itself when that is narrower.
33
+ */
34
+ export declare function gutterMinWidth(width: number, fonts: LabelFont[]): number;
29
35
  /**
30
36
  Which band labels fit: keeps the first label, each next one that clears
31
37
  the last kept one, and always the last label (dropping kept neighbors it
@@ -42,9 +48,23 @@ export interface GutterLabel {
42
48
  width: number;
43
49
  height: number;
44
50
  font: LabelFont;
51
+ /** The label as the category axis's tick: its category and whole text, read for its axis tooltip. */
52
+ data: {
53
+ id: unknown;
54
+ text: string;
55
+ tick: true;
56
+ };
45
57
  }
46
- /** Lays out the gutter labels as scene text nodes. */
47
- export declare function gutterLabelNodes(box: TextBox, labels: GutterLabel[], color: string): SceneNode[];
58
+ /**
59
+ Lays out the gutter labels as scene text nodes, chrome as an axis's are:
60
+ a label takes the pointer only when it has an axis tooltip to show.
61
+ @param box The TextBox that lays the labels out.
62
+ @param labels The labels and their boxes.
63
+ @param color The labels' ink.
64
+ @param tickTooltip The category axis's `tickTooltip`.
65
+ @param rank Each category's place along the category axis (see `tickRank`).
66
+ */
67
+ export declare function gutterLabelNodes(box: TextBox, labels: GutterLabel[], color: string, tickTooltip?: unknown, rank?: (value: unknown) => number): SceneNode[];
48
68
  /** The category axis's label config: its own defaults under the user's `yConfig` labels. */
49
69
  export declare function categoryLabelConfig(viz: VizInstance): Record<string, unknown>;
50
70
  /** How the category axis formats a category. */
@@ -55,7 +75,8 @@ export declare function allCategories(viz: VizInstance): unknown[];
55
75
  export declare const labelHeight: (font: LabelFont) => number;
56
76
  /**
57
77
  The category labels centered in the gutter between `edges` (pixels), one
58
- per band that has room, as scene nodes.
78
+ per band that has room, as scene nodes. Each takes the category axis's
79
+ `tickTooltip`, with the index its tick has on that axis.
59
80
  */
60
81
  export declare function gutterLabels(viz: VizInstance, box: TextBox, edges: [number, number]): SceneNode[];
61
82
  /** Saved category- and value-axis styles the center layout overrides, restored for the left layout. */
@@ -67,10 +88,11 @@ export interface AxisRestore {
67
88
  export declare function captureAxisStyles(viz: VizInstance): AxisRestore;
68
89
  /**
69
90
  The chart's own axis config for a layout: in the center layout, the value
70
- axis breaks around zero to make the gutter (`width` pixels, the axis line
71
- gapped, no break marks or lines) and the category axis draws nothing.
91
+ axis breaks around zero to make the gutter (`width` pixels, shrinking to
92
+ `minWidth` on an axis too short for it; the axis line gapped, no break
93
+ marks or lines) and the category axis draws nothing.
72
94
  */
73
- export declare function gutterAxisDefaults(position: CategoryPosition, inset: number, width: number, userBreak: unknown, restore: AxisRestore): {
95
+ export declare function gutterAxisDefaults(position: CategoryPosition, inset: number, width: number, userBreak: unknown, restore: AxisRestore, minWidth?: number): {
74
96
  x: Record<string, unknown>;
75
97
  y: Record<string, unknown>;
76
98
  };
@@ -60,7 +60,7 @@ export declare function sideTitleBoxes(labels: string[], bounds: {
60
60
  top: number;
61
61
  height: number;
62
62
  }): SideTitle[];
63
- /** Lays out the side titles as scene text nodes. */
63
+ /** Lays out the side titles as scene text nodes, chrome as an axis's are. */
64
64
  export declare function sideTitleNodes(box: TextBox, titles: SideTitle[], config: Record<string, unknown>): SceneNode[];
65
65
  /**
66
66
  Returns a copy of a chart body's `children` with `outlines` added above
@@ -2,9 +2,8 @@
2
2
  `applyRadarLayout` — Radar's chart-specific layout stage. Computes per-
3
3
  axis angular positions and the web radius (sized to the metric labels,
4
4
  see `axisLabels.ts`), the radial value domain + level rings (see
5
- `levels.ts`), per-group polygon vertices, and the per-polygon
6
- `pathConfig` (with event-handler wrappers that translate cursor →
7
- nearest vertex). Emits the chrome (rings, metric labels, spokes, level
5
+ `levels.ts`), per-group polygon vertices, and the polygons'
6
+ `pathConfig`. Emits the chrome (rings, metric labels, spokes, level
8
7
  value labels — see `axisDecorations.ts`) into `_chartScene`, beneath the
9
8
  polygons. Stashes `groupData` + `pathConfig` on `viz.ctx`.
10
9
  */
@@ -37,8 +37,11 @@ export interface RadarAxisConfig {
37
37
  labelConfig?: Record<string, unknown>;
38
38
  } & Record<string, unknown>;
39
39
  }
40
- /** Resolves the font a metric label renders with, the way its TextBox will. */
41
- export declare const labelFont: (viz: Viz, text: string, datum: DataPoint, i: number) => {
40
+ /**
41
+ Resolves the font a metric label renders with, the way its TextBox will:
42
+ from `labelConfig`, else `axisConfig.shapeConfig.labelConfig`.
43
+ */
44
+ export declare const labelFont: (viz: Viz, text: string, datum: DataPoint, i: number, labelConfig?: Record<string, unknown>) => {
42
45
  fontFamily: string;
43
46
  fontSize: number;
44
47
  fontWeight: number | string;
@@ -7,6 +7,7 @@
7
7
  into the band the spoke labels would need.
8
8
  */
9
9
  import type { DataPoint } from "@d3plus/data";
10
+ import type { TextNode } from "@d3plus/render";
10
11
  import { textWrap } from "@d3plus/text";
11
12
  import type { RingLabelFont } from "../features/ringLabelNodes.js";
12
13
  import type { RingLabelFit } from "../features/ringLabels.js";
@@ -21,6 +22,11 @@ export interface RadarCurveInput {
21
22
  data: DataPoint;
22
23
  /** Spoke direction, in radians (clockwise from 3 o'clock). */
23
24
  angle: number;
25
+ /**
26
+ The angle (radians) the label's arc may span, centered on its spoke.
27
+ Defaults to an even share of the circle.
28
+ */
29
+ span?: number;
24
30
  font: RingLabelFont & {
25
31
  fontSize: number;
26
32
  lineHeight?: number;
@@ -79,6 +85,15 @@ export declare function radarAllCurved(labels: RadarCurveInput[], curves: (Radar
79
85
  @param room The room from the center to the area's nearest edge.
80
86
  */
81
87
  export declare function radarCurveLines(labels: RadarCurveInput[], radius: number, room: number): number;
88
+ /**
89
+ Each label's curve at `radius`, on as many lines as the room around the
90
+ web holds (see `radarCurveLines`), or null where it doesn't curve.
91
+ @param viz The chart.
92
+ @param labels The metric labels, in spoke order.
93
+ @param radius The web's radius.
94
+ @param room The room from the center to the area's nearest edge.
95
+ */
96
+ export declare function radarCurvesAt(viz: VizInstance, labels: RadarCurveInput[], radius: number, room: number): (RadarCurve | null)[];
82
97
  /**
83
98
  The web's radius and every metric's curved label when every name fits
84
99
  along the web, which leaves the web the most room: on one line when
@@ -92,3 +107,23 @@ export declare function radarCurvedLayout(viz: VizInstance, labels: RadarCurveIn
92
107
  radius: number;
93
108
  curves: (RadarCurve | null)[];
94
109
  } | null;
110
+ /** A curved label to draw: its key, its row, and its curve. */
111
+ export interface RadarCurveLabel {
112
+ key: string;
113
+ data: DataPoint;
114
+ i: number;
115
+ curve: RadarCurve;
116
+ /** What its lines follow on hover (see `hoverMatch`). */
117
+ hoverMatch?: {
118
+ field: string;
119
+ value: unknown;
120
+ };
121
+ }
122
+ /**
123
+ The text nodes for curved labels, one per line, in `labelConfig`'s font
124
+ and color (the chart's ink by default).
125
+ @param viz The chart.
126
+ @param labels The labels.
127
+ @param labelConfig Their label config.
128
+ */
129
+ export declare function radarCurveNodes(viz: VizInstance, labels: RadarCurveLabel[], labelConfig: Record<string, unknown>): TextNode[];
@@ -1,7 +1,10 @@
1
1
  /**
2
2
  `radarEmit` — Path SceneNodes for each radar polygon, using
3
- `groupData` + `pathConfig` stashed on `viz.ctx`. Emits flat SceneNodes
4
- directly (no transient Shape compute pass).
3
+ `groupData` + `pathConfig` stashed on `viz.ctx`, each followed by its
4
+ background image and a Circle on each of its vertices (see
5
+ `points.ts`), so a later polygon covers an earlier one's dots as it
6
+ covers its fill. The dots, not the polygons, answer the pointer. Emits
7
+ flat SceneNodes directly (no transient Shape compute pass).
5
8
  */
6
9
  import type { ChartEmit } from "../definition/ChartDefinition.js";
7
10
  export declare const radarEmit: ChartEmit;