@d3plus/core 4.3.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/README.md +7406 -3676
  2. package/es/index.js +3 -3
  3. package/es/index.js.map +1 -1
  4. package/es/internal.js +13 -2
  5. package/es/internal.js.map +1 -1
  6. package/es/src/charts/AreaPlot/index.js +1 -2
  7. package/es/src/charts/AreaPlot/index.js.map +1 -1
  8. package/es/src/charts/BarChart/index.js +9 -3
  9. package/es/src/charts/BarChart/index.js.map +1 -1
  10. package/es/src/charts/BoxWhisker/index.js +6 -2
  11. package/es/src/charts/BoxWhisker/index.js.map +1 -1
  12. package/es/src/charts/BumpChart/index.js +1 -2
  13. package/es/src/charts/BumpChart/index.js.map +1 -1
  14. package/es/src/charts/Chord/applyLayout.js +205 -0
  15. package/es/src/charts/Chord/applyLayout.js.map +1 -0
  16. package/es/src/charts/Chord/emit.js +220 -0
  17. package/es/src/charts/Chord/emit.js.map +1 -0
  18. package/es/src/charts/Chord/index.js +249 -0
  19. package/es/src/charts/Chord/index.js.map +1 -0
  20. package/es/src/charts/Geomap/applyLayout.js +17 -10
  21. package/es/src/charts/Geomap/applyLayout.js.map +1 -1
  22. package/es/src/charts/Geomap/basemapTheme.js +78 -0
  23. package/es/src/charts/Geomap/basemapTheme.js.map +1 -0
  24. package/es/src/charts/Geomap/emit.js +18 -9
  25. package/es/src/charts/Geomap/emit.js.map +1 -1
  26. package/es/src/charts/Geomap/index.js +74 -105
  27. package/es/src/charts/Geomap/index.js.map +1 -1
  28. package/es/src/charts/Histogram/binData.js +225 -0
  29. package/es/src/charts/Histogram/binData.js.map +1 -0
  30. package/es/src/charts/Histogram/index.js +271 -0
  31. package/es/src/charts/Histogram/index.js.map +1 -0
  32. package/es/src/charts/LinePlot/index.js +1 -2
  33. package/es/src/charts/LinePlot/index.js.map +1 -1
  34. package/es/src/charts/Matrix/emit.js +6 -0
  35. package/es/src/charts/Matrix/emit.js.map +1 -1
  36. package/es/src/charts/Matrix/index.js +1 -2
  37. package/es/src/charts/Matrix/index.js.map +1 -1
  38. package/es/src/charts/Network/applyLayout.js +52 -4
  39. package/es/src/charts/Network/applyLayout.js.map +1 -1
  40. package/es/src/charts/Network/emit.js +61 -27
  41. package/es/src/charts/Network/emit.js.map +1 -1
  42. package/es/src/charts/Network/index.js +40 -55
  43. package/es/src/charts/Network/index.js.map +1 -1
  44. package/es/src/charts/Pack/emit.js +40 -2
  45. package/es/src/charts/Pack/emit.js.map +1 -1
  46. package/es/src/charts/Pack/index.js +14 -2
  47. package/es/src/charts/Pack/index.js.map +1 -1
  48. package/es/src/charts/Pie/applyLayout.js +20 -2
  49. package/es/src/charts/Pie/applyLayout.js.map +1 -1
  50. package/es/src/charts/Pie/emit.js +277 -32
  51. package/es/src/charts/Pie/emit.js.map +1 -1
  52. package/es/src/charts/Pie/index.js +47 -3
  53. package/es/src/charts/Pie/index.js.map +1 -1
  54. package/es/src/charts/Plot/discreteSpan.js +42 -0
  55. package/es/src/charts/Plot/discreteSpan.js.map +1 -0
  56. package/es/src/charts/Plot/draw.js +3 -1
  57. package/es/src/charts/Plot/draw.js.map +1 -1
  58. package/es/src/charts/Plot/index.js +152 -17
  59. package/es/src/charts/Plot/index.js.map +1 -1
  60. package/es/src/charts/Plot/pipeline.js +48 -22
  61. package/es/src/charts/Plot/pipeline.js.map +1 -1
  62. package/es/src/charts/Plot/pipelineDomains.js +84 -8
  63. package/es/src/charts/Plot/pipelineDomains.js.map +1 -1
  64. package/es/src/charts/Plot/plotZoom.js +278 -0
  65. package/es/src/charts/Plot/plotZoom.js.map +1 -0
  66. package/es/src/charts/Plot/shapeDefaults.js +3 -3
  67. package/es/src/charts/Plot/shapeDefaults.js.map +1 -1
  68. package/es/src/charts/Plot/sharedHover.js +431 -0
  69. package/es/src/charts/Plot/sharedHover.js.map +1 -0
  70. package/es/src/charts/Plot/sharedHoverScene.js +230 -0
  71. package/es/src/charts/Plot/sharedHoverScene.js.map +1 -0
  72. package/es/src/charts/Plot/sharedTooltip.js +163 -0
  73. package/es/src/charts/Plot/sharedTooltip.js.map +1 -0
  74. package/es/src/charts/Plot/stackShareLabels.js +137 -0
  75. package/es/src/charts/Plot/stackShareLabels.js.map +1 -0
  76. package/es/src/charts/Plot/stackShareTooltip.js +31 -0
  77. package/es/src/charts/Plot/stackShareTooltip.js.map +1 -0
  78. package/es/src/charts/Plot/trendLines.js +367 -0
  79. package/es/src/charts/Plot/trendLines.js.map +1 -0
  80. package/es/src/charts/Plot/trendScene.js +220 -0
  81. package/es/src/charts/Plot/trendScene.js.map +1 -0
  82. package/es/src/charts/Plot/trendTooltip.js +160 -0
  83. package/es/src/charts/Plot/trendTooltip.js.map +1 -0
  84. package/es/src/charts/Priestley/emit.js +36 -3
  85. package/es/src/charts/Priestley/emit.js.map +1 -1
  86. package/es/src/charts/Priestley/index.js +1 -2
  87. package/es/src/charts/Priestley/index.js.map +1 -1
  88. package/es/src/charts/Radar/emit.js +4 -1
  89. package/es/src/charts/Radar/emit.js.map +1 -1
  90. package/es/src/charts/Radar/index.js +16 -4
  91. package/es/src/charts/Radar/index.js.map +1 -1
  92. package/es/src/charts/RadialMatrix/emit.js +6 -0
  93. package/es/src/charts/RadialMatrix/emit.js.map +1 -1
  94. package/es/src/charts/RadialMatrix/index.js +18 -3
  95. package/es/src/charts/RadialMatrix/index.js.map +1 -1
  96. package/es/src/charts/Rings/applyLayout.js +72 -116
  97. package/es/src/charts/Rings/applyLayout.js.map +1 -1
  98. package/es/src/charts/Rings/emit.js +75 -10
  99. package/es/src/charts/Rings/emit.js.map +1 -1
  100. package/es/src/charts/Rings/index.js +24 -5
  101. package/es/src/charts/Rings/index.js.map +1 -1
  102. package/es/src/charts/Rings/ringsSizing.js +189 -0
  103. package/es/src/charts/Rings/ringsSizing.js.map +1 -0
  104. package/es/src/charts/Sankey/emit.js +55 -11
  105. package/es/src/charts/Sankey/emit.js.map +1 -1
  106. package/es/src/charts/Sankey/index.js +8 -2
  107. package/es/src/charts/Sankey/index.js.map +1 -1
  108. package/es/src/charts/StackedArea/index.js +9 -3
  109. package/es/src/charts/StackedArea/index.js.map +1 -1
  110. package/es/src/charts/Tree/emit.js +10 -4
  111. package/es/src/charts/Tree/emit.js.map +1 -1
  112. package/es/src/charts/Tree/index.js +6 -5
  113. package/es/src/charts/Tree/index.js.map +1 -1
  114. package/es/src/charts/Treemap/emit.js +56 -3
  115. package/es/src/charts/Treemap/emit.js.map +1 -1
  116. package/es/src/charts/Treemap/index.js +1 -2
  117. package/es/src/charts/Treemap/index.js.map +1 -1
  118. package/es/src/charts/definition/ChartDefinition.js.map +1 -1
  119. package/es/src/charts/definition/makeChart.js +8 -1
  120. package/es/src/charts/definition/makeChart.js.map +1 -1
  121. package/es/src/charts/drawSteps/backControl.js +85 -0
  122. package/es/src/charts/drawSteps/backControl.js.map +1 -0
  123. package/es/src/charts/drawSteps/bottomRightControls.js +193 -0
  124. package/es/src/charts/drawSteps/bottomRightControls.js.map +1 -0
  125. package/es/src/charts/drawSteps/bottomRightControlsMarkup.js +161 -0
  126. package/es/src/charts/drawSteps/bottomRightControlsMarkup.js.map +1 -0
  127. package/es/src/charts/drawSteps/controlButtonStyle.js +108 -0
  128. package/es/src/charts/drawSteps/controlButtonStyle.js.map +1 -0
  129. package/es/src/charts/drawSteps/minimap.js +395 -0
  130. package/es/src/charts/drawSteps/minimap.js.map +1 -0
  131. package/es/src/charts/drawSteps/minimapMarkup.js +147 -0
  132. package/es/src/charts/drawSteps/minimapMarkup.js.map +1 -0
  133. package/es/src/charts/drawSteps/searchControls.js +358 -0
  134. package/es/src/charts/drawSteps/searchControls.js.map +1 -0
  135. package/es/src/charts/drawSteps/searchControlsMarkup.js +430 -0
  136. package/es/src/charts/drawSteps/searchControlsMarkup.js.map +1 -0
  137. package/es/src/charts/drawSteps/tableView.js +173 -0
  138. package/es/src/charts/drawSteps/tableView.js.map +1 -0
  139. package/es/src/charts/drawSteps/tableViewControl.js +39 -0
  140. package/es/src/charts/drawSteps/tableViewControl.js.map +1 -0
  141. package/es/src/charts/drawSteps/tableViewMarkup.js +647 -0
  142. package/es/src/charts/drawSteps/tableViewMarkup.js.map +1 -0
  143. package/es/src/charts/drawSteps/topLeftControls.js +73 -0
  144. package/es/src/charts/drawSteps/topLeftControls.js.map +1 -0
  145. package/es/src/charts/drawSteps/topLeftControlsMarkup.js +227 -0
  146. package/es/src/charts/drawSteps/topLeftControlsMarkup.js.map +1 -0
  147. package/es/src/charts/drawSteps/zoomControls.js +317 -175
  148. package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
  149. package/es/src/charts/drawSteps/zoomControlsMarkup.js +280 -0
  150. package/es/src/charts/drawSteps/zoomControlsMarkup.js.map +1 -0
  151. package/es/src/charts/events/click.shape.js +24 -1
  152. package/es/src/charts/events/click.shape.js.map +1 -1
  153. package/es/src/charts/events/mouseenter.js +3 -0
  154. package/es/src/charts/events/mouseenter.js.map +1 -1
  155. package/es/src/charts/events/mouseleave.js +3 -0
  156. package/es/src/charts/events/mouseleave.js.map +1 -1
  157. package/es/src/charts/events/mousemove.shape.js +2 -0
  158. package/es/src/charts/events/mousemove.shape.js.map +1 -1
  159. package/es/src/charts/features/attributionFeature.js +137 -0
  160. package/es/src/charts/features/attributionFeature.js.map +1 -0
  161. package/es/src/charts/features/axes.js +24 -9
  162. package/es/src/charts/features/axes.js.map +1 -1
  163. package/es/src/charts/features/chartGeometry.js +16 -2
  164. package/es/src/charts/features/chartGeometry.js.map +1 -1
  165. package/es/src/charts/features/edgeArrows.js +155 -0
  166. package/es/src/charts/features/edgeArrows.js.map +1 -0
  167. package/es/src/charts/features/emitHelpers.js +32 -0
  168. package/es/src/charts/features/emitHelpers.js.map +1 -1
  169. package/es/src/charts/features/ensureZoomDom.js +63 -12
  170. package/es/src/charts/features/ensureZoomDom.js.map +1 -1
  171. package/es/src/charts/features/features.js +89 -112
  172. package/es/src/charts/features/features.js.map +1 -1
  173. package/es/src/charts/features/featuresLegend.js +53 -17
  174. package/es/src/charts/features/featuresLegend.js.map +1 -1
  175. package/es/src/charts/features/plotPaint.js +81 -29
  176. package/es/src/charts/features/plotPaint.js.map +1 -1
  177. package/es/src/charts/features/shapeEmit.js +20 -2
  178. package/es/src/charts/features/shapeEmit.js.map +1 -1
  179. package/es/src/charts/features/zoomExtent.js +185 -0
  180. package/es/src/charts/features/zoomExtent.js.map +1 -0
  181. package/es/src/charts/helpers/tileAttributions.js +26 -0
  182. package/es/src/charts/helpers/tileAttributions.js.map +1 -1
  183. package/es/src/charts/index.js +2 -0
  184. package/es/src/charts/index.js.map +1 -1
  185. package/es/src/charts/pipeline/drillMorph.js +159 -0
  186. package/es/src/charts/pipeline/drillMorph.js.map +1 -0
  187. package/es/src/charts/pipeline/runChartDraw.js +35 -1
  188. package/es/src/charts/pipeline/runChartDraw.js.map +1 -1
  189. package/es/src/charts/pipeline/runVizPipeline.js +49 -15
  190. package/es/src/charts/pipeline/runVizPipeline.js.map +1 -1
  191. package/es/src/charts/pipeline/vizDrawPure.js +52 -6
  192. package/es/src/charts/pipeline/vizDrawPure.js.map +1 -1
  193. package/es/src/charts/viz/Viz.js +103 -59
  194. package/es/src/charts/viz/Viz.js.map +1 -1
  195. package/es/src/charts/viz/VizBase.js +186 -5
  196. package/es/src/charts/viz/VizBase.js.map +1 -1
  197. package/es/src/charts/viz/VizBaseConfig.js +41 -3
  198. package/es/src/charts/viz/VizBaseConfig.js.map +1 -1
  199. package/es/src/charts/viz/ordinalColor.js +2 -2
  200. package/es/src/charts/viz/ordinalColor.js.map +1 -1
  201. package/es/src/charts/viz/vizDefaults.js +270 -58
  202. package/es/src/charts/viz/vizDefaults.js.map +1 -1
  203. package/es/src/charts/viz/vizRender.js +54 -4
  204. package/es/src/charts/viz/vizRender.js.map +1 -1
  205. package/es/src/charts/viz/vizTypes.js.map +1 -1
  206. package/es/src/charts/viz/vizVisibility.js +145 -0
  207. package/es/src/charts/viz/vizVisibility.js.map +1 -0
  208. package/es/src/components/Axis/Axis.js +18 -9
  209. package/es/src/components/Axis/Axis.js.map +1 -1
  210. package/es/src/components/Axis/axisLayoutLabels.js +2 -1
  211. package/es/src/components/Axis/axisLayoutLabels.js.map +1 -1
  212. package/es/src/components/Axis/axisRender.js +5 -1
  213. package/es/src/components/Axis/axisRender.js.map +1 -1
  214. package/es/src/components/ColorScale/ColorScale.js +11 -11
  215. package/es/src/components/ColorScale/ColorScale.js.map +1 -1
  216. package/es/src/components/ColorScale/colorScaleScale.js +22 -10
  217. package/es/src/components/ColorScale/colorScaleScale.js.map +1 -1
  218. package/es/src/components/Legend/Legend.js +8 -5
  219. package/es/src/components/Legend/Legend.js.map +1 -1
  220. package/es/src/components/Legend/legendConfig.js +87 -21
  221. package/es/src/components/Legend/legendConfig.js.map +1 -1
  222. package/es/src/components/Legend/legendRender.js +29 -22
  223. package/es/src/components/Legend/legendRender.js.map +1 -1
  224. package/es/src/components/SizeLegend/SizeLegend.js +411 -0
  225. package/es/src/components/SizeLegend/SizeLegend.js.map +1 -0
  226. package/es/src/components/SizeLegend/sizeLegendLayout.js +285 -0
  227. package/es/src/components/SizeLegend/sizeLegendLayout.js.map +1 -0
  228. package/es/src/components/Timeline/timelineConfig.js +8 -4
  229. package/es/src/components/Timeline/timelineConfig.js.map +1 -1
  230. package/es/src/components/Timeline/timelineRender.js +1 -2
  231. package/es/src/components/Timeline/timelineRender.js.map +1 -1
  232. package/es/src/components/Tooltip.js +27 -7
  233. package/es/src/components/Tooltip.js.map +1 -1
  234. package/es/src/components/index.js +1 -0
  235. package/es/src/components/index.js.map +1 -1
  236. package/es/src/shapes/Box.js +4 -2
  237. package/es/src/shapes/Box.js.map +1 -1
  238. package/es/src/shapes/Shape.js +1 -1
  239. package/es/src/shapes/Shape.js.map +1 -1
  240. package/es/src/shapes/Whisker.js +3 -2
  241. package/es/src/shapes/Whisker.js.map +1 -1
  242. package/es/src/shapes/validateShapeConfig.js +141 -0
  243. package/es/src/shapes/validateShapeConfig.js.map +1 -0
  244. package/es/src/utils/BaseClass.js +134 -4
  245. package/es/src/utils/BaseClass.js.map +1 -1
  246. package/es/src/utils/D3plusConfig.js.map +1 -1
  247. package/es/src/utils/configDefault.js +17 -0
  248. package/es/src/utils/configDefault.js.map +1 -0
  249. package/es/src/utils/configPrep.js +2 -1
  250. package/es/src/utils/configPrep.js.map +1 -1
  251. package/es/src/utils/configWarnings.js +37 -0
  252. package/es/src/utils/configWarnings.js.map +1 -0
  253. package/es/src/utils/index.js +1 -0
  254. package/es/src/utils/index.js.map +1 -1
  255. package/package.json +13 -11
  256. package/types/index.d.ts +4 -4
  257. package/types/internal.d.ts +16 -2
  258. package/types/src/charts/BarChart/index.d.ts +2 -1
  259. package/types/src/charts/Chord/applyLayout.d.ts +43 -0
  260. package/types/src/charts/Chord/emit.d.ts +10 -0
  261. package/types/src/charts/Chord/index.d.ts +19 -0
  262. package/types/src/charts/Geomap/applyLayout.d.ts +9 -1
  263. package/types/src/charts/Geomap/basemapTheme.d.ts +35 -0
  264. package/types/src/charts/Histogram/binData.d.ts +37 -0
  265. package/types/src/charts/Histogram/index.d.ts +14 -0
  266. package/types/src/charts/Network/applyLayout.d.ts +8 -0
  267. package/types/src/charts/Plot/discreteSpan.d.ts +9 -0
  268. package/types/src/charts/Plot/index.d.ts +51 -3
  269. package/types/src/charts/Plot/pipeline.d.ts +14 -0
  270. package/types/src/charts/Plot/plotZoom.d.ts +65 -0
  271. package/types/src/charts/Plot/sharedHover.d.ts +79 -0
  272. package/types/src/charts/Plot/sharedHoverScene.d.ts +11 -0
  273. package/types/src/charts/Plot/sharedTooltip.d.ts +26 -0
  274. package/types/src/charts/Plot/stackShareLabels.d.ts +21 -0
  275. package/types/src/charts/Plot/stackShareTooltip.d.ts +9 -0
  276. package/types/src/charts/Plot/trendLines.d.ts +70 -0
  277. package/types/src/charts/Plot/trendScene.d.ts +18 -0
  278. package/types/src/charts/Plot/trendTooltip.d.ts +19 -0
  279. package/types/src/charts/Rings/applyLayout.d.ts +9 -0
  280. package/types/src/charts/Rings/ringsSizing.d.ts +49 -0
  281. package/types/src/charts/StackedArea/index.d.ts +2 -1
  282. package/types/src/charts/definition/ChartDefinition.d.ts +33 -1
  283. package/types/src/charts/definition/makeChart.d.ts +2 -1
  284. package/types/src/charts/drawSteps/backControl.d.ts +29 -0
  285. package/types/src/charts/drawSteps/bottomRightControls.d.ts +26 -0
  286. package/types/src/charts/drawSteps/bottomRightControlsMarkup.d.ts +108 -0
  287. package/types/src/charts/drawSteps/controlButtonStyle.d.ts +45 -0
  288. package/types/src/charts/drawSteps/minimap.d.ts +19 -0
  289. package/types/src/charts/drawSteps/minimapMarkup.d.ts +45 -0
  290. package/types/src/charts/drawSteps/searchControls.d.ts +3 -0
  291. package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +111 -0
  292. package/types/src/charts/drawSteps/tableView.d.ts +23 -0
  293. package/types/src/charts/drawSteps/tableViewControl.d.ts +21 -0
  294. package/types/src/charts/drawSteps/tableViewMarkup.d.ts +119 -0
  295. package/types/src/charts/drawSteps/topLeftControls.d.ts +32 -0
  296. package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +72 -0
  297. package/types/src/charts/drawSteps/zoomControls.d.ts +48 -8
  298. package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +138 -0
  299. package/types/src/charts/features/attributionFeature.d.ts +21 -0
  300. package/types/src/charts/features/axes.d.ts +1 -1
  301. package/types/src/charts/features/chartGeometry.d.ts +9 -3
  302. package/types/src/charts/features/edgeArrows.d.ts +92 -0
  303. package/types/src/charts/features/emitHelpers.d.ts +19 -0
  304. package/types/src/charts/features/ensureZoomDom.d.ts +6 -2
  305. package/types/src/charts/features/features.d.ts +32 -17
  306. package/types/src/charts/features/featuresLegend.d.ts +15 -0
  307. package/types/src/charts/features/plotPaint.d.ts +40 -2
  308. package/types/src/charts/features/zoomExtent.d.ts +25 -0
  309. package/types/src/charts/index.d.ts +2 -0
  310. package/types/src/charts/pipeline/drillMorph.d.ts +29 -0
  311. package/types/src/charts/pipeline/runVizPipeline.d.ts +14 -3
  312. package/types/src/charts/viz/Viz.d.ts +18 -1
  313. package/types/src/charts/viz/VizBase.d.ts +99 -4
  314. package/types/src/charts/viz/VizBaseConfig.d.ts +25 -3
  315. package/types/src/charts/viz/vizDefaults.d.ts +155 -0
  316. package/types/src/charts/viz/vizTypes.d.ts +204 -4
  317. package/types/src/charts/viz/vizVisibility.d.ts +34 -0
  318. package/types/src/components/Axis/Axis.d.ts +2 -0
  319. package/types/src/components/Legend/legendRender.d.ts +8 -2
  320. package/types/src/components/SizeLegend/SizeLegend.d.ts +107 -0
  321. package/types/src/components/SizeLegend/sizeLegendLayout.d.ts +101 -0
  322. package/types/src/components/Tooltip.d.ts +18 -3
  323. package/types/src/components/index.d.ts +1 -0
  324. package/types/src/shapes/validateShapeConfig.d.ts +10 -0
  325. package/types/src/utils/BaseClass.d.ts +15 -1
  326. package/types/src/utils/D3plusConfig.d.ts +200 -8
  327. package/types/src/utils/configDefault.d.ts +11 -0
  328. package/types/src/utils/configWarnings.d.ts +28 -0
  329. package/types/src/utils/index.d.ts +2 -1
  330. package/umd/d3plus-core.full.js +44507 -35766
  331. package/umd/d3plus-core.full.js.map +1 -1
  332. package/umd/d3plus-core.full.min.js +7073 -4410
  333. package/umd/d3plus-core.js +16718 -9634
  334. package/umd/d3plus-core.js.map +1 -1
  335. package/umd/d3plus-core.min.js +4615 -2322
@@ -0,0 +1,101 @@
1
+ /** A continuous radius scale — the subset of a d3 scale the legend reads. */
2
+ export interface SizeLegendScale {
3
+ (value: number): number;
4
+ domain(): number[];
5
+ invert?(radius: number): number;
6
+ }
7
+ /** A chart's size legend as measured, and the chart area it would share, for the `sizeLegend` visibility check. */
8
+ export interface SizeLegendSize {
9
+ width: number;
10
+ height: number;
11
+ availableWidth: number;
12
+ availableHeight: number;
13
+ }
14
+ /**
15
+ The default `sizeLegend` rule: show the legend (marks are sized by more
16
+ than one value, or there'd be nothing to measure) unless it would take up
17
+ more than a third of the chart's width or height.
18
+ */
19
+ export declare function sizeLegendFits(_config: unknown, _scale: SizeLegendScale, size: SizeLegendSize): boolean;
20
+ /** Values to show: explicit numbers, a count of auto-picked values, or a picker. */
21
+ export type SizeLegendValues = number[] | number | ((domain: [number, number]) => number[]);
22
+ export interface SizeLegendLayoutInput {
23
+ scale: SizeLegendScale;
24
+ values?: SizeLegendValues;
25
+ tickFormat: (value: number) => string;
26
+ fontFamily: string;
27
+ fontSize: number;
28
+ title?: string;
29
+ titleFontFamily: string;
30
+ titleFontSize: number;
31
+ titleFontWeight: number | string;
32
+ /** Gap between the widest circle's right edge and the leader-line end. */
33
+ lineLength: number;
34
+ /** Gap between the leader-line end and its label. */
35
+ labelPadding: number;
36
+ /** Padding around the whole legend. */
37
+ padding: number;
38
+ /** Drop any value whose circle would be larger than this radius. */
39
+ maxRadius?: number;
40
+ }
41
+ export interface SizeLegendCircle {
42
+ value: number;
43
+ cx: number;
44
+ cy: number;
45
+ r: number;
46
+ }
47
+ export interface SizeLegendLine {
48
+ value: number;
49
+ points: [number, number][];
50
+ }
51
+ export interface SizeLegendLabel {
52
+ value: number;
53
+ text: string;
54
+ /** The label's left edge. */
55
+ x: number;
56
+ /** Vertical center of the label. */
57
+ y: number;
58
+ width: number;
59
+ }
60
+ export interface SizeLegendLayout {
61
+ circles: SizeLegendCircle[];
62
+ lines: SizeLegendLine[];
63
+ labels: SizeLegendLabel[];
64
+ /** The title, centered on `x`, with `y` its baseline. */
65
+ title?: {
66
+ text: string;
67
+ x: number;
68
+ y: number;
69
+ width: number;
70
+ };
71
+ width: number;
72
+ height: number;
73
+ }
74
+ /** A layout with nothing to draw. */
75
+ export declare const emptySizeLegendLayout: () => SizeLegendLayout;
76
+ /**
77
+ The default values for a domain: its min and max (the real extremes, so
78
+ the outer and inner circles match the chart's largest and smallest marks)
79
+ plus, between them, the roundest number near each evenly spaced target —
80
+ among the candidates within 15% of the range of a target, the one with
81
+ the fewest significant digits, then the closest.
82
+ */
83
+ export declare function defaultSizeLegendValues(domain: [number, number], count?: number): number[];
84
+ /**
85
+ Lays out the legend: circles sharing a bottom edge, a leader line from
86
+ each circle's top to its label in a column on the right (labels are
87
+ pushed apart so they never overlap), and the title centered over the
88
+ circles. Returns an empty layout when the scale's domain is a single
89
+ value (nothing to compare) or every value maps to a zero radius.
90
+ */
91
+ export declare function computeSizeLegend(input: SizeLegendLayoutInput): SizeLegendLayout;
92
+ /**
93
+ The legend scale for marks drawn under a zoom of `k`: on screen, each
94
+ mark's radius is `k` times its layout radius, so the circles for a value
95
+ grow by `k` too. To keep the legend inside the space reserved for its
96
+ unzoomed circles, the domain's top shrinks to the value whose zoomed
97
+ circle fits in the unzoomed largest one's space (rounded down to a nice
98
+ number) — the legend relabels rather than grows. Scales without
99
+ `invert` keep their domain.
100
+ */
101
+ export declare function zoomSizeLegendScale(scale: SizeLegendScale, k: number): SizeLegendScale;
@@ -110,8 +110,23 @@ export default class Tooltip extends BaseClass {
110
110
  trStyle(): Record<string, unknown>;
111
111
  trStyle(_: Record<string, unknown>): this;
112
112
  /**
113
- An object with CSS keys and values to be applied to all <td> elements inside of each <tr>.
113
+ An object with CSS keys and values to be applied to all <td> elements inside of each <tr>. Values may be `(d, i)` functions, where `i` is the cell's column index.
114
+
115
+ @example <caption>default styles</caption>
116
+ {
117
+ "text-align": (d, i) => i ? "right" : "left"
118
+ }
119
+ */
120
+ tdStyle(): Record<string, unknown>;
121
+ tdStyle(_: Record<string, unknown>): this;
122
+ /**
123
+ An object with CSS keys and values to be applied to all <th> elements inside of the <thead>. Values may be `(d, i)` functions, where `i` is the cell's column index.
124
+
125
+ @example <caption>default styles</caption>
126
+ {
127
+ "text-align": (d, i) => i ? "right" : "left"
128
+ }
114
129
  */
115
- tdStyle(): Record<string, string>;
116
- tdStyle(_: Record<string, string>): this;
130
+ thStyle(): Record<string, unknown>;
131
+ thStyle(_: Record<string, unknown>): this;
117
132
  }
@@ -5,6 +5,7 @@ export { default as AxisRight } from "./Axis/AxisRight.js";
5
5
  export { default as AxisTop } from "./Axis/AxisTop.js";
6
6
  export { default as ColorScale } from "./ColorScale/ColorScale.js";
7
7
  export { default as Legend } from "./Legend/Legend.js";
8
+ export { default as SizeLegend } from "./SizeLegend/SizeLegend.js";
8
9
  export { default as Message } from "./Message.js";
9
10
  export { default as TextBox } from "./TextBox.js";
10
11
  export { default as Timeline } from "./Timeline/Timeline.js";
@@ -0,0 +1,10 @@
1
+ /**
2
+ Warns about `shapeConfig` keys that no shape supports. A top-level key is
3
+ valid if any shape class has it (the config is shared by every shape type);
4
+ a key nested under a shape name (like `{Rect: {…}}`) must exist on that
5
+ shape.
6
+ @param owner The class name of the chart receiving the config.
7
+ @param config The user-supplied `shapeConfig` object.
8
+ @private
9
+ */
10
+ export default function validateShapeConfig(owner: string, config: Record<string, unknown>): void;
@@ -1,4 +1,5 @@
1
- import type { D3plusConfig } from "./D3plusConfig.js";
1
+ import { type ColorDefaults } from "@d3plus/color";
2
+ import type { ColorDefaultsConfig, D3plusConfig } from "./D3plusConfig.js";
2
3
  /**
3
4
  Provides shared configuration, event handling, and locale management inherited by all d3plus classes.
4
5
  */
@@ -43,6 +44,19 @@ export default class BaseClass {
43
44
  */
44
45
  locale(): string;
45
46
  locale(_: string | object): this;
47
+ /**
48
+ Overrides the default colors used when assigning fills from data and choosing legible text colors: `dark` and `light` (the text colors picked for contrast against a background), `missing` (null/undefined values), `on`/`off` (`true`/`false` values), `sequential` (the anchor hue for magnitude ramps), and `scale` (the categorical palette, given as a d3 ordinal scale or an array of colors). Keys are merged into the current defaults, and a Viz passes its overrides down to the shapes and components it draws.
49
+
50
+ @example
51
+ new Treemap()
52
+ .colorDefaults({
53
+ dark: "#222",
54
+ light: "#fff",
55
+ scale: ["#1b9e77", "#d95f02", "#7570b3"]
56
+ })
57
+ */
58
+ colorDefaults(): ColorDefaults;
59
+ colorDefaults(_: ColorDefaultsConfig): this;
46
60
  /**
47
61
  Event listener for the specified event *typenames*. Mirrors the core [d3-selection](https://github.com/d3/d3-selection#selection_on) behavior.
48
62
 
@@ -1,6 +1,9 @@
1
+ import type { ColorDefaults } from "@d3plus/color";
1
2
  import type { DataPoint } from "@d3plus/data";
2
3
  import type VizBase from "../charts/viz/VizBase.js";
3
4
  import type { AccessorFn } from "./AccessorFn.js";
5
+ import type { SizeLegendLineConfig, SizeLegendShapeConfig, SizeLegendTextConfig } from "../components/SizeLegend/SizeLegend.js";
6
+ import type { SizeLegendScale, SizeLegendSize } from "../components/SizeLegend/sizeLegendLayout.js";
4
7
  type Position = "top" | "right" | "bottom" | "left";
5
8
  type DataPointAccessor<T> = string | ((d: DataPoint) => T);
6
9
  /** A config value that is either a constant or a `(datum, index)` accessor. */
@@ -17,6 +20,12 @@ export interface AxisConfig {
17
20
  /** Visible tick labels of the axis. */
18
21
  labels?: unknown[];
19
22
  labelOffset?: false | number;
23
+ /**
24
+ Exact size of the space that contains the axis tick labels and title.
25
+ Labels that need more room overflow outward instead of moving the axis
26
+ line; zooming pins a rescaled axis this way so it doesn't shift.
27
+ */
28
+ fixedSize?: number;
20
29
  /** Maximum size allowed for the space that contains the axis tick labels and title. */
21
30
  maxSize?: number;
22
31
  /** Minimum size alloted for the space that contains the axis tick labels and title. */
@@ -32,6 +41,13 @@ export interface AxisConfig {
32
41
  tickFormat?: (d: number | string) => string | number;
33
42
  /** Tick values of the axis. */
34
43
  ticks?: unknown[];
44
+ /**
45
+ Whether the domain's min and max are always shown as ticks, even when
46
+ they aren't among the scale's own "nice" tick values (the nearest nice
47
+ tick is dropped when it would crowd them). Defaults to `true`; zooming
48
+ turns it off so a rescaled axis shows only nice values.
49
+ */
50
+ domainTicks?: boolean;
35
51
  tickSize?: number;
36
52
  /**
37
53
  Defines a custom locale object to be used in time scales. Must include
@@ -170,6 +186,53 @@ export interface LegendConfig {
170
186
  /** The shape type used for each legend entry. */
171
187
  shape?: Accessor<string>;
172
188
  }
189
+ export interface SizeLegendConfig {
190
+ /**
191
+ The values to draw circles for: an array of values, how many to pick
192
+ from the size domain (default 3: its min, max, and a round middle), or
193
+ a function receiving the `[min, max]` domain and returning values.
194
+ */
195
+ values?: number[] | number | ((domain: [number, number]) => number[]);
196
+ /** Formats each value's label. Defaults to the locale's abbreviated number format. */
197
+ tickFormat?: (value: number) => string;
198
+ /** Title above the circles. Defaults to the `size` key when `size` is set to a string. */
199
+ title?: string;
200
+ /** Circle paint: `fill`, `fillOpacity`, `stroke`, `strokeWidth`, `strokeOpacity`. */
201
+ shapeConfig?: SizeLegendShapeConfig;
202
+ /** Leader-line paint: `stroke`, `strokeWidth`, `strokeOpacity`, `strokeDasharray`. */
203
+ lineConfig?: SizeLegendLineConfig;
204
+ /** Value-label font: `fontColor`, `fontFamily`, `fontSize`. */
205
+ labelConfig?: SizeLegendTextConfig;
206
+ /** Title font: `fontColor`, `fontFamily`, `fontSize`, `fontWeight`. */
207
+ titleConfig?: SizeLegendTextConfig;
208
+ padding?: number;
209
+ /** Length of the leader lines past the largest circle, in pixels. */
210
+ lineLength?: number;
211
+ /** Gap between each leader line and its label, in pixels. */
212
+ labelPadding?: number;
213
+ }
214
+ export interface TrendLineConfig {
215
+ /** `"series"` (default) fits one line per series, colored to match it; `"all"` fits one line to every point. Stacked charts always fit the stack totals. */
216
+ group?: "series" | "all";
217
+ /** The polynomial degree when `trendLine` is `"polynomial"`. Defaults to 2. */
218
+ order?: number;
219
+ /** Draws a confidence band around a linear fit. Defaults to `false`. */
220
+ confidence?: boolean;
221
+ /** The confidence band's level, between 0 and 1. Defaults to 0.95. */
222
+ confidenceLevel?: number;
223
+ /** Area shape config for the confidence band. Its fill defaults to the line color. */
224
+ confidenceConfig?: Record<string, unknown>;
225
+ /** Shows the fitted equation, R², and observations when hovering a line. Defaults to `true`. */
226
+ tooltip?: boolean;
227
+ /** Line color. Defaults to the series color (dark gray when `group` is `"all"`). */
228
+ stroke?: string;
229
+ /** Line width in pixels. Defaults to 2. */
230
+ strokeWidth?: number;
231
+ /** Line dash pattern. Defaults to `"6 4"`. */
232
+ strokeDasharray?: string;
233
+ /** Other Line shape config. */
234
+ [key: string]: unknown;
235
+ }
173
236
  export interface ColorScaleConfig {
174
237
  /**
175
238
  For a linear scale, the `[min, max]` values used by the color scale; values
@@ -185,6 +248,10 @@ export interface ColorScaleConfig {
185
248
  /** Given a bucket's minimum and maximum values, returns the full label. */
186
249
  bucketJoiner?: (min: string, max: string) => string;
187
250
  }
251
+ /** `colorDefaults` input: any subset of the color defaults, with `scale` also accepting an array of colors. */
252
+ export type ColorDefaultsConfig = Partial<Omit<ColorDefaults, "scale">> & {
253
+ scale?: ColorDefaults["scale"] | string[];
254
+ };
188
255
  export interface D3plusConfig {
189
256
  /** Data array or URL string to load data from. */
190
257
  data?: DataPoint[] | string;
@@ -198,12 +265,36 @@ export interface D3plusConfig {
198
265
  };
199
266
  /** Hides the SVG from assistive technology when true (`aria-hidden`). */
200
267
  ariaHidden?: boolean;
268
+ /**
269
+ Text (rendered as HTML — any valid HTML string works, including anchor
270
+ links) shown in the chart's bottom-right corner, most often a map tile
271
+ credit. `false` (the default) shows nothing. A credit wider than half
272
+ the chart area collapses to a small "ⓘ" badge that expands on hover,
273
+ focus, or click.
274
+ */
275
+ attribution?: string | boolean;
276
+ /**
277
+ Overrides the "ⓘ" badge a long attribution collapses to, which
278
+ otherwise renders as an inline SVG. A string is used as the badge's
279
+ raw HTML content; a mount function, `(el: HTMLElement) => void | (() =>
280
+ void)`, is called once with the badge's reserved element so a live
281
+ component (a React tree via `createRoot(el).render(...)`, or anything
282
+ else imperative) can be mounted into it — return a cleanup function if
283
+ there's teardown to do.
284
+ */
285
+ attributionIcon?: string | ((el: HTMLElement) => void | (() => void));
286
+ /** CSS key/value pairs used to style the attribution text. */
287
+ attributionStyle?: Record<string, unknown>;
288
+ /** Additional CSS class name(s) applied to the back button, alongside the fixed `back-control` class. */
289
+ backControlClassName?: string;
201
290
  /** Padding between bars in pixels. */
202
291
  barPadding?: number;
203
292
  /** The baseline for the x/y plot. */
204
293
  baseline?: number;
205
294
  /** Whether to cache the processed data between renders. */
206
295
  cache?: boolean;
296
+ /** Overrides for the default colors used for data fills and legible text (see `colorDefaults` in @d3plus/color). */
297
+ colorDefaults?: ColorDefaultsConfig;
207
298
  /** Treat a discrete color field as ordered: color it with a single-hue light→dark ramp instead of nominal categorical hues. */
208
299
  colorOrdinal?: boolean;
209
300
  /** Color scale key or custom color function. */
@@ -233,6 +324,11 @@ export interface D3plusConfig {
233
324
  string | ((d: DataPoint, i: number) => number),
234
325
  string | ((d: DataPoint, i: number) => number)
235
326
  ] | false;
327
+ /**
328
+ Paint for the shared tooltip's crosshair guide line (`stroke`,
329
+ `strokeWidth`, `strokeDasharray`, `strokeOpacity`, …).
330
+ */
331
+ crosshairConfig?: Record<string, unknown>;
236
332
  /** Maximum number of data points to render before downsampling. */
237
333
  dataCutoff?: number;
238
334
  /** Active depth level for nested groupings. */
@@ -291,10 +387,21 @@ export interface D3plusConfig {
291
387
  loadingHTML?: string | ((viz: VizBase) => string);
292
388
  /** Metric key for the visualization. */
293
389
  metric?: string;
390
+ /** Shows a small overview + draggable-viewport minimap underneath the zoom controls once the chart is zoomed in. On by default whenever `zoom` is enabled. */
391
+ minimap?: boolean;
392
+ /** Additional CSS class name(s) applied to the minimap, alongside its fixed `d3plus-minimap`/etc. classes. */
393
+ minimapClassName?: string;
294
394
  /** Custom HTML content shown when no data is supplied, or a function receiving the viz instance. */
295
395
  noDataHTML?: string | ((viz: VizBase) => string);
296
- /** Ocean color for geomaps (any CSS value including 'transparent'). */
297
- ocean?: string;
396
+ /**
397
+ Ocean color for geomaps (any CSS value including 'transparent'), or a
398
+ `{light, dark}` pair chosen by the chart's backdrop. Defaults to the
399
+ default basemap's own water colors.
400
+ */
401
+ ocean?: string | {
402
+ light: string;
403
+ dark: string;
404
+ };
298
405
  /** Event listeners keyed by event name. */
299
406
  on?: Record<string, (event: Event) => void>;
300
407
  /** Coordinate accessor for point-based geomaps. */
@@ -315,6 +422,12 @@ export interface D3plusConfig {
315
422
  row?: string;
316
423
  /** Scrollable container selector for tooltip positioning. */
317
424
  scrollContainer?: string | Window;
425
+ /** Shows a top-left search button that expands into an input; typing highlights shapes whose label matches. On by default for every chart. */
426
+ search?: boolean;
427
+ /** Resolves the string the search box matches its typed term against, for a given datum. Defaults to the mark's resolved on-screen label. */
428
+ searchAccessor?: (d: DataPoint, i: number) => string;
429
+ /** Additional CSS class name(s) applied to the search toggle button and input, alongside the fixed `search-control` classes. */
430
+ searchControlClassName?: string;
318
431
  /** Configuration for shape rendering. */
319
432
  shapeConfig?: {
320
433
  duration?: number;
@@ -329,6 +442,23 @@ export interface D3plusConfig {
329
442
  shapeSort?: (a: string, b: string) => number;
330
443
  /** Size accessor key. */
331
444
  size?: string;
445
+ /**
446
+ Controls size-legend visibility — the nested-circle key drawn in the
447
+ bottom-right corner of charts that size their marks. Shown by default
448
+ whenever marks are sized by more than one value, unless it would take
449
+ up more than a third of the chart's width or height; pass `true` to
450
+ always show it, `false` to hide it, or a `(config, scale, size) =>
451
+ boolean` accessor.
452
+ */
453
+ sizeLegend?: boolean | ((config: D3plusConfig, scale: SizeLegendScale, size: SizeLegendSize) => boolean);
454
+ /** Configuration for the size-legend component. */
455
+ sizeLegendConfig?: SizeLegendConfig;
456
+ /**
457
+ Which margin the size legend claims in the bottom-right corner:
458
+ `"right"` (default) keeps the chart's full height, `"bottom"` its full
459
+ width.
460
+ */
461
+ sizeLegendPosition?: "right" | "bottom";
332
462
  /** Whether to stack series. */
333
463
  stacked?: boolean;
334
464
  /**
@@ -360,12 +490,37 @@ export interface D3plusConfig {
360
490
  svgDesc?: string;
361
491
  /** Accessible title applied to the root SVG (`<title>`). */
362
492
  svgTitle?: string;
493
+ /** Enables the top-left table-view toggle button, which swaps the chart for a static, scrollable `<table>` of its data. On by default for every chart. */
494
+ tableView?: boolean;
495
+ /** Additional CSS class name(s) applied to the `<table>` element rendered while in table view, alongside the fixed `d3plus-table-view-table` class. */
496
+ tableViewClassName?: string;
497
+ /** Additional CSS class name(s) applied to the table-view toggle button, alongside the fixed `table-view-control`/`table-view-toggle` classes. */
498
+ tableViewControlClassName?: string;
499
+ /** CSS key/value pairs styling the table-view toggle button. `false` removes all default styling. */
500
+ tableViewControlStyle?: Record<string, unknown> | false;
501
+ /** CSS key/value pairs styling the table-view toggle button while active (showing the data table). `false` removes all default styling. */
502
+ tableViewControlStyleActive?: Record<string, unknown> | false;
503
+ /** CSS key/value pairs styling the table-view toggle button on hover. `false` removes all default styling. */
504
+ tableViewControlStyleHover?: Record<string, unknown> | false;
505
+ /** Whether the data table shows a "download CSV" button, exporting its full (sorted, unpaginated) rows. On by default. */
506
+ tableViewDownload?: boolean;
507
+ /** Rows per page while in table view. `false` (or any non-positive number) disables pagination and shows every row on one page. */
508
+ tableViewPageSize?: number | false;
509
+ /** Whether the data table's column headers are clickable to sort (toggling asc/desc). On by default. */
510
+ tableViewSort?: boolean;
363
511
  /** Threshold value for grouping small slices. */
364
512
  threshold?: number;
365
513
  /** Label for the threshold group, or a `(datum, index)` accessor. */
366
514
  thresholdName?: string | ((d: DataPoint, i: number) => string);
367
- /** URL to XYZ map tiles. */
368
- tileUrl?: string;
515
+ /**
516
+ URL template for XYZ map tiles, with `{z}`, `{x}`, `{y}` (and optional
517
+ `{s}` subdomain) placeholders — or a `{light, dark}` pair, chosen by the
518
+ chart's backdrop. Defaults to Esri's Light Gray and Dark Gray Canvas.
519
+ */
520
+ tileUrl?: string | {
521
+ light: string;
522
+ dark: string;
523
+ };
369
524
  /** Whether to show map tiles. */
370
525
  tiles?: boolean;
371
526
  /** Time key for temporal data. */
@@ -386,6 +541,26 @@ export interface D3plusConfig {
386
541
  tooltip?: boolean | ((d: DataPoint, i: number) => boolean);
387
542
  /** Configuration for the tooltip component. */
388
543
  tooltipConfig?: TooltipConfig;
544
+ /**
545
+ Whether hovering a Plot's plot area shows one tooltip listing every
546
+ series' value at the nearest discrete-axis position, with a crosshair
547
+ through it. Applies when a discrete axis is set and at least two series
548
+ share that position.
549
+ */
550
+ tooltipShared?: boolean;
551
+ /**
552
+ Draws an automatic trend line fit to the plotted data: `true` (or
553
+ `"linear"`) for a least-squares line, or `"exponential"`,
554
+ `"logarithmic"`, `"power"`, or `"polynomial"`. `false` removes it.
555
+ */
556
+ trendLine?: boolean | "linear" | "exponential" | "logarithmic" | "power" | "polynomial";
557
+ /**
558
+ Options for the trend lines: `group` (`"series"` or `"all"`), the
559
+ polynomial `order`, a `confidence` band with `confidenceLevel` and
560
+ `confidenceConfig`, `tooltip`, and Line styles (`stroke`,
561
+ `strokeWidth`, `strokeDasharray`, …).
562
+ */
563
+ trendLineConfig?: TrendLineConfig;
389
564
  /** Path or object for the topojson data. */
390
565
  topojson?: string | object;
391
566
  /** CSS color to fill the map shapes. */
@@ -422,16 +597,33 @@ export interface D3plusConfig {
422
597
  ySort?: (a: DataPoint, b: DataPoint) => number;
423
598
  /** Defines a custom sorting comparator function for discrete y2 axes. */
424
599
  y2Sort?: (a: DataPoint, b: DataPoint) => number;
425
- /** Set to false to disable zooming on Geomap and Network. */
600
+ /** Enables pan/zoom with zoom-control buttons. On by default for every chart. */
426
601
  zoom?: boolean;
602
+ /** Additional CSS class name(s) applied to each zoom control button, alongside the fixed `zoom-control`/`zoom-in`/etc. classes. */
603
+ zoomControlClassName?: string;
604
+ /**
605
+ Overrides one or more of the four built-in zoom-control icons (`zoomIn`,
606
+ `zoomOut`, `zoomReset`, `zoomBrush`), which otherwise render as inline
607
+ SVGs. Each value is either raw HTML — used as that button's content — or
608
+ a mount function, `(el: HTMLElement) => void | (() => void)`, called
609
+ once with the button's reserved icon slot so a live component (a React
610
+ tree via `createRoot(el).render(...)`, or anything else imperative) can
611
+ be mounted into it — return a cleanup function if there's teardown to do.
612
+ */
613
+ zoomControlIcons?: Partial<Record<"zoomIn" | "zoomOut" | "zoomReset" | "zoomBrush", string | ((el: HTMLElement) => void | (() => void))>>;
427
614
  /** Multiplier applied to programmatic zoom steps. */
428
615
  zoomFactor?: number;
429
- /** Maximum zoom scale factor. */
616
+ /** Maximum zoom scale factor. Defaults to the scale at which the smallest shape fills the chart area. */
430
617
  zoomMax?: number;
431
618
  /** Whether panning (drag) is enabled while zoomed. */
432
619
  zoomPan?: boolean;
433
- /** Whether scroll-wheel zooming is enabled. */
434
- zoomScroll?: boolean;
620
+ /**
621
+ Whether the mouse wheel (and one-finger touch) zooms. `"modifier"` (the
622
+ default) leaves page scrolling alone: only
623
+ Ctrl/⌘ + wheel or a trackpad/two-finger pinch zooms, and one finger pans
624
+ only once zoomed in. `true` zooms on any wheel; `false` never does.
625
+ */
626
+ zoomScroll?: boolean | "modifier";
435
627
  /** Allows additional custom properties. */
436
628
  [key: string]: unknown;
437
629
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ Marks a config function seeded by the library itself, so code that layers
3
+ config can tell it apart from one the user set.
4
+ @private
5
+ */
6
+ export declare function markDefault<T extends object>(value: T): T;
7
+ /**
8
+ Whether a config value is one registered with `markDefault`.
9
+ @private
10
+ */
11
+ export declare function isDefault(value: unknown): boolean;
@@ -0,0 +1,28 @@
1
+ /**
2
+ Toggles the console warnings d3plus logs when a class receives a config
3
+ property it does not support (like a misspelled key passed to `.config()`
4
+ or `shapeConfig`). Warnings are on by default and the setting applies to
5
+ every chart on the page. With no argument, returns the current setting.
6
+
7
+ @example
8
+ import {configWarnings} from "@d3plus/core";
9
+ configWarnings(false);
10
+ */
11
+ export declare function configWarnings(): boolean;
12
+ export declare function configWarnings(_: boolean): void;
13
+ /**
14
+ Marks a config object as shared across several classes, so keys meant for
15
+ other targets (like a `shapeConfig` carrying both `r` and `width`) are
16
+ applied where supported without `BaseClass.config()` warning about the rest.
17
+ @private
18
+ */
19
+ export declare function markSharedConfig<T extends object>(config: T): T;
20
+ /** @private */
21
+ export declare function isSharedConfig(config: unknown): boolean;
22
+ /**
23
+ Warns that `owner` was given a config key it does not support. Each message
24
+ is logged once, so re-renders (and framework wrappers re-applying the same
25
+ config) don't flood the console.
26
+ @private
27
+ */
28
+ export declare function warnUnknownConfig(owner: string, key: string): void;
@@ -1,9 +1,10 @@
1
1
  export type { AccessorFn } from "./AccessorFn.js";
2
2
  export { default as accessor } from "./accessor.js";
3
3
  export { default as BaseClass } from "./BaseClass.js";
4
- export type { D3plusConfig, AxisConfig, ColorScaleConfig, LegendConfig, TextBoxConfig, TimelineConfig, TooltipConfig, } from "./D3plusConfig.js";
4
+ export type { D3plusConfig, AxisConfig, ColorDefaultsConfig, ColorScaleConfig, LegendConfig, SizeLegendConfig, TextBoxConfig, TimelineConfig, TooltipConfig, TrendLineConfig, } from "./D3plusConfig.js";
5
5
  export type { D3Scale } from "./D3Scale.js";
6
6
  export { default as configPrep } from "./configPrep.js";
7
+ export { configWarnings } from "./configWarnings.js";
7
8
  export { default as constant } from "./constant.js";
8
9
  export { default as getProp } from "./getProp.js";
9
10
  export { paintComponentScene } from "./paintComponentScene.js";