@d3plus/core 4.3.0 → 4.5.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 (197) hide show
  1. package/README.md +1820 -714
  2. package/es/index.js +1 -1
  3. package/es/index.js.map +1 -1
  4. package/es/internal.js +7 -1
  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 +1 -2
  9. package/es/src/charts/BarChart/index.js.map +1 -1
  10. package/es/src/charts/BoxWhisker/index.js +1 -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 +168 -0
  17. package/es/src/charts/Chord/emit.js.map +1 -0
  18. package/es/src/charts/Chord/index.js +234 -0
  19. package/es/src/charts/Chord/index.js.map +1 -0
  20. package/es/src/charts/Geomap/basemapTheme.js +78 -0
  21. package/es/src/charts/Geomap/basemapTheme.js.map +1 -0
  22. package/es/src/charts/Geomap/emit.js +18 -9
  23. package/es/src/charts/Geomap/emit.js.map +1 -1
  24. package/es/src/charts/Geomap/index.js +69 -104
  25. package/es/src/charts/Geomap/index.js.map +1 -1
  26. package/es/src/charts/LinePlot/index.js +1 -2
  27. package/es/src/charts/LinePlot/index.js.map +1 -1
  28. package/es/src/charts/Matrix/emit.js +6 -0
  29. package/es/src/charts/Matrix/emit.js.map +1 -1
  30. package/es/src/charts/Matrix/index.js +1 -2
  31. package/es/src/charts/Matrix/index.js.map +1 -1
  32. package/es/src/charts/Network/emit.js +58 -24
  33. package/es/src/charts/Network/emit.js.map +1 -1
  34. package/es/src/charts/Network/index.js +34 -54
  35. package/es/src/charts/Network/index.js.map +1 -1
  36. package/es/src/charts/Pack/emit.js +3 -0
  37. package/es/src/charts/Pack/emit.js.map +1 -1
  38. package/es/src/charts/Pack/index.js +1 -2
  39. package/es/src/charts/Pack/index.js.map +1 -1
  40. package/es/src/charts/Pie/emit.js +6 -2
  41. package/es/src/charts/Pie/emit.js.map +1 -1
  42. package/es/src/charts/Pie/index.js +1 -2
  43. package/es/src/charts/Pie/index.js.map +1 -1
  44. package/es/src/charts/Plot/index.js +26 -6
  45. package/es/src/charts/Plot/index.js.map +1 -1
  46. package/es/src/charts/Plot/pipeline.js +1 -2
  47. package/es/src/charts/Plot/pipeline.js.map +1 -1
  48. package/es/src/charts/Plot/plotZoom.js +278 -0
  49. package/es/src/charts/Plot/plotZoom.js.map +1 -0
  50. package/es/src/charts/Priestley/emit.js +4 -0
  51. package/es/src/charts/Priestley/emit.js.map +1 -1
  52. package/es/src/charts/Priestley/index.js +1 -2
  53. package/es/src/charts/Priestley/index.js.map +1 -1
  54. package/es/src/charts/Radar/emit.js +4 -1
  55. package/es/src/charts/Radar/emit.js.map +1 -1
  56. package/es/src/charts/Radar/index.js +1 -2
  57. package/es/src/charts/Radar/index.js.map +1 -1
  58. package/es/src/charts/RadialMatrix/emit.js +6 -0
  59. package/es/src/charts/RadialMatrix/emit.js.map +1 -1
  60. package/es/src/charts/RadialMatrix/index.js +1 -2
  61. package/es/src/charts/RadialMatrix/index.js.map +1 -1
  62. package/es/src/charts/Rings/emit.js +74 -8
  63. package/es/src/charts/Rings/emit.js.map +1 -1
  64. package/es/src/charts/Rings/index.js +11 -3
  65. package/es/src/charts/Rings/index.js.map +1 -1
  66. package/es/src/charts/Sankey/emit.js +55 -11
  67. package/es/src/charts/Sankey/emit.js.map +1 -1
  68. package/es/src/charts/Sankey/index.js +8 -2
  69. package/es/src/charts/Sankey/index.js.map +1 -1
  70. package/es/src/charts/StackedArea/index.js +1 -2
  71. package/es/src/charts/StackedArea/index.js.map +1 -1
  72. package/es/src/charts/Tree/emit.js +8 -2
  73. package/es/src/charts/Tree/emit.js.map +1 -1
  74. package/es/src/charts/Tree/index.js +1 -2
  75. package/es/src/charts/Tree/index.js.map +1 -1
  76. package/es/src/charts/Treemap/index.js +1 -2
  77. package/es/src/charts/Treemap/index.js.map +1 -1
  78. package/es/src/charts/definition/ChartDefinition.js.map +1 -1
  79. package/es/src/charts/drawSteps/backControl.js +70 -0
  80. package/es/src/charts/drawSteps/backControl.js.map +1 -0
  81. package/es/src/charts/drawSteps/controlButtonStyle.js +108 -0
  82. package/es/src/charts/drawSteps/controlButtonStyle.js.map +1 -0
  83. package/es/src/charts/drawSteps/minimap.js +370 -0
  84. package/es/src/charts/drawSteps/minimap.js.map +1 -0
  85. package/es/src/charts/drawSteps/minimapMarkup.js +147 -0
  86. package/es/src/charts/drawSteps/minimapMarkup.js.map +1 -0
  87. package/es/src/charts/drawSteps/searchControls.js +358 -0
  88. package/es/src/charts/drawSteps/searchControls.js.map +1 -0
  89. package/es/src/charts/drawSteps/searchControlsMarkup.js +430 -0
  90. package/es/src/charts/drawSteps/searchControlsMarkup.js.map +1 -0
  91. package/es/src/charts/drawSteps/tableView.js +173 -0
  92. package/es/src/charts/drawSteps/tableView.js.map +1 -0
  93. package/es/src/charts/drawSteps/tableViewControl.js +39 -0
  94. package/es/src/charts/drawSteps/tableViewControl.js.map +1 -0
  95. package/es/src/charts/drawSteps/tableViewMarkup.js +647 -0
  96. package/es/src/charts/drawSteps/tableViewMarkup.js.map +1 -0
  97. package/es/src/charts/drawSteps/topLeftControls.js +73 -0
  98. package/es/src/charts/drawSteps/topLeftControls.js.map +1 -0
  99. package/es/src/charts/drawSteps/topLeftControlsMarkup.js +227 -0
  100. package/es/src/charts/drawSteps/topLeftControlsMarkup.js.map +1 -0
  101. package/es/src/charts/drawSteps/zoomControls.js +314 -175
  102. package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
  103. package/es/src/charts/drawSteps/zoomControlsMarkup.js +280 -0
  104. package/es/src/charts/drawSteps/zoomControlsMarkup.js.map +1 -0
  105. package/es/src/charts/features/attributionFeature.js +137 -0
  106. package/es/src/charts/features/attributionFeature.js.map +1 -0
  107. package/es/src/charts/features/axes.js +20 -8
  108. package/es/src/charts/features/axes.js.map +1 -1
  109. package/es/src/charts/features/chartGeometry.js +16 -2
  110. package/es/src/charts/features/chartGeometry.js.map +1 -1
  111. package/es/src/charts/features/edgeArrows.js +155 -0
  112. package/es/src/charts/features/edgeArrows.js.map +1 -0
  113. package/es/src/charts/features/emitHelpers.js +8 -0
  114. package/es/src/charts/features/emitHelpers.js.map +1 -1
  115. package/es/src/charts/features/ensureZoomDom.js +63 -12
  116. package/es/src/charts/features/ensureZoomDom.js.map +1 -1
  117. package/es/src/charts/features/features.js +83 -110
  118. package/es/src/charts/features/features.js.map +1 -1
  119. package/es/src/charts/features/featuresLegend.js +45 -17
  120. package/es/src/charts/features/featuresLegend.js.map +1 -1
  121. package/es/src/charts/features/plotPaint.js +32 -7
  122. package/es/src/charts/features/plotPaint.js.map +1 -1
  123. package/es/src/charts/features/zoomExtent.js +185 -0
  124. package/es/src/charts/features/zoomExtent.js.map +1 -0
  125. package/es/src/charts/helpers/tileAttributions.js +26 -0
  126. package/es/src/charts/helpers/tileAttributions.js.map +1 -1
  127. package/es/src/charts/index.js +1 -0
  128. package/es/src/charts/index.js.map +1 -1
  129. package/es/src/charts/pipeline/runVizPipeline.js +33 -14
  130. package/es/src/charts/pipeline/runVizPipeline.js.map +1 -1
  131. package/es/src/charts/pipeline/vizDrawPure.js +32 -6
  132. package/es/src/charts/pipeline/vizDrawPure.js.map +1 -1
  133. package/es/src/charts/viz/Viz.js +39 -51
  134. package/es/src/charts/viz/Viz.js.map +1 -1
  135. package/es/src/charts/viz/VizBase.js +157 -4
  136. package/es/src/charts/viz/VizBase.js.map +1 -1
  137. package/es/src/charts/viz/VizBaseConfig.js +32 -2
  138. package/es/src/charts/viz/VizBaseConfig.js.map +1 -1
  139. package/es/src/charts/viz/vizDefaults.js +243 -50
  140. package/es/src/charts/viz/vizDefaults.js.map +1 -1
  141. package/es/src/charts/viz/vizTypes.js.map +1 -1
  142. package/es/src/components/Axis/Axis.js +10 -1
  143. package/es/src/components/Axis/Axis.js.map +1 -1
  144. package/es/src/components/Axis/axisLayoutLabels.js +2 -1
  145. package/es/src/components/Axis/axisLayoutLabels.js.map +1 -1
  146. package/es/src/components/Axis/axisRender.js +5 -1
  147. package/es/src/components/Axis/axisRender.js.map +1 -1
  148. package/es/src/components/Legend/legendConfig.js +86 -20
  149. package/es/src/components/Legend/legendConfig.js.map +1 -1
  150. package/es/src/utils/D3plusConfig.js.map +1 -1
  151. package/package.json +11 -10
  152. package/types/index.d.ts +1 -1
  153. package/types/internal.d.ts +8 -1
  154. package/types/src/charts/Chord/applyLayout.d.ts +43 -0
  155. package/types/src/charts/Chord/emit.d.ts +10 -0
  156. package/types/src/charts/Chord/index.d.ts +19 -0
  157. package/types/src/charts/Geomap/basemapTheme.d.ts +35 -0
  158. package/types/src/charts/Plot/index.d.ts +12 -3
  159. package/types/src/charts/Plot/plotZoom.d.ts +65 -0
  160. package/types/src/charts/definition/ChartDefinition.d.ts +3 -1
  161. package/types/src/charts/drawSteps/backControl.d.ts +29 -0
  162. package/types/src/charts/drawSteps/controlButtonStyle.d.ts +45 -0
  163. package/types/src/charts/drawSteps/minimap.d.ts +19 -0
  164. package/types/src/charts/drawSteps/minimapMarkup.d.ts +45 -0
  165. package/types/src/charts/drawSteps/searchControls.d.ts +3 -0
  166. package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +111 -0
  167. package/types/src/charts/drawSteps/tableView.d.ts +23 -0
  168. package/types/src/charts/drawSteps/tableViewControl.d.ts +21 -0
  169. package/types/src/charts/drawSteps/tableViewMarkup.d.ts +119 -0
  170. package/types/src/charts/drawSteps/topLeftControls.d.ts +32 -0
  171. package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +72 -0
  172. package/types/src/charts/drawSteps/zoomControls.d.ts +48 -8
  173. package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +138 -0
  174. package/types/src/charts/features/attributionFeature.d.ts +21 -0
  175. package/types/src/charts/features/axes.d.ts +1 -1
  176. package/types/src/charts/features/chartGeometry.d.ts +9 -3
  177. package/types/src/charts/features/edgeArrows.d.ts +92 -0
  178. package/types/src/charts/features/emitHelpers.d.ts +11 -0
  179. package/types/src/charts/features/ensureZoomDom.d.ts +6 -2
  180. package/types/src/charts/features/features.d.ts +32 -17
  181. package/types/src/charts/features/featuresLegend.d.ts +15 -0
  182. package/types/src/charts/features/plotPaint.d.ts +15 -2
  183. package/types/src/charts/features/zoomExtent.d.ts +25 -0
  184. package/types/src/charts/index.d.ts +1 -0
  185. package/types/src/charts/pipeline/runVizPipeline.d.ts +6 -3
  186. package/types/src/charts/viz/VizBase.d.ts +86 -4
  187. package/types/src/charts/viz/VizBaseConfig.d.ts +20 -2
  188. package/types/src/charts/viz/vizDefaults.d.ts +155 -0
  189. package/types/src/charts/viz/vizTypes.d.ts +57 -1
  190. package/types/src/components/Axis/Axis.d.ts +2 -0
  191. package/types/src/utils/D3plusConfig.d.ts +102 -8
  192. package/umd/d3plus-core.full.js +39613 -35374
  193. package/umd/d3plus-core.full.js.map +1 -1
  194. package/umd/d3plus-core.full.min.js +5747 -4361
  195. package/umd/d3plus-core.js +13132 -9289
  196. package/umd/d3plus-core.js.map +1 -1
  197. package/umd/d3plus-core.min.js +3658 -2302
@@ -1,10 +1,11 @@
1
1
  import { select } from "d3-selection";
2
2
  import type { DataPoint } from "@d3plus/data";
3
3
  import type { D3plusConfig } from "../../utils/index.js";
4
+ import type { ZoomControlIcons } from "../drawSteps/zoomControlsMarkup.js";
4
5
  import VizBaseConfig from "./VizBaseConfig.js";
5
6
  /**
6
7
  Second half of the fluent config accessors shared by every Viz chart
7
- (`loadingHTML` through `zoomPadding`), extending `VizBaseConfig` which
8
+ (`loadingHTML` through `tableViewPageSize`), extending `VizBaseConfig` which
8
9
  holds the first half. Split purely so each file stays under the
9
10
  `max-lines` budget; the methods remain real prototype methods, so
10
11
  `BaseClass.config()` reflection and polymorphic `this` chaining are
@@ -27,6 +28,26 @@ export default class VizBase extends VizBaseConfig {
27
28
  Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.
28
29
  */
29
30
  messageStyle(_?: Record<string, unknown>): this | Record<string, unknown>;
31
+ /**
32
+ An additional CSS class name (or space-separated list of class names) applied to the minimap's outer box, viewport box, and zoom-level label, alongside their fixed `d3plus-minimap` / `d3plus-minimap-viewport` / `d3plus-minimap-label` classes. Setting this automatically disables d3plus's built-in inline `minimapStyle`/`minimapViewportStyle`/`minimapViewportStyleActive`/`minimapLabelStyle` defaults (as long as you haven't already customized them yourself), so a host page's own styling applies through the cascade with no other configuration needed.
33
+ */
34
+ minimapClassName(_?: string): this | string;
35
+ /**
36
+ An object containing CSS key/value pairs that is used to style the minimap's zoom-level text label (e.g. "2x"). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.
37
+ */
38
+ minimapLabelStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
39
+ /**
40
+ An object containing CSS key/value pairs that is used to style the minimap's outer box (the full-scene overview). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.
41
+ */
42
+ minimapStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
43
+ /**
44
+ An object containing CSS key/value pairs that is used to style the minimap's draggable viewport box in its resting state. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.
45
+ */
46
+ minimapViewportStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
47
+ /**
48
+ An object containing CSS key/value pairs that is used to style the minimap's draggable viewport box while it's being dragged. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.
49
+ */
50
+ minimapViewportStyleActive(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
30
51
  /**
31
52
  The inner HTML of the status message displayed when no data is supplied to the visualization. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.
32
53
  */
@@ -39,6 +60,35 @@ export default class VizBase extends VizBaseConfig {
39
60
  If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.
40
61
  */
41
62
  scrollContainer(_?: string | HTMLElement | Window): this | string | HTMLElement | Window;
63
+ /**
64
+ Resolves the string the search box matches its typed term against, for
65
+ a given datum. Defaults to the mark's resolved on-screen label
66
+ (`viz._drawLabel`) — the same text the user reads on the chart.
67
+ Override it to match against something else instead, e.g. a data
68
+ field that isn't shown as the label.
69
+
70
+ This is checked alongside, not instead of, every level of the datum's
71
+ own groupBy hierarchy — searching a leaf's label also matches its
72
+ ancestor group's cell/legend entry, and vice versa, regardless of
73
+ this accessor's override.
74
+ */
75
+ searchAccessor(_?: (d: DataPoint, i: number) => string): this | ((d: DataPoint, i: number) => string);
76
+ /**
77
+ An additional CSS class name (or space-separated list of class names) applied to the search toggle button and input, alongside their fixed `search-control` classes. Setting this automatically disables d3plus's built-in inline `searchControlStyle`/`searchControlStyleActive`/`searchControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.
78
+ */
79
+ searchControlClassName(_?: string): this | string;
80
+ /**
81
+ An object containing CSS key/value pairs that is used to style the search toggle button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.searchControlClassName(...)` is set, unless you've explicitly customized this yourself.
82
+ */
83
+ searchControlStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
84
+ /**
85
+ An object containing CSS key/value pairs that is used to style the search toggle button while open. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.searchControlClassName(...)` is set, unless you've explicitly customized this yourself.
86
+ */
87
+ searchControlStyleActive(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
88
+ /**
89
+ An object containing CSS key/value pairs that is used to style the search toggle button on hover. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.searchControlClassName(...)` is set, unless you've explicitly customized this yourself.
90
+ */
91
+ searchControlStyleHover(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
42
92
  /**
43
93
  The SVG container element as a d3 selector or DOM element. Defaults to `undefined`.
44
94
  */
@@ -142,19 +192,51 @@ export default class VizBase extends VizBaseConfig {
142
192
  */
143
193
  zoomBrushSelectionStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
144
194
  /**
145
- An object containing CSS key/value pairs that is used to style each zoom control button (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.
195
+ An additional CSS class name (or space-separated list of class names) applied to each zoom control button, alongside the fixed `zoom-control` / `zoom-in` / `zoom-out` / `zoom-reset` / `zoom-brush` classes. Setting this automatically disables d3plus's built-in inline `zoomControlStyle`/`zoomControlStyleActive`/`zoomControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.
196
+ */
197
+ zoomControlClassName(_?: string): this | string;
198
+ /**
199
+ Overrides one or more of the four built-in zoom-control icons (`zoomIn`, `zoomOut`, `zoomReset`, `zoomBrush`), which otherwise render as inline SVGs. Each value is either an HTML string — used as the button's content in place of the built-in icon — or a mount function, `(el: HTMLElement) => void | (() => void)`, called once with the button's reserved icon slot (a 12x12px element) so you can mount anything imperative into it: a React tree (`createRoot(el).render(<Icon/>)`), a Vue app, a canvas sprite, a brand `<img>`. Return a cleanup function from the mount function if there's teardown to do; it runs right before that slot is discarded — which happens whenever the whole button panel's markup regenerates (a `.locale(...)` change, a `zoomControlClassName` change, or the brush toggle switching), not just once per chart.
200
+ */
201
+ zoomControlIcons(_?: ZoomControlIcons): this | ZoomControlIcons | undefined;
202
+ /**
203
+ An object containing CSS key/value pairs that is used to style each zoom control button (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.
146
204
  */
147
205
  zoomControlStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
148
206
  /**
149
- An object containing CSS key/value pairs that is used to style each zoom control button when active (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.
207
+ An object containing CSS key/value pairs that is used to style each zoom control button when active (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.
150
208
  */
151
209
  zoomControlStyleActive(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
152
210
  /**
153
- An object containing CSS key/value pairs that is used to style each zoom control button on hover (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.
211
+ An object containing CSS key/value pairs that is used to style each zoom control button on hover (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.
154
212
  */
155
213
  zoomControlStyleHover(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
156
214
  /**
157
215
  A pixel value to be used to pad all sides of a zoomed area.
158
216
  */
159
217
  zoomPadding(_?: number): this | number;
218
+ /**
219
+ An additional CSS class name (or space-separated list of class names) applied to the `<table>` element the table-view toggle renders, alongside the fixed `d3plus-table-view-table` class. Lets a host page style the data table with its own table styling (Tailwind, Bootstrap, a design system) via descendant selectors.
220
+ */
221
+ tableViewClassName(_?: string): this | string;
222
+ /**
223
+ An additional CSS class name (or space-separated list of class names) applied to the table-view toggle button, alongside the fixed `table-view-control`/`table-view-toggle` classes. Setting this automatically disables d3plus's built-in inline `tableViewControlStyle`/`tableViewControlStyleActive`/`tableViewControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling applies through the cascade with no other configuration needed.
224
+ */
225
+ tableViewControlClassName(_?: string): this | string;
226
+ /**
227
+ An object containing CSS key/value pairs that is used to style the table-view toggle button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.tableViewControlClassName(...)` is set, unless you've explicitly customized this yourself.
228
+ */
229
+ tableViewControlStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
230
+ /**
231
+ An object containing CSS key/value pairs that is used to style the table-view toggle button while it is active (showing the data table). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.tableViewControlClassName(...)` is set, unless you've explicitly customized this yourself.
232
+ */
233
+ tableViewControlStyleActive(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
234
+ /**
235
+ An object containing CSS key/value pairs that is used to style the table-view toggle button on hover. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.tableViewControlClassName(...)` is set, unless you've explicitly customized this yourself.
236
+ */
237
+ tableViewControlStyleHover(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
238
+ /**
239
+ The number of data-table rows shown per page while in table view. Set to `false` (or any non-positive number) to disable pagination and show every row on one page.
240
+ */
241
+ tableViewPageSize(_?: number | false): this | number | false;
160
242
  }
@@ -22,14 +22,30 @@ export default class VizBaseConfig extends BaseClass {
22
22
  Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).
23
23
  */
24
24
  attribution(_?: string | boolean): this | string | boolean;
25
+ /**
26
+ Overrides the "ⓘ" icon a long attribution collapses to (see `attribution`), which otherwise renders as an inline SVG. Accepts an HTML string — used as the toggle button's content — or a mount function, `(el: HTMLElement) => void | (() => void)`, called once with the button's reserved icon slot so a live component (a React tree via `createRoot(el).render(...)`, or anything else imperative) can be mounted into it. A returned cleanup function runs right before that slot is discarded, which happens whenever the credit's markup regenerates (its text or theme changes), not just once per chart.
27
+ */
28
+ attributionIcon(_?: string | ((el: HTMLElement) => void | (() => void))): this | string | ((el: HTMLElement) => void | (() => void)) | undefined;
25
29
  /**
26
30
  Configuration object for the attribution style.
27
31
  */
28
32
  attributionStyle(_?: Record<string, unknown>): this | Record<string, unknown>;
29
33
  /**
30
- Configuration object for the back button.
34
+ Configuration object for the back button. Superseded by
35
+ `.backControlStyle()`/`.backControlClassName()` for the button's
36
+ appearance (it renders as a real `<button>`, like the zoom/search
37
+ controls, not a configurable text node) — kept for backwards
38
+ compatibility, but no longer affects how the button looks.
31
39
  */
32
40
  backConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
41
+ /**
42
+ An additional CSS class name (or space-separated list of class names) applied to the back button, alongside its fixed `back-control` class. Setting this automatically disables d3plus's built-in inline `backControlStyle` default (as long as you haven't already customized it yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.
43
+ */
44
+ backControlClassName(_?: string): this | string;
45
+ /**
46
+ An object containing CSS key/value pairs that is used to style the back button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.backControlClassName(...)` is set, unless you've explicitly customized this yourself.
47
+ */
48
+ backControlStyle(_?: Record<string, unknown> | false): this | Record<string, unknown> | false;
33
49
  /**
34
50
  Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.
35
51
  */
@@ -127,7 +143,9 @@ export default class VizBaseConfig extends BaseClass {
127
143
  */
128
144
  highlight(_?: ((d: DataPoint, i: number) => boolean) | false): this | ((d: DataPoint, i: number) => boolean) | false | undefined;
129
145
  /**
130
- Accessor function or string key for the label of each data point.
146
+ Accessor function, or a constant string applied to every data point's
147
+ label (unlike `value`/`nodeId`/etc., a string here is not treated as a
148
+ per-datum object key — pass a function for that).
131
149
  */
132
150
  label(_?: string | ((d: DataPoint, i: number) => string)): this | string | ((d: DataPoint, i: number) => string);
133
151
  /**
@@ -1,4 +1,159 @@
1
1
  import type Viz from "./Viz.js";
2
+ /**
3
+ Default inline style for the "← Back" button — structural-only, the
4
+ same properties `zoomControlStyleDefault`/`searchControlStyleDefault`
5
+ use, except `width: "auto"` (it shows an icon + the word "Back", not a
6
+ single centered glyph) with a small `gap` between them and horizontal
7
+ padding for breathing room. Also lighter/smaller than the other two's
8
+ `font` (900 15px): that value is a holdover from when their icons were
9
+ bold Unicode glyphs sized to read clearly (the icons are SVG now, so it
10
+ no longer affects THEM at all) — but back is the one place that font
11
+ actually renders visible text, where 900 15px reads oversized/heavy.
12
+ No background/border/color, same as the other two: a plain
13
+ browser-appearance button, letting native/host-page button chrome show
14
+ through by default.
15
+ @private
16
+ */
17
+ export declare const backControlStyleDefault: {
18
+ "align-items": string;
19
+ display: string;
20
+ font: string;
21
+ gap: string;
22
+ height: string;
23
+ "justify-content": string;
24
+ padding: string;
25
+ width: string;
26
+ };
27
+ export declare const attributionStyleDefault: {
28
+ background: string;
29
+ color: string;
30
+ "border-radius": string;
31
+ display: string;
32
+ "align-items": string;
33
+ gap: string;
34
+ font: string;
35
+ };
36
+ export declare const attributionStyleDarkDefault: {
37
+ background: string;
38
+ color: string;
39
+ "border-radius": string;
40
+ display: string;
41
+ "align-items": string;
42
+ gap: string;
43
+ font: string;
44
+ };
45
+ /**
46
+ Default inline styles for the zoom-control buttons — structural only
47
+ (sizing/spacing/typography); no color, background, border, or opacity.
48
+ Letting native/host-page button chrome show through by default means a
49
+ page styling its own buttons (Tailwind, Bootstrap, a design system) via
50
+ `zoomControlClassName` composes cleanly instead of fighting inline color
51
+ overrides. The active state (brush mode on) paints the OS accent color
52
+ through CSS system colors (`AccentColor`/`AccentColorText`, falling back
53
+ to the selection `Highlight` where unsupported), so it reads as pressed
54
+ in the browser's own idiom; hover gets no default styling (`false`). The
55
+ `.active` class, `aria-pressed`, and `:hover`/`:active` pseudo-classes
56
+ stay available for a host page's own CSS to hook into. Consumers who want d3plus's old
57
+ opinionated look can restore it via `.zoomControlStyle({...})`.
58
+
59
+ Exported as stable object references (not inlined per-instance) so
60
+ `zoomControls.ts` can tell, via `===`, whether a given viz's
61
+ `zoomControlStyle*` is still the untouched default — that's what lets
62
+ setting `zoomControlClassName` auto-disable the defaults without also
63
+ clobbering a style the caller explicitly customized themselves.
64
+ @private
65
+ */
66
+ export declare const zoomControlStyleDefault: {
67
+ "align-items": string;
68
+ display: string;
69
+ font: string;
70
+ height: string;
71
+ "justify-content": string;
72
+ padding: number;
73
+ width: string;
74
+ };
75
+ export declare const zoomControlStyleActiveDefault: {
76
+ "background-color": string;
77
+ "border-color": string;
78
+ color: string;
79
+ };
80
+ export declare const zoomControlStyleHoverDefault: false;
81
+ /**
82
+ Default inline styles for the table-view toggle button — structural only,
83
+ mirroring `zoomControlStyleDefault` et al. so the two chrome features look
84
+ and behave consistently. Kept as separate object references (not shared
85
+ with zoom's) so `tableViewControl.ts` can independently detect, via `===`,
86
+ whether `tableViewControlStyle*` is still untouched — the same
87
+ auto-disable-on-className trick `zoomControlClassName` uses.
88
+ */
89
+ export declare const tableViewControlStyleDefault: {
90
+ "align-items": string;
91
+ display: string;
92
+ font: string;
93
+ height: string;
94
+ "justify-content": string;
95
+ padding: number;
96
+ width: string;
97
+ };
98
+ export declare const tableViewControlStyleActiveDefault: {
99
+ "background-color": string;
100
+ "border-color": string;
101
+ color: string;
102
+ };
103
+ export declare const tableViewControlStyleHoverDefault: false;
104
+ /**
105
+ Default inline styles for the minimap — mirrors the zoom-control defaults'
106
+ own reasoning (structural/neutral, easy to override or auto-disable via
107
+ `minimapClassName`) and the same by-reference `===` trick that lets
108
+ setting `minimapClassName` auto-disable an untouched default without
109
+ clobbering a caller's own customization.
110
+ @private
111
+ */
112
+ export declare const minimapStyleDefault: {
113
+ background: string;
114
+ border: string;
115
+ "border-radius": string;
116
+ "box-sizing": string;
117
+ };
118
+ export declare const minimapViewportStyleDefault: {
119
+ background: string;
120
+ border: string;
121
+ "border-radius": string;
122
+ cursor: string;
123
+ };
124
+ export declare const minimapViewportStyleActiveDefault: {
125
+ background: string;
126
+ cursor: string;
127
+ };
128
+ export declare const minimapLabelStyleDefault: {
129
+ bottom: string;
130
+ right: string;
131
+ color: string;
132
+ font: string;
133
+ "pointer-events": string;
134
+ };
135
+ /**
136
+ Default inline styles for the search control's toggle button — the same
137
+ structural-only values as `zoomControlStyleDefault` et al. (visual
138
+ parity by default), kept as independent objects/consumers rather than
139
+ shared references so restyling one doesn't affect the other.
140
+ @private
141
+ */
142
+ export declare const searchControlStyleDefault: {
143
+ "align-items": string;
144
+ display: string;
145
+ font: string;
146
+ height: string;
147
+ "justify-content": string;
148
+ padding: number;
149
+ width: string;
150
+ };
151
+ export declare const searchControlStyleActiveDefault: {
152
+ "background-color": string;
153
+ "border-color": string;
154
+ color: string;
155
+ };
156
+ export declare const searchControlStyleHoverDefault: false;
2
157
  /**
3
158
  Seeds a fresh Viz instance's schema defaults and installs the identity-coerce
4
159
  fluent accessors. Extracted from the constructor so the seeding logic stays
@@ -20,6 +20,8 @@
20
20
 
21
21
  @module
22
22
  */
23
+ import type { PlotZoomBase, ZoomState } from "../Plot/plotZoom.js";
24
+ import type { ZoomControlIconKey } from "../drawSteps/zoomControlsMarkup.js";
23
25
  import type { ZoomTransform } from "d3-zoom";
24
26
  import type { DataPoint } from "@d3plus/data";
25
27
  import type { ClipShape, SceneNode, Transform } from "@d3plus/render";
@@ -140,6 +142,21 @@ export interface VizInstance {
140
142
  _previousShapes?: string[];
141
143
  _previousAnnotations?: Record<string, string[]>;
142
144
  _zoomTransform?: Transform;
145
+ /** Data-shape nodes the automatic `zoomMax` measures when they aren't `_chartScene`'s top level (Plot). */
146
+ _zoomShapes?: SceneNode[];
147
+ /** The unzoomed Plot draw an axis-rescaling zoom rescales from. */
148
+ _plotZoomBase?: PlotZoomBase;
149
+ /** Pending repaint that drops a Plot's zoom clip once an animated reset settles. */
150
+ _plotUnclipTimer?: ReturnType<typeof setTimeout>;
151
+ /**
152
+ Chart-specific zoom: repaints for a transform and returns true, or
153
+ returns false to fall back to picture zoom (Plot rescales its axes).
154
+ */
155
+ _zoomRescale?: (t: ZoomState, duration?: number) => boolean;
156
+ /** Cleanup functions returned by `zoomControlIcons`' mount functions, keyed by button. */
157
+ _zoomIconCleanup?: Partial<Record<ZoomControlIconKey, () => void>>;
158
+ /** Cleanup function returned by an `attributionIcon` mount function. */
159
+ _attributionIconCleanup?: () => void;
143
160
  _select?: D3Selection;
144
161
  _sceneTarget?: Element;
145
162
  _sceneRenderer?: VizRenderer;
@@ -152,12 +169,37 @@ export interface VizInstance {
152
169
  /** True while the current hover came from a colorScale bucket swatch. */
153
170
  _hoverBucket?: boolean;
154
171
  _highlight?: ((d: DataPoint, i?: number) => boolean) | false;
172
+ /** Whether the search control's input is currently open. */
173
+ _searchOpen?: boolean;
174
+ /** The search control's current (lowercased) search term. */
175
+ _searchTerm?: string;
176
+ /** The `_highlight` predicate saved when the search box opened, restored when it closes. */
177
+ _searchPrevHighlight?: ((d: DataPoint, i?: number) => boolean) | false;
178
+ /** 0-based index of the current match within `searchMatches(...)`, once Enter/Shift+Enter has stepped to one. */
179
+ _searchMatchIndex?: number;
155
180
  _ordinalColorScale?: ((value: string) => string) | undefined;
156
181
  _hoverDatum?: DataPoint | null;
157
182
  _userHover?: number;
158
183
  _userDuration?: number;
159
184
  _dataCutoff: number;
160
185
  _brushing?: boolean;
186
+ /** Whether the table-view toggle is currently showing the data table instead of the chart. */
187
+ _tableView?: boolean;
188
+ /** The data table's current page (0-indexed), when `tableViewPageSize` paginates it. */
189
+ _tableViewPage?: number;
190
+ /** The data table's current sort column + direction, when the user has clicked a header. */
191
+ _tableViewSort?: {
192
+ column: string;
193
+ direction: "asc" | "desc";
194
+ };
195
+ /** Which dataset the data table currently shows — `viz._data` (raw) once toggled, `viz._filteredData` (aggregate) by default. */
196
+ _tableViewDataSource?: "raw" | "aggregate";
197
+ /** Cached first-occurrence-index lookups (exact JSON match, and groupBy-key fallback) for restoring `.data()` insertion order to the aggregate view; invalidated by comparing against the raw array reference they were built from. */
198
+ _tableViewGroupOrder?: {
199
+ data: DataPoint[];
200
+ exact: Map<string, number>;
201
+ group: Map<string, number>;
202
+ };
161
203
  /** Timeline brush selection (timeline feature). */
162
204
  _timelineSelection?: (Date | number)[] | false;
163
205
  /** The last drawn timeline value (ms), to detect multi-period trail jumps. */
@@ -166,6 +208,13 @@ export interface VizInstance {
166
208
  _userData?: DataPoint[] | string;
167
209
  /** Drill-down history stack (back button). */
168
210
  _history?: DataPoint[];
211
+ /** Cached measured size of the shared top-left controls panel (back/table-view/search). `measurement` is `topLeftControlsMarkup.ts`-internal (per-item positions); `signature` is the cache key (each contribution's html + resolved style). */
212
+ _topLeftControlsBox?: {
213
+ width: number;
214
+ height: number;
215
+ signature: string;
216
+ measurement: unknown;
217
+ };
169
218
  _xAxis?: Axis;
170
219
  _yAxis?: Axis;
171
220
  _x2Axis?: Axis;
@@ -204,7 +253,6 @@ export interface VizInstance {
204
253
  _timelineClass?: Timeline;
205
254
  _titleClass?: TextBox;
206
255
  _subtitleClass?: TextBox;
207
- _backClass?: TextBox;
208
256
  _messageClass?: Message;
209
257
  _tooltipClass?: Tooltip;
210
258
  _legendSort?: (a: DataPoint, b: DataPoint) => number;
@@ -232,6 +280,14 @@ export interface VizInstance {
232
280
  _zoomBehavior?: any;
233
281
  _zoomBrush?: any;
234
282
  _zoomSet?: boolean;
283
+ /** Whether a Geomap's themed basemap resolved dark on the latest draw. */
284
+ _basemapDark?: boolean;
285
+ /** Whether a Geomap is watching its backdrop for theme changes. */
286
+ _themeWatch?: boolean;
287
+ /** The attribution d3plus last set from the tile URL (vs. a user-set one). */
288
+ _tileAttribution?: string | false;
289
+ /** Whether a compact (ⓘ) attribution was clicked open. */
290
+ _attributionPinned?: boolean;
235
291
  _zoomToBounds?: (bounds: number[][] | null, duration?: number) => void;
236
292
  _renderTiles?: (transform?: ZoomTransform, duration?: number) => void;
237
293
  /**
@@ -16,6 +16,8 @@ export default class Axis extends BaseClass {
16
16
  _labelRotation: boolean | undefined;
17
17
  _margin: Record<string, number>;
18
18
  _outerBounds: Record<string, number>;
19
+ /** The measured size of the tick-label/title space, before margins (see `fixedSize`). */
20
+ _labelSpace?: number;
19
21
  _position: {
20
22
  horizontal: boolean;
21
23
  width: string;
@@ -17,6 +17,12 @@ export interface AxisConfig {
17
17
  /** Visible tick labels of the axis. */
18
18
  labels?: unknown[];
19
19
  labelOffset?: false | number;
20
+ /**
21
+ Exact size of the space that contains the axis tick labels and title.
22
+ Labels that need more room overflow outward instead of moving the axis
23
+ line; zooming pins a rescaled axis this way so it doesn't shift.
24
+ */
25
+ fixedSize?: number;
20
26
  /** Maximum size allowed for the space that contains the axis tick labels and title. */
21
27
  maxSize?: number;
22
28
  /** Minimum size alloted for the space that contains the axis tick labels and title. */
@@ -32,6 +38,13 @@ export interface AxisConfig {
32
38
  tickFormat?: (d: number | string) => string | number;
33
39
  /** Tick values of the axis. */
34
40
  ticks?: unknown[];
41
+ /**
42
+ Whether the domain's min and max are always shown as ticks, even when
43
+ they aren't among the scale's own "nice" tick values (the nearest nice
44
+ tick is dropped when it would crowd them). Defaults to `true`; zooming
45
+ turns it off so a rescaled axis shows only nice values.
46
+ */
47
+ domainTicks?: boolean;
35
48
  tickSize?: number;
36
49
  /**
37
50
  Defines a custom locale object to be used in time scales. Must include
@@ -198,6 +211,28 @@ export interface D3plusConfig {
198
211
  };
199
212
  /** Hides the SVG from assistive technology when true (`aria-hidden`). */
200
213
  ariaHidden?: boolean;
214
+ /**
215
+ Text (rendered as HTML — any valid HTML string works, including anchor
216
+ links) shown in the chart's bottom-right corner, most often a map tile
217
+ credit. `false` (the default) shows nothing. A credit wider than half
218
+ the chart area collapses to a small "ⓘ" badge that expands on hover,
219
+ focus, or click.
220
+ */
221
+ attribution?: string | boolean;
222
+ /**
223
+ Overrides the "ⓘ" badge a long attribution collapses to, which
224
+ otherwise renders as an inline SVG. A string is used as the badge's
225
+ raw HTML content; a mount function, `(el: HTMLElement) => void | (() =>
226
+ void)`, is called once with the badge's reserved element so a live
227
+ component (a React tree via `createRoot(el).render(...)`, or anything
228
+ else imperative) can be mounted into it — return a cleanup function if
229
+ there's teardown to do.
230
+ */
231
+ attributionIcon?: string | ((el: HTMLElement) => void | (() => void));
232
+ /** CSS key/value pairs used to style the attribution text. */
233
+ attributionStyle?: Record<string, unknown>;
234
+ /** Additional CSS class name(s) applied to the back button, alongside the fixed `back-control` class. */
235
+ backControlClassName?: string;
201
236
  /** Padding between bars in pixels. */
202
237
  barPadding?: number;
203
238
  /** The baseline for the x/y plot. */
@@ -291,10 +326,21 @@ export interface D3plusConfig {
291
326
  loadingHTML?: string | ((viz: VizBase) => string);
292
327
  /** Metric key for the visualization. */
293
328
  metric?: string;
329
+ /** Shows a small overview + draggable-viewport minimap underneath the zoom controls once the chart is zoomed in. On by default whenever `zoom` is enabled. */
330
+ minimap?: boolean;
331
+ /** Additional CSS class name(s) applied to the minimap, alongside its fixed `d3plus-minimap`/etc. classes. */
332
+ minimapClassName?: string;
294
333
  /** Custom HTML content shown when no data is supplied, or a function receiving the viz instance. */
295
334
  noDataHTML?: string | ((viz: VizBase) => string);
296
- /** Ocean color for geomaps (any CSS value including 'transparent'). */
297
- ocean?: string;
335
+ /**
336
+ Ocean color for geomaps (any CSS value including 'transparent'), or a
337
+ `{light, dark}` pair chosen by the chart's backdrop. Defaults to the
338
+ default basemap's own water colors.
339
+ */
340
+ ocean?: string | {
341
+ light: string;
342
+ dark: string;
343
+ };
298
344
  /** Event listeners keyed by event name. */
299
345
  on?: Record<string, (event: Event) => void>;
300
346
  /** Coordinate accessor for point-based geomaps. */
@@ -315,6 +361,12 @@ export interface D3plusConfig {
315
361
  row?: string;
316
362
  /** Scrollable container selector for tooltip positioning. */
317
363
  scrollContainer?: string | Window;
364
+ /** Shows a top-left search button that expands into an input; typing highlights shapes whose label matches. On by default for every chart. */
365
+ search?: boolean;
366
+ /** Resolves the string the search box matches its typed term against, for a given datum. Defaults to the mark's resolved on-screen label. */
367
+ searchAccessor?: (d: DataPoint, i: number) => string;
368
+ /** Additional CSS class name(s) applied to the search toggle button and input, alongside the fixed `search-control` classes. */
369
+ searchControlClassName?: string;
318
370
  /** Configuration for shape rendering. */
319
371
  shapeConfig?: {
320
372
  duration?: number;
@@ -360,12 +412,37 @@ export interface D3plusConfig {
360
412
  svgDesc?: string;
361
413
  /** Accessible title applied to the root SVG (`<title>`). */
362
414
  svgTitle?: string;
415
+ /** 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. */
416
+ tableView?: boolean;
417
+ /** Additional CSS class name(s) applied to the `<table>` element rendered while in table view, alongside the fixed `d3plus-table-view-table` class. */
418
+ tableViewClassName?: string;
419
+ /** Additional CSS class name(s) applied to the table-view toggle button, alongside the fixed `table-view-control`/`table-view-toggle` classes. */
420
+ tableViewControlClassName?: string;
421
+ /** CSS key/value pairs styling the table-view toggle button. `false` removes all default styling. */
422
+ tableViewControlStyle?: Record<string, unknown> | false;
423
+ /** CSS key/value pairs styling the table-view toggle button while active (showing the data table). `false` removes all default styling. */
424
+ tableViewControlStyleActive?: Record<string, unknown> | false;
425
+ /** CSS key/value pairs styling the table-view toggle button on hover. `false` removes all default styling. */
426
+ tableViewControlStyleHover?: Record<string, unknown> | false;
427
+ /** Whether the data table shows a "download CSV" button, exporting its full (sorted, unpaginated) rows. On by default. */
428
+ tableViewDownload?: boolean;
429
+ /** Rows per page while in table view. `false` (or any non-positive number) disables pagination and shows every row on one page. */
430
+ tableViewPageSize?: number | false;
431
+ /** Whether the data table's column headers are clickable to sort (toggling asc/desc). On by default. */
432
+ tableViewSort?: boolean;
363
433
  /** Threshold value for grouping small slices. */
364
434
  threshold?: number;
365
435
  /** Label for the threshold group, or a `(datum, index)` accessor. */
366
436
  thresholdName?: string | ((d: DataPoint, i: number) => string);
367
- /** URL to XYZ map tiles. */
368
- tileUrl?: string;
437
+ /**
438
+ URL template for XYZ map tiles, with `{z}`, `{x}`, `{y}` (and optional
439
+ `{s}` subdomain) placeholders — or a `{light, dark}` pair, chosen by the
440
+ chart's backdrop. Defaults to Esri's Light Gray and Dark Gray Canvas.
441
+ */
442
+ tileUrl?: string | {
443
+ light: string;
444
+ dark: string;
445
+ };
369
446
  /** Whether to show map tiles. */
370
447
  tiles?: boolean;
371
448
  /** Time key for temporal data. */
@@ -422,16 +499,33 @@ export interface D3plusConfig {
422
499
  ySort?: (a: DataPoint, b: DataPoint) => number;
423
500
  /** Defines a custom sorting comparator function for discrete y2 axes. */
424
501
  y2Sort?: (a: DataPoint, b: DataPoint) => number;
425
- /** Set to false to disable zooming on Geomap and Network. */
502
+ /** Enables pan/zoom with zoom-control buttons. On by default for every chart. */
426
503
  zoom?: boolean;
504
+ /** Additional CSS class name(s) applied to each zoom control button, alongside the fixed `zoom-control`/`zoom-in`/etc. classes. */
505
+ zoomControlClassName?: string;
506
+ /**
507
+ Overrides one or more of the four built-in zoom-control icons (`zoomIn`,
508
+ `zoomOut`, `zoomReset`, `zoomBrush`), which otherwise render as inline
509
+ SVGs. Each value is either raw HTML — used as that button's content — or
510
+ a mount function, `(el: HTMLElement) => void | (() => void)`, called
511
+ once with the button's reserved icon slot so a live component (a React
512
+ tree via `createRoot(el).render(...)`, or anything else imperative) can
513
+ be mounted into it — return a cleanup function if there's teardown to do.
514
+ */
515
+ zoomControlIcons?: Partial<Record<"zoomIn" | "zoomOut" | "zoomReset" | "zoomBrush", string | ((el: HTMLElement) => void | (() => void))>>;
427
516
  /** Multiplier applied to programmatic zoom steps. */
428
517
  zoomFactor?: number;
429
- /** Maximum zoom scale factor. */
518
+ /** Maximum zoom scale factor. Defaults to the scale at which the smallest shape fills the chart area. */
430
519
  zoomMax?: number;
431
520
  /** Whether panning (drag) is enabled while zoomed. */
432
521
  zoomPan?: boolean;
433
- /** Whether scroll-wheel zooming is enabled. */
434
- zoomScroll?: boolean;
522
+ /**
523
+ Whether the mouse wheel (and one-finger touch) zooms. `"modifier"` (the
524
+ default) leaves page scrolling alone: only
525
+ Ctrl/⌘ + wheel or a trackpad/two-finger pinch zooms, and one finger pans
526
+ only once zoomed in. `true` zooms on any wheel; `false` never does.
527
+ */
528
+ zoomScroll?: boolean | "modifier";
435
529
  /** Allows additional custom properties. */
436
530
  [key: string]: unknown;
437
531
  }