@d3plus/core 4.2.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 (214) hide show
  1. package/README.md +2137 -953
  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 +58 -9
  23. package/es/src/charts/Geomap/emit.js.map +1 -1
  24. package/es/src/charts/Geomap/index.js +93 -99
  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 +99 -4
  45. package/es/src/charts/Plot/index.js.map +1 -1
  46. package/es/src/charts/Plot/pipeline.js +25 -5
  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/shapeEmit.js +3 -1
  124. package/es/src/charts/features/shapeEmit.js.map +1 -1
  125. package/es/src/charts/features/zoomExtent.js +185 -0
  126. package/es/src/charts/features/zoomExtent.js.map +1 -0
  127. package/es/src/charts/helpers/tileAttributions.js +26 -0
  128. package/es/src/charts/helpers/tileAttributions.js.map +1 -1
  129. package/es/src/charts/index.js +1 -0
  130. package/es/src/charts/index.js.map +1 -1
  131. package/es/src/charts/pipeline/runVizPipeline.js +33 -14
  132. package/es/src/charts/pipeline/runVizPipeline.js.map +1 -1
  133. package/es/src/charts/pipeline/vizDrawPure.js +32 -6
  134. package/es/src/charts/pipeline/vizDrawPure.js.map +1 -1
  135. package/es/src/charts/viz/Viz.js +102 -61
  136. package/es/src/charts/viz/Viz.js.map +1 -1
  137. package/es/src/charts/viz/VizBase.js +157 -4
  138. package/es/src/charts/viz/VizBase.js.map +1 -1
  139. package/es/src/charts/viz/VizBaseConfig.js +32 -2
  140. package/es/src/charts/viz/VizBaseConfig.js.map +1 -1
  141. package/es/src/charts/viz/interactionOpacity.js +4 -1
  142. package/es/src/charts/viz/interactionOpacity.js.map +1 -1
  143. package/es/src/charts/viz/vizDefaults.js +247 -51
  144. package/es/src/charts/viz/vizDefaults.js.map +1 -1
  145. package/es/src/charts/viz/vizRender.js +7 -3
  146. package/es/src/charts/viz/vizRender.js.map +1 -1
  147. package/es/src/charts/viz/vizTypes.js.map +1 -1
  148. package/es/src/components/Axis/Axis.js +10 -1
  149. package/es/src/components/Axis/Axis.js.map +1 -1
  150. package/es/src/components/Axis/axisLayoutLabels.js +2 -1
  151. package/es/src/components/Axis/axisLayoutLabels.js.map +1 -1
  152. package/es/src/components/Axis/axisRender.js +5 -1
  153. package/es/src/components/Axis/axisRender.js.map +1 -1
  154. package/es/src/components/Legend/legendConfig.js +86 -20
  155. package/es/src/components/Legend/legendConfig.js.map +1 -1
  156. package/es/src/shapes/Shape.js +12 -10
  157. package/es/src/shapes/Shape.js.map +1 -1
  158. package/es/src/shapes/hitAreaNode.js +31 -5
  159. package/es/src/shapes/hitAreaNode.js.map +1 -1
  160. package/es/src/shapes/interactionPoints.js +30 -0
  161. package/es/src/shapes/interactionPoints.js.map +1 -0
  162. package/es/src/utils/D3plusConfig.js.map +1 -1
  163. package/package.json +11 -10
  164. package/types/index.d.ts +1 -1
  165. package/types/internal.d.ts +8 -1
  166. package/types/src/charts/Chord/applyLayout.d.ts +43 -0
  167. package/types/src/charts/Chord/emit.d.ts +10 -0
  168. package/types/src/charts/Chord/index.d.ts +19 -0
  169. package/types/src/charts/Geomap/basemapTheme.d.ts +35 -0
  170. package/types/src/charts/Plot/index.d.ts +32 -2
  171. package/types/src/charts/Plot/pipeline.d.ts +2 -1
  172. package/types/src/charts/Plot/plotZoom.d.ts +65 -0
  173. package/types/src/charts/definition/ChartDefinition.d.ts +3 -1
  174. package/types/src/charts/drawSteps/backControl.d.ts +29 -0
  175. package/types/src/charts/drawSteps/controlButtonStyle.d.ts +45 -0
  176. package/types/src/charts/drawSteps/minimap.d.ts +19 -0
  177. package/types/src/charts/drawSteps/minimapMarkup.d.ts +45 -0
  178. package/types/src/charts/drawSteps/searchControls.d.ts +3 -0
  179. package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +111 -0
  180. package/types/src/charts/drawSteps/tableView.d.ts +23 -0
  181. package/types/src/charts/drawSteps/tableViewControl.d.ts +21 -0
  182. package/types/src/charts/drawSteps/tableViewMarkup.d.ts +119 -0
  183. package/types/src/charts/drawSteps/topLeftControls.d.ts +32 -0
  184. package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +72 -0
  185. package/types/src/charts/drawSteps/zoomControls.d.ts +48 -8
  186. package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +138 -0
  187. package/types/src/charts/features/attributionFeature.d.ts +21 -0
  188. package/types/src/charts/features/axes.d.ts +1 -1
  189. package/types/src/charts/features/chartGeometry.d.ts +9 -3
  190. package/types/src/charts/features/edgeArrows.d.ts +92 -0
  191. package/types/src/charts/features/emitHelpers.d.ts +11 -0
  192. package/types/src/charts/features/ensureZoomDom.d.ts +6 -2
  193. package/types/src/charts/features/features.d.ts +32 -17
  194. package/types/src/charts/features/featuresLegend.d.ts +15 -0
  195. package/types/src/charts/features/plotPaint.d.ts +15 -2
  196. package/types/src/charts/features/zoomExtent.d.ts +25 -0
  197. package/types/src/charts/index.d.ts +1 -0
  198. package/types/src/charts/pipeline/runVizPipeline.d.ts +6 -3
  199. package/types/src/charts/viz/Viz.d.ts +31 -1
  200. package/types/src/charts/viz/VizBase.d.ts +86 -4
  201. package/types/src/charts/viz/VizBaseConfig.d.ts +20 -2
  202. package/types/src/charts/viz/vizDefaults.d.ts +155 -0
  203. package/types/src/charts/viz/vizTypes.d.ts +75 -1
  204. package/types/src/components/Axis/Axis.d.ts +2 -0
  205. package/types/src/shapes/Shape.d.ts +2 -2
  206. package/types/src/shapes/hitAreaNode.d.ts +5 -4
  207. package/types/src/shapes/interactionPoints.d.ts +15 -0
  208. package/types/src/utils/D3plusConfig.d.ts +102 -8
  209. package/umd/d3plus-core.full.js +39793 -34875
  210. package/umd/d3plus-core.full.js.map +1 -1
  211. package/umd/d3plus-core.full.min.js +5836 -4264
  212. package/umd/d3plus-core.js +13998 -9927
  213. package/umd/d3plus-core.js.map +1 -1
  214. package/umd/d3plus-core.min.js +3716 -2264
@@ -0,0 +1,92 @@
1
+ /**
2
+ Shared arrowhead geometry for edge charts (Network, Rings, Sankey).
3
+
4
+ Arrowheads are drawn as filled-triangle `path` scene nodes rather than SVG
5
+ `marker-end`, because d3plus renders to both SVG and Canvas and Canvas has no
6
+ marker support. Each chart computes the tip point + tangent angle from its own
7
+ edge geometry (edges terminate differently per chart) and calls `arrowNode`.
8
+ The triangle lives in the same content coordinate space as its edge, so it
9
+ pans/zooms and hover-dims in lockstep with the edge.
10
+
11
+ Chord doesn't use this module — its ribbons carry arrowheads via d3-chord's
12
+ `ribbonArrow`.
13
+
14
+ @module
15
+ */
16
+ import type { DataPoint } from "@d3plus/data";
17
+ import type { SceneNode } from "@d3plus/render";
18
+ /** Which end(s) of an edge carry an arrowhead. `true` is equivalent to `"target"`. */
19
+ export type ArrowEndValue = boolean | "target" | "source" | "both";
20
+ /** The `arrows` config: a fixed value or a per-edge accessor. */
21
+ export type ArrowValue = ArrowEndValue | ((d: DataPoint, i: number) => ArrowEndValue);
22
+ /** Resolved per-edge arrow ends. */
23
+ export interface ArrowEnds {
24
+ source: boolean;
25
+ target: boolean;
26
+ }
27
+ /** Normalize an `arrows` config value for one edge into `{source, target}` flags. */
28
+ export declare function arrowEnds(arrows: ArrowValue, d: DataPoint, i: number): ArrowEnds;
29
+ /**
30
+ SVG path `d` for a filled isosceles triangle whose tip is at `(x, y)`, pointing
31
+ along `angle` (radians), with `size` the tip-to-base length.
32
+ */
33
+ export declare function arrowPathD(x: number, y: number, angle: number, size: number): string;
34
+ /**
35
+ Tip point + direction for a straight-edge arrowhead sitting at the boundary of
36
+ an endpoint node (radius `r`), pointing from `(fromX, fromY)` toward
37
+ `(toX, toY)`. `gap` insets the tip slightly off the node edge. Used by Network
38
+ (center-to-center links) and Rings' straight center-links.
39
+ */
40
+ export declare function straightArrowTip(fromX: number, fromY: number, toX: number, toY: number, r: number, gap?: number): {
41
+ x: number;
42
+ y: number;
43
+ angle: number;
44
+ };
45
+ /**
46
+ Resolve the arrowhead size from the `arrowSize` config (a number or per-edge
47
+ accessor), falling back to a size derived from the edge's stroke width.
48
+ */
49
+ export declare function arrowSizeFor(arrowSize: unknown, d: DataPoint, i: number, strokeWidth: number): number;
50
+ /**
51
+ Emit arrowhead nodes for a straight, center-to-center edge between two nodes
52
+ (radii `source.r`/`target.r`), insetting each tip to the node boundary.
53
+ Returns `[]` when `arrows` selects neither end. Used by Network and Rings'
54
+ straight center-links.
55
+ */
56
+ export declare function straightEdgeArrows(opts: {
57
+ arrows: ArrowValue;
58
+ arrowSize: unknown;
59
+ strokeWidth?: number;
60
+ datum: DataPoint;
61
+ i: number;
62
+ keyPrefix: string;
63
+ fill?: string;
64
+ source: {
65
+ x: number;
66
+ y: number;
67
+ r?: number;
68
+ };
69
+ target: {
70
+ x: number;
71
+ y: number;
72
+ r?: number;
73
+ };
74
+ }): SceneNode[];
75
+ /** Inputs for a single arrowhead scene node. */
76
+ export interface ArrowNodeOpts {
77
+ key: string | number;
78
+ datum: DataPoint;
79
+ x: number;
80
+ y: number;
81
+ /** Direction the arrow points, in radians. */
82
+ angle: number;
83
+ size: number;
84
+ fill?: string;
85
+ opacity?: number;
86
+ }
87
+ /**
88
+ Build one arrowhead scene node. `interactive: false` so the edge path owns
89
+ hit-testing, and the same `datum` as its edge so the hover-dim pass keeps the
90
+ arrow paired with its edge.
91
+ */
92
+ export declare function arrowNode(opts: ArrowNodeOpts): SceneNode;
@@ -73,6 +73,17 @@ export declare function paintFromShapeConfig(sc: Record<string, unknown>, d: Dat
73
73
  opacity?: number;
74
74
  vectorEffect?: "none" | "non-scaling-stroke";
75
75
  };
76
+ /**
77
+ Resolve a layout node's `drawLabel` text, unwrapping the `{data, i}`
78
+ wrapper the emit-side layout nodes carry (Network/Rings/Sankey/Tree
79
+ convention — same unwrap `paintFromShapeConfig` callers already do).
80
+ */
81
+ export declare function drawNodeLabel(viz: {
82
+ _drawLabel: (d: DataPoint, i: number) => string;
83
+ }, d: DataPoint & {
84
+ data?: DataPoint;
85
+ i?: number;
86
+ }, i: number): string;
76
87
  /**
77
88
  Apply a shape-config object to a chart-specific shape key, returning the
78
89
  configPrep-massaged object suitable for `.config(...)`. Equivalent to
@@ -22,9 +22,13 @@
22
22
  it's the documented home for the imperative half of v4 zoom.
23
23
  */
24
24
  import type { VizInstance as Viz } from "../viz/vizTypes.js";
25
- export type ZoomDomKind = "network" | "geomap";
25
+ export type ZoomDomKind = "network" | "geomap" | "generic";
26
26
  interface SetupOpts {
27
- /** "network" or "geomap" — picks the css class + behavior tweaks. */
27
+ /**
28
+ "network" or "geomap" — picks the css class + behavior tweaks. "generic"
29
+ is the bare surface (zoom group + brush host) every other chart gets
30
+ when `zoom` is enabled.
31
+ */
28
32
  kind: ZoomDomKind;
29
33
  /** Chart-area width (margin-adjusted). */
30
34
  width: number;
@@ -1,5 +1,6 @@
1
1
  import type { SceneNode } from "@d3plus/render";
2
2
  import type { VizContext } from "../pipeline/stages.js";
3
+ import type { VizInstance } from "../viz/vizTypes.js";
3
4
  /** A margin claim, in pixels along each side. Unclaimed sides default to 0. */
4
5
  export interface MarginClaim {
5
6
  top?: number;
@@ -102,6 +103,36 @@ export declare function sanitizePosition(raw: unknown): PanelPosition;
102
103
  the math first, then improve.
103
104
  */
104
105
  export declare function runLayout(ctx: VizContext, features: FeatureModule[], baseMargin?: Required<MarginClaim>): LayoutResult;
106
+ /**
107
+ How far content starting `top` px down the chart, whose right edge sits
108
+ `right` px in from the chart's right edge, must pull in its right edge to
109
+ clear the zoom-control panel pinned to the chart's top-right corner. Zero
110
+ when the chart shows no controls or the content starts below them.
111
+ */
112
+ export declare function zoomControlsInset(viz: VizInstance, top: number, right: number): number;
113
+ /**
114
+ The left-side mirror of `zoomControlsInset`: how far content starting
115
+ `top` px down the chart, whose left edge sits `left` px in from the
116
+ chart's left edge, must pull in to clear the shared top-left controls
117
+ panel (back / table-view / search). Zero when nothing is showing there
118
+ or content starts below the panel's height.
119
+ */
120
+ export declare function topLeftControlsInset(viz: VizInstance, top: number, left: number): number;
121
+ /**
122
+ The combined left+right corner-panel insets for content starting `top`
123
+ px down the chart, plus the single symmetric amount CENTERED content
124
+ should inset both sides by to stay centered on the full chart width even
125
+ when only one corner has something to avoid (the larger of the two —
126
+ see `textBlockLayout`'s doc comment for why). Shared by `textBlockLayout`
127
+ (title/subtitle/total) and the legend's own top-position layout
128
+ (`featuresLegend.ts`), which independently needed this exact same
129
+ "combine the two corners' insets" math before this existed.
130
+ */
131
+ export declare function cornerInsets(viz: VizInstance, top: number, left: number, right: number): {
132
+ left: number;
133
+ right: number;
134
+ symmetric: number;
135
+ };
105
136
  /**
106
137
  Title as a FeatureModule. Uses `_titleClass._textData()` for height
107
138
  (pure compute, no DOM) and returns the margin claim explicitly.
@@ -109,12 +140,6 @@ export declare function runLayout(ctx: VizContext, features: FeatureModule[], ba
109
140
  export declare const titleFeature: FeatureModule;
110
141
  /** Converts `drawSubtitle.ts` to a FeatureModule. Mirrors titleFeature. */
111
142
  export declare const subtitleFeature: FeatureModule;
112
- /**
113
- Converts `drawBack.ts` to a FeatureModule. Visible only when there are
114
- drill-down history entries; emits a "← Back" TextNode at the chart's
115
- top-left and claims its line height + padding × 2 from `margin.top`.
116
- */
117
- export declare const backFeature: FeatureModule;
118
143
  export { legendFeature } from "./featuresLegend.js";
119
144
  /**
120
145
  Converts `drawTimeline.ts` to a FeatureModule.
@@ -133,17 +158,7 @@ export declare const timelineFeature: FeatureModule;
133
158
  claims margin along its position side.
134
159
  */
135
160
  export declare const colorScaleFeature: FeatureModule;
136
- /**
137
- Converts `drawAttribution.ts` to a FeatureModule.
138
-
139
- Attribution is an HTML `<div>` overlay positioned absolutely outside the SVG
140
- plane — it doesn't fit naturally as a SceneNode in the chart scene graph.
141
- Rather than encode an HTML overlay into the scene graph, this feature runs
142
- the DOM-creating side effect imperatively from inside `layout()`, so
143
- invocation is funneled through `runLayout` for consistency with the
144
- other features. It claims zero margin and emits no panel.
145
- */
146
- export declare const attributionFeature: FeatureModule;
161
+ export { attributionFeature } from "./attributionFeature.js";
147
162
  /**
148
163
  Converts `drawTotal.ts` to a FeatureModule. Slightly different from title/
149
164
  subtitle: the text comes from `sum()` over the filtered data when `_total`
@@ -1,4 +1,18 @@
1
+ import type { DataPoint } from "@d3plus/data";
1
2
  import type { FeatureModule } from "./features.js";
3
+ import type { VizInstance } from "../viz/vizTypes.js";
4
+ interface LegendData {
5
+ legendData: DataPoint[];
6
+ legendKey: (d: DataPoint, i: number) => string;
7
+ getAttr: (d: DataPoint, i: number, attr: string) => string;
8
+ }
9
+ /**
10
+ Rolls filtered legend data up by paint attributes, sorts it, and computes
11
+ `viz._legendDepth` (the lowest groupBy level whose values are unique).
12
+ Returns the `legendData` array plus the `fill`/`getAttr` accessors the
13
+ render step reuses.
14
+ */
15
+ export declare function buildLegendData(viz: VizInstance): LegendData;
2
16
  /**
3
17
  Converts `drawLegend.ts` to a FeatureModule.
4
18
 
@@ -10,3 +24,4 @@ import type { FeatureModule } from "./features.js";
10
24
  scene composition for Legend happens via Viz.toScene's `components` array.
11
25
  */
12
26
  export declare const legendFeature: FeatureModule;
27
+ export {};
@@ -11,7 +11,7 @@
11
11
  destructure block below for the full schema.
12
12
  */
13
13
  import type { DataPoint } from "@d3plus/data";
14
- import type { SceneNode } from "@d3plus/render";
14
+ import type { ClipShape, SceneNode } from "@d3plus/render";
15
15
  import type Axis from "../../components/Axis/Axis.js";
16
16
  import type { VizInstance as Viz } from "../viz/vizTypes.js";
17
17
  /** An axis position function: maps a domain value to a pixel coordinate. */
@@ -155,6 +155,8 @@ export interface PlotPaintContext {
155
155
  barLabels: string[];
156
156
  showLineLabels: boolean;
157
157
  stackGroup: unknown;
158
+ /** Per-axis config a zoom repaint layers over each production axis (see `Plot/plotZoom.ts`). */
159
+ zoomAxes?: Partial<Record<"x" | "x2" | "y" | "y2", Record<string, unknown>>>;
158
160
  }
159
161
  /**
160
162
  Result of the MEASURE phase of plotPaint. Captures everything the EMIT
@@ -215,7 +217,9 @@ export interface PlotMeasureResult {
215
217
  Returns the flat `SceneNode[]` array that the caller (`Plot._paint`)
216
218
  merges into `_chartScene`.
217
219
  */
218
- export declare function plotEmit(viz: Viz, pCtx: PlotPaintContext, mCtx: PlotMeasureResult): SceneNode[];
220
+ export declare function plotEmit(viz: Viz, pCtx: PlotPaintContext, mCtx: PlotMeasureResult, clip?: ClipShape): SceneNode[];
221
+ /** Key of the group `plotEmit` wraps a zoomable plot's non-axis content in. */
222
+ export declare const PLOT_ZOOM_CONTENT_KEY = "plot-zoom-content";
219
223
  /**
220
224
  Plot paint phase as a free function — orchestrates the axis render +
221
225
  EMIT.
@@ -231,3 +235,12 @@ export declare function plotEmit(viz: Viz, pCtx: PlotPaintContext, mCtx: PlotMea
231
235
  @param pCtx Cross-phase locals produced by `Plot._draw`.
232
236
  */
233
237
  export declare function plotPaint(viz: Viz, pCtx: PlotPaintContext): SceneNode[];
238
+ /**
239
+ `plotPaint` that also returns the solved axis layout, and accepts a
240
+ `frozen` layout to repaint against (plus a clip for the plot content) —
241
+ how a zoom repaints the plot with rescaled domains.
242
+ */
243
+ export declare function plotPaintMeasured(viz: Viz, pCtx: PlotPaintContext, frozen?: PlotMeasureResult, clip?: ClipShape): {
244
+ nodes: SceneNode[];
245
+ layout: PlotMeasureResult;
246
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ Automatic maximum zoom scale (#85): how far a chart can zoom depends on
3
+ what it draws. A network of a few large nodes needs little zoom, while a
4
+ detailed map should be able to zoom all the way into its smallest path.
5
+
6
+ @module
7
+ */
8
+ import type { SceneNode } from "@d3plus/render";
9
+ /**
10
+ The zoom scale at which the chart's smallest data shape fills the chart
11
+ area (less `padding` on each side, matching `zoomToBounds`), floored at 1.
12
+
13
+ Data shapes are the top-level datum-bearing nodes of `_chartScene` (a
14
+ Line/Area series is measured per segment — see `nodeSizes`). Chart
15
+ decorations (axes, gridlines, radar spokes, …) are nested in groups, text
16
+ labels scale with the shapes they annotate, and `::hit` nodes duplicate
17
+ the geometry of the shape they belong to, so none of those are measured.
18
+
19
+ @param nodes The chart's `_chartScene`.
20
+ @param width Chart-area width.
21
+ @param height Chart-area height.
22
+ @param padding Pixel padding kept around a shape zoomed to fill the area.
23
+ @param baseScale Any scale the chart's own transform already applies.
24
+ */
25
+ export declare function autoZoomMax(nodes: SceneNode[], width: number, height: number, padding: number, baseScale?: number): number;
@@ -2,6 +2,7 @@ export { default as AreaPlot } from "./AreaPlot/index.js";
2
2
  export { default as BarChart } from "./BarChart/index.js";
3
3
  export { default as BoxWhisker } from "./BoxWhisker/index.js";
4
4
  export { default as BumpChart } from "./BumpChart/index.js";
5
+ export { default as Chord } from "./Chord/index.js";
5
6
  export { default as Donut } from "./Donut/index.js";
6
7
  export { default as Geomap } from "./Geomap/index.js";
7
8
  export { default as LinePlot } from "./LinePlot/index.js";
@@ -15,14 +15,17 @@
15
15
  1. `viz._preDraw()` — data filtering + legend-data + drawDepth
16
16
  2. `viz._draw()` — chart-specific layout + scene absorption
17
17
  3. `zoomControls(viz)` — zoom HTML overlay (architectural carve-out)
18
- 4. `attributionFeature.layout(viz)` — bottom-right attribution panel
19
- 5. `viz._drawSceneToTarget()` — paint scene via SvgRenderer/CanvasRenderer
18
+ 4. `minimapFeature.layout(viz)` — zoomed-chart viewport indicator
19
+ 5. `topLeftControlsFeature.layout(viz)` — back/table-view/search panel
20
+ 6. `attributionFeature.layout(viz)` — bottom-right attribution panel
21
+ 7. `tableViewFeature.layout(viz)` — chart-sized data-table overlay
22
+ 8. `viz._drawSceneToTarget()` — paint scene via SvgRenderer/CanvasRenderer
20
23
 
21
24
  Future work:
22
25
  - Extract a `ResolvedSpec` so step 1 takes (config) not (this).
23
26
  - Decouple step 2 so it takes (ctx) not (this); stages already follow
24
27
  this pattern but `_draw` itself doesn't.
25
- - Replace step 5's `this._sceneRenderer` slot with a returned handle
28
+ - Replace step 8's `this._sceneRenderer` slot with a returned handle
26
29
  so callers can pick/destroy/diff without instance lookup.
27
30
 
28
31
  @param viz A Viz instance (or any subclass: Plot, Treemap, Pack, …).
@@ -1,5 +1,5 @@
1
1
  import type { DataPoint } from "@d3plus/data";
2
- import type { Renderer, Scene, SceneEvent } from "@d3plus/render";
2
+ import type { PickResult, Renderer, Scene, SceneEvent } from "@d3plus/render";
3
3
  import VizBase from "./VizBase.js";
4
4
  /**
5
5
  Creates an x/y plot based on an array of data. See [this example](https://d3plus.org/examples/d3plus-treemap/getting-started/) for help getting started using the treemap generator.
@@ -46,6 +46,21 @@ export default class Viz extends VizBase {
46
46
  @param callback Optional callback invoked after rendering completes.
47
47
  */
48
48
  render(callback?: () => void): this;
49
+ /**
50
+ Serializes the most recently rendered output to an SVG string. Returns
51
+ `""` if the chart has not been rendered yet. Both backends support this:
52
+ the SVG backend returns its live `<svg>`, the canvas backend re-renders the
53
+ retained scene through a throwaway SVG backend. Primarily used for
54
+ server-side rendering (see `@d3plus/ssr`).
55
+ */
56
+ toSVGString(): string;
57
+ /**
58
+ Returns the underlying canvas element of the most recent render when the
59
+ canvas backend is active (`renderer("canvas")`), or `undefined` otherwise.
60
+ Server-side callers cast this to their native canvas to encode a raster
61
+ (see `@d3plus/ssr`).
62
+ */
63
+ toCanvas(): unknown;
49
64
  /**
50
65
  Selects which @d3plus/render backend paints the visible output.
51
66
  `"svg"` = SvgRenderer (default), `"canvas"` = CanvasRenderer.
@@ -83,6 +98,21 @@ export default class Viz extends VizBase {
83
98
  svg's children get cleared so only the scene output is visible.
84
99
  */
85
100
  _drawSceneToTarget(durationOverride?: number): void;
101
+ /**
102
+ Resolves the `(d, i, x)` a picked scene node reports to interaction
103
+ handlers (tooltip, click, user `on` handlers). `pick.datum` is the raw
104
+ scene datum; for a Plot shape that's the wrapped record `{data, i}`, which
105
+ handlers expect unwrapped to `(d.data, d.i, wrapped)`. The base does that
106
+ unwrap; Plot overrides this to report the point nearest the cursor for
107
+ multi-point shapes (Line/Area) so a series tooltip reflects the hovered
108
+ x rather than the whole-series aggregate.
109
+ @private
110
+ */
111
+ _interactionDatum(pick: PickResult, _event: SceneEvent): {
112
+ d: unknown;
113
+ i: number;
114
+ x: unknown;
115
+ };
86
116
  /**
87
117
  Routes a renderer pointer event to the matching `viz.schema.on` handlers.
88
118
  Bridges the v4 scene-rendered path (SvgRenderer/CanvasRenderer), where
@@ -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
  /**