semiotic 3.4.0 → 3.4.2

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 (189) hide show
  1. package/CLAUDE.md +16 -3
  2. package/ai/schema.json +42 -1
  3. package/ai/system-prompt.md +4 -0
  4. package/dist/components/Annotation.d.ts +42 -2
  5. package/dist/components/CategoryColors.d.ts +1 -1
  6. package/dist/components/ChartGrid.d.ts +1 -1
  7. package/dist/components/ContextLayout.d.ts +1 -1
  8. package/dist/components/DataSummaryContext.d.ts +1 -1
  9. package/dist/components/DetailsPanel.d.ts +3 -2
  10. package/dist/components/Legend.d.ts +2 -3
  11. package/dist/components/LinkedCharts.d.ts +1 -1
  12. package/dist/components/ThemeProvider.d.ts +1 -1
  13. package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
  14. package/dist/components/Tooltip/Tooltip.d.ts +4 -3
  15. package/dist/components/charts/geo/ChoroplethMap.d.ts +4 -4
  16. package/dist/components/charts/geo/DistanceCartogram.d.ts +5 -4
  17. package/dist/components/charts/geo/FlowMap.d.ts +4 -4
  18. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +4 -3
  19. package/dist/components/charts/index.d.ts +2 -0
  20. package/dist/components/charts/network/ChordDiagram.d.ts +4 -3
  21. package/dist/components/charts/network/CirclePack.d.ts +3 -3
  22. package/dist/components/charts/network/ForceDirectedGraph.d.ts +3 -2
  23. package/dist/components/charts/network/OrbitDiagram.d.ts +6 -5
  24. package/dist/components/charts/network/SankeyDiagram.d.ts +4 -3
  25. package/dist/components/charts/network/TreeDiagram.d.ts +3 -3
  26. package/dist/components/charts/network/Treemap.d.ts +3 -3
  27. package/dist/components/charts/ordinal/BarChart.d.ts +24 -4
  28. package/dist/components/charts/ordinal/BoxPlot.d.ts +4 -3
  29. package/dist/components/charts/ordinal/DonutChart.d.ts +4 -3
  30. package/dist/components/charts/ordinal/DotPlot.d.ts +4 -3
  31. package/dist/components/charts/ordinal/FunnelChart.d.ts +4 -3
  32. package/dist/components/charts/ordinal/GaugeChart.d.ts +2 -1
  33. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +4 -3
  34. package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
  35. package/dist/components/charts/ordinal/LikertChart.d.ts +4 -3
  36. package/dist/components/charts/ordinal/PieChart.d.ts +4 -3
  37. package/dist/components/charts/ordinal/RidgelinePlot.d.ts +4 -3
  38. package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
  39. package/dist/components/charts/ordinal/SwarmPlot.d.ts +4 -3
  40. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -3
  41. package/dist/components/charts/ordinal/ViolinPlot.d.ts +4 -3
  42. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +7 -6
  43. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
  44. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +9 -6
  45. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +7 -6
  46. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -6
  47. package/dist/components/charts/shared/ChartError.d.ts +1 -2
  48. package/dist/components/charts/shared/annotationResolvers.d.ts +4 -3
  49. package/dist/components/charts/shared/annotationRules.d.ts +2 -1
  50. package/dist/components/charts/shared/colorUtils.d.ts +4 -3
  51. package/dist/components/charts/shared/datumTypes.d.ts +20 -0
  52. package/dist/components/charts/shared/diagnoseConfig.d.ts +2 -7
  53. package/dist/components/charts/shared/formatUtils.d.ts +4 -2
  54. package/dist/components/charts/shared/hooks.d.ts +27 -23
  55. package/dist/components/charts/shared/legendUtils.d.ts +3 -2
  56. package/dist/components/charts/shared/mergeShapeStyle.d.ts +43 -0
  57. package/dist/components/charts/shared/networkUtils.d.ts +7 -6
  58. package/dist/components/charts/shared/selectionUtils.d.ts +5 -4
  59. package/dist/components/charts/shared/statisticalOverlays.d.ts +14 -26
  60. package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +2 -2
  61. package/dist/components/charts/shared/statsTooltip.d.ts +3 -2
  62. package/dist/components/charts/shared/tooltipUtils.d.ts +7 -6
  63. package/dist/components/charts/shared/types.d.ts +22 -13
  64. package/dist/components/charts/shared/useChartSetup.d.ts +7 -6
  65. package/dist/components/charts/shared/useLikertAggregation.d.ts +18 -7
  66. package/dist/components/charts/shared/useOrdinalStreaming.d.ts +3 -2
  67. package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -1
  68. package/dist/components/charts/shared/validateChartData.d.ts +2 -1
  69. package/dist/components/charts/shared/validateProps.d.ts +2 -8
  70. package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
  71. package/dist/components/charts/xy/AreaChart.d.ts +4 -3
  72. package/dist/components/charts/xy/BubbleChart.d.ts +4 -3
  73. package/dist/components/charts/xy/CandlestickChart.d.ts +47 -0
  74. package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -3
  75. package/dist/components/charts/xy/Heatmap.d.ts +12 -7
  76. package/dist/components/charts/xy/LineChart.d.ts +4 -3
  77. package/dist/components/charts/xy/MinimapChart.d.ts +4 -4
  78. package/dist/components/charts/xy/MultiAxisLineChart.d.ts +5 -4
  79. package/dist/components/charts/xy/QuadrantChart.d.ts +4 -3
  80. package/dist/components/charts/xy/Scatterplot.d.ts +4 -3
  81. package/dist/components/charts/xy/ScatterplotMatrix.d.ts +3 -3
  82. package/dist/components/charts/xy/StackedAreaChart.d.ts +4 -3
  83. package/dist/components/data/transforms.d.ts +8 -7
  84. package/dist/components/export/chartConfig.d.ts +4 -3
  85. package/dist/components/export/selectionSerializer.d.ts +1 -1
  86. package/dist/components/geo/mergeData.d.ts +2 -1
  87. package/dist/components/realtime/BinAccumulator.d.ts +3 -2
  88. package/dist/components/realtime/renderers/types.d.ts +2 -1
  89. package/dist/components/realtime/renderers/waterfallRenderer.d.ts +2 -1
  90. package/dist/components/realtime/types.d.ts +25 -21
  91. package/dist/components/semiotic-themes.d.ts +2 -1
  92. package/dist/components/semiotic-xy.d.ts +2 -0
  93. package/dist/components/semiotic.d.ts +3 -3
  94. package/dist/components/server/animatedGif.d.ts +4 -18
  95. package/dist/components/server/renderToStaticSVG.d.ts +5 -4
  96. package/dist/components/server/serverChartConfigs.d.ts +2 -10
  97. package/dist/components/server/staticAnnotations.d.ts +2 -1
  98. package/dist/components/server/staticLegend.d.ts +2 -1
  99. package/dist/components/store/ObservationStore.d.ts +4 -3
  100. package/dist/components/store/SelectionStore.d.ts +4 -9
  101. package/dist/components/store/ThemeStore.d.ts +32 -4
  102. package/dist/components/store/TooltipStore.d.ts +6 -2
  103. package/dist/components/store/useSelection.d.ts +13 -9
  104. package/dist/components/stream/AccessibleDataTable.d.ts +5 -5
  105. package/dist/components/stream/CanvasHitTester.d.ts +2 -1
  106. package/dist/components/stream/DataSourceAdapter.d.ts +2 -1
  107. package/dist/components/stream/FocusRing.d.ts +1 -2
  108. package/dist/components/stream/GeoParticlePool.d.ts +2 -1
  109. package/dist/components/stream/GeoPipelineStore.d.ts +7 -6
  110. package/dist/components/stream/MarginalGraphics.d.ts +1 -2
  111. package/dist/components/stream/NetworkPipelineStore.d.ts +3 -2
  112. package/dist/components/stream/NetworkSVGOverlay.d.ts +21 -15
  113. package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
  114. package/dist/components/stream/OrdinalPipelineStore.d.ts +6 -5
  115. package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
  116. package/dist/components/stream/PipelineStore.d.ts +63 -28
  117. package/dist/components/stream/SVGOverlay.d.ts +10 -10
  118. package/dist/components/stream/SceneGraph.d.ts +6 -5
  119. package/dist/components/stream/StreamGeoFrame.d.ts +2 -1
  120. package/dist/components/stream/StreamNetworkFrame.d.ts +2 -1
  121. package/dist/components/stream/StreamOrdinalFrame.d.ts +2 -1
  122. package/dist/components/stream/StreamXYFrame.d.ts +2 -1
  123. package/dist/components/stream/XYBrushOverlay.d.ts +1 -21
  124. package/dist/components/stream/devDataAccessWarning.d.ts +2 -11
  125. package/dist/components/stream/geoTypes.d.ts +43 -24
  126. package/dist/components/stream/hoverUtils.d.ts +2 -1
  127. package/dist/components/stream/keyboardNav.d.ts +18 -6
  128. package/dist/components/stream/layouts/hierarchySceneBuilders.d.ts +4 -3
  129. package/dist/components/stream/layouts/hierarchyUtils.d.ts +4 -3
  130. package/dist/components/stream/networkTypes.d.ts +73 -47
  131. package/dist/components/stream/ordinalSceneBuilders/barFunnelScene.d.ts +1 -1
  132. package/dist/components/stream/ordinalSceneBuilders/barScene.d.ts +2 -2
  133. package/dist/components/stream/ordinalSceneBuilders/connectorScene.d.ts +1 -1
  134. package/dist/components/stream/ordinalSceneBuilders/pointScene.d.ts +2 -2
  135. package/dist/components/stream/ordinalSceneBuilders/statisticalScene.d.ts +4 -4
  136. package/dist/components/stream/ordinalSceneBuilders/swimlaneScene.d.ts +1 -1
  137. package/dist/components/stream/ordinalSceneBuilders/timelineScene.d.ts +1 -1
  138. package/dist/components/stream/ordinalSceneBuilders/types.d.ts +9 -8
  139. package/dist/components/stream/ordinalTypes.d.ts +65 -33
  140. package/dist/components/stream/pipelineDecay.d.ts +2 -1
  141. package/dist/components/stream/pipelinePulse.d.ts +2 -1
  142. package/dist/components/stream/pipelineTransitions.d.ts +16 -4
  143. package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
  144. package/dist/components/stream/types.d.ts +58 -17
  145. package/dist/components/stream/xySceneBuilders/areaScene.d.ts +3 -2
  146. package/dist/components/stream/xySceneBuilders/barScene.d.ts +2 -1
  147. package/dist/components/stream/xySceneBuilders/boundsScene.d.ts +2 -1
  148. package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +2 -1
  149. package/dist/components/stream/xySceneBuilders/emitPointNodes.d.ts +3 -2
  150. package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +2 -1
  151. package/dist/components/stream/xySceneBuilders/lineScene.d.ts +2 -1
  152. package/dist/components/stream/xySceneBuilders/mixedScene.d.ts +2 -1
  153. package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -1
  154. package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +2 -1
  155. package/dist/components/stream/xySceneBuilders/types.d.ts +35 -26
  156. package/dist/components/stream/xySceneBuilders/waterfallScene.d.ts +2 -1
  157. package/dist/components/types/marginType.d.ts +15 -0
  158. package/dist/geo.min.js +1 -1
  159. package/dist/geo.module.min.js +1 -1
  160. package/dist/network.min.js +1 -1
  161. package/dist/network.module.min.js +1 -1
  162. package/dist/ordinal.min.js +1 -1
  163. package/dist/ordinal.module.min.js +1 -1
  164. package/dist/realtime.min.js +1 -1
  165. package/dist/realtime.module.min.js +1 -1
  166. package/dist/semiotic-ai.min.js +1 -1
  167. package/dist/semiotic-ai.module.min.js +1 -1
  168. package/dist/semiotic-statisticalOverlays-Ckd_jM8z.js +1 -0
  169. package/dist/semiotic-themes.d.ts +2 -1
  170. package/dist/semiotic-themes.min.js +1 -1
  171. package/dist/semiotic-themes.module.min.js +1 -1
  172. package/dist/semiotic-utils.min.js +1 -1
  173. package/dist/semiotic-utils.module.min.js +1 -1
  174. package/dist/semiotic-xy.d.ts +2 -0
  175. package/dist/semiotic.d.ts +3 -3
  176. package/dist/semiotic.min.js +1 -1
  177. package/dist/semiotic.module.min.js +1 -1
  178. package/dist/server.min.js +1 -1
  179. package/dist/server.module.min.js +1 -1
  180. package/dist/test-utils/canvasMock.d.ts +10 -2
  181. package/dist/xy.min.js +1 -1
  182. package/dist/xy.module.min.js +1 -1
  183. package/package.json +38 -32
  184. package/dist/components/types/annotationTypes.d.ts +0 -145
  185. package/dist/components/types/generalTypes.d.ts +0 -241
  186. package/dist/components/types/interactionTypes.d.ts +0 -72
  187. package/dist/components/types/networkTypes.d.ts +0 -174
  188. package/dist/components/types/ordinalTypes.d.ts +0 -112
  189. package/dist/semiotic-statisticalOverlays-DGX_WWc5.js +0 -1
@@ -6,5 +6,5 @@ export type { ForecastResult } from "./statisticalOverlays";
6
6
  /** Duplicated here to avoid pulling in the heavy statisticalOverlays module at import time */
7
7
  export declare const SEGMENT_FIELD: "__forecastSegment";
8
8
  export declare function buildForecastLazy(...args: Parameters<typeof import("./statisticalOverlays")["buildForecast"]>): Promise<import("./statisticalOverlays").ForecastResult>;
9
- export declare function buildAnomalyAnnotationsLazy(...args: Parameters<typeof import("./statisticalOverlays")["buildAnomalyAnnotations"]>): Promise<Record<string, any>[]>;
10
- export declare function createSegmentLineStyleLazy(...args: Parameters<typeof import("./statisticalOverlays")["createSegmentLineStyle"]>): Promise<(d: Record<string, any>) => Record<string, any>>;
9
+ export declare function buildAnomalyAnnotationsLazy(...args: Parameters<typeof import("./statisticalOverlays")["buildAnomalyAnnotations"]>): Promise<import("./datumTypes").Datum[]>;
10
+ export declare function createSegmentLineStyleLazy(...args: Parameters<typeof import("./statisticalOverlays")["createSegmentLineStyle"]>): Promise<(d: import("./datumTypes").Datum) => import("./datumTypes").Datum>;
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "./datumTypes";
1
2
  import * as React from "react";
2
3
  /**
3
4
  * Shared tooltip for distribution charts (BoxPlot, ViolinPlot, RidgelinePlot).
@@ -7,5 +8,5 @@ import * as React from "react";
7
8
  */
8
9
  export declare function buildStatsTooltip(options?: {
9
10
  /** If provided, computes fallback stats from raw data when d.stats is missing */
10
- valueAccessor?: string | ((d: any) => number);
11
- }): (d: Record<string, any>) => React.ReactElement;
11
+ valueAccessor?: string | ((d: Datum) => number);
12
+ }): (d: Datum) => React.ReactElement;
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import type { HoverData } from "../../realtime/types";
3
+ import type { Datum } from "./datumTypes";
3
4
  export interface TooltipFieldConfig {
4
5
  label: string;
5
6
  accessor: string | ((d: any) => any);
@@ -17,9 +18,9 @@ export interface TooltipFieldConfig {
17
18
  * Extract a display name from an accessor.
18
19
  * Strings return themselves; functions return "value".
19
20
  */
20
- export declare function accessorName(acc: string | Function): string;
21
+ export declare function accessorName(acc: string | ((...args: any[]) => any)): string;
21
22
  export declare function formatVal(v: unknown): string;
22
- export declare function resolveValue(d: Record<string, any>, acc: string | ((d: Record<string, any>) => any)): unknown;
23
+ export declare function resolveValue(d: Datum, acc: string | ((d: Datum) => any)): unknown;
23
24
  /**
24
25
  * Build a default tooltipContent function for StreamXYFrame HOCs.
25
26
  * Receives HoverData ({ data, time, value, x, y }) and renders
@@ -34,13 +35,13 @@ export declare function buildDefaultTooltip(fields: TooltipFieldConfig[]): (hove
34
35
  * (PieChart/DonutChart wrap data in arrays). Default: `d.data || d`.
35
36
  */
36
37
  export declare function buildOrdinalTooltip({ categoryAccessor, valueAccessor, groupAccessor, groupLabel, pieData, valueFormat, }: {
37
- categoryAccessor: string | ((d: any) => any);
38
- valueAccessor: string | ((d: any) => any);
39
- groupAccessor?: string | ((d: any) => any);
38
+ categoryAccessor: string | ((d: Datum) => any);
39
+ valueAccessor: string | ((d: Datum) => any);
40
+ groupAccessor?: string | ((d: Datum) => any);
40
41
  groupLabel?: string;
41
42
  pieData?: boolean;
42
43
  /** Same formatter the HOC passes to the value axis. Threaded here so the
43
44
  * default tooltip shows values consistently with the axis ("$450k", not
44
45
  * "450000"). Override by passing a custom `tooltip` prop. */
45
46
  valueFormat?: (v: any, ...rest: any[]) => React.ReactNode;
46
- }): (d: Record<string, any>) => React.ReactNode;
47
+ }): (d: Datum) => React.ReactNode;
@@ -1,7 +1,8 @@
1
1
  import type React from "react";
2
- import type { MarginType } from "../../types/generalTypes";
2
+ import type { PartialMargin } from "../../types/marginType";
3
3
  import type { OnObservationCallback } from "../../store/ObservationStore";
4
4
  import type { AnimateProp } from "../../stream/pipelineTransitionUtils";
5
+ import type { Datum } from "./datumTypes";
5
6
  /**
6
7
  * Selection consumption config — makes this chart react to a named selection
7
8
  */
@@ -11,9 +12,9 @@ export interface SelectionConfig {
11
12
  /** Opacity for unselected elements (default 0.2) */
12
13
  unselectedOpacity?: number;
13
14
  /** Style overrides for unselected elements */
14
- unselectedStyle?: Record<string, any>;
15
+ unselectedStyle?: Datum;
15
16
  /** Style overrides for selected elements */
16
- selectedStyle?: Record<string, any>;
17
+ selectedStyle?: Datum;
17
18
  }
18
19
  /**
19
20
  * Linked hover config
@@ -52,8 +53,10 @@ export interface BaseChartProps {
52
53
  width?: number;
53
54
  /** Chart height in pixels. Default: 400 */
54
55
  height?: number;
55
- /** Margin around the chart. Can be number (same on all sides) or object specifying each side */
56
- margin?: MarginType;
56
+ /** Margin around the chart. Accepts a number (same on all sides) or an object
57
+ * with any subset of `top`/`bottom`/`left`/`right`. Missing sides fall back
58
+ * to the chart-mode defaults. */
59
+ margin?: PartialMargin;
57
60
  /** Auto-match width to parent container. Default: false */
58
61
  responsiveWidth?: boolean;
59
62
  /** Auto-match height to parent container (requires parent with explicit height). Default: false */
@@ -80,6 +83,12 @@ export interface BaseChartProps {
80
83
  /** Uniform fill color for all data marks. Overrides colorScheme and theme categorical.
81
84
  * For per-category coloring, use `colorBy` + `colorScheme` instead. */
82
85
  color?: string;
86
+ /** Uniform stroke color for all data marks. Accepts a CSS variable. */
87
+ stroke?: string;
88
+ /** Uniform stroke width in pixels. */
89
+ strokeWidth?: number;
90
+ /** Uniform opacity for all data marks (0–1). Distinct from `--semiotic-selection-opacity` which only dims non-selected marks. */
91
+ opacity?: number;
83
92
  /** Accessible description overriding the auto-generated aria-label on the chart container.
84
93
  * Should describe the chart's purpose or content for screen reader users. */
85
94
  description?: string;
@@ -99,9 +108,9 @@ export interface BaseChartProps {
99
108
  /** Max pixel distance for hover/click hit testing. Default 30. Increase for sparse charts, decrease for dense ones. */
100
109
  hoverRadius?: number;
101
110
  /** ID accessor for remove()/update() on XY charts. Extracts a unique identifier from each datum. */
102
- pointIdAccessor?: string | ((d: any) => string);
111
+ pointIdAccessor?: string | ((d: Datum) => string);
103
112
  /** ID accessor for remove()/update() on ordinal charts. Extracts a unique identifier from each datum. */
104
- dataIdAccessor?: string | ((d: any) => string);
113
+ dataIdAccessor?: string | ((d: Datum) => string);
105
114
  /** Visual emphasis level for dashboard hierarchy. "primary" spans two columns in ChartGrid. */
106
115
  emphasis?: "primary" | "secondary";
107
116
  /** Enable declarative bounded animation (enter/exit/update transitions + intro).
@@ -118,9 +127,9 @@ export interface AxisConfig {
118
127
  /** Label for the y-axis */
119
128
  yLabel?: string;
120
129
  /** Format function for x-axis tick labels. Return string or ReactNode for custom rendering. */
121
- xFormat?: (d: any, index?: number, allTicks?: number[]) => string | React.ReactNode;
130
+ xFormat?: (d: number | Date | string, index?: number, allTicks?: number[]) => string | React.ReactNode;
122
131
  /** Format function for y-axis tick labels. Return string or ReactNode for custom rendering. */
123
- yFormat?: (d: any) => string | React.ReactNode;
132
+ yFormat?: (d: number | Date | string) => string | React.ReactNode;
124
133
  }
125
134
  /**
126
135
  * Category formatting for ordinal chart tick labels.
@@ -134,14 +143,14 @@ export type CategoryFormatFn = (label: string, index?: number) => string | React
134
143
  export type Accessor<T = any> = string | ((d: any, i?: number) => T);
135
144
  /**
136
145
  * Generic accessor type that provides autocomplete when TDatum is specified.
137
- * Uses Record<string, any> in the function param so HOC charts can pass
146
+ * Uses Datum in the function param so HOC charts can pass
138
147
  * accessors to Stream Frames without contravariance errors under strict mode.
139
148
  */
140
- export type ChartAccessor<TDatum, T> = (keyof TDatum & string) | ((d: Record<string, any>, i?: number) => T);
149
+ export type ChartAccessor<TDatum, T> = (keyof TDatum & string) | ((d: Datum, i?: number) => T);
141
150
  /**
142
151
  * Color configuration
143
152
  */
144
- export interface ColorConfig<TDatum = Record<string, any>> {
153
+ export interface ColorConfig<TDatum = Datum> {
145
154
  /** Field name or function to determine color */
146
155
  colorBy?: ChartAccessor<TDatum, string>;
147
156
  /** Color scheme name (e.g., "blues", "category10") */
@@ -152,7 +161,7 @@ export interface ColorConfig<TDatum = Record<string, any>> {
152
161
  /**
153
162
  * Size configuration
154
163
  */
155
- export interface SizeConfig<TDatum = Record<string, any>> {
164
+ export interface SizeConfig<TDatum = Datum> {
156
165
  /** Field name or function to determine size */
157
166
  sizeBy?: ChartAccessor<TDatum, number>;
158
167
  /** Min and max size range */
@@ -1,8 +1,9 @@
1
+ import type { Datum } from "./datumTypes";
1
2
  import { useChartLegendAndMargin, useLegendInteraction, DEFAULT_COLOR } from "./hooks";
2
3
  import type { LegendInteractionMode, LegendPosition } from "./hooks";
3
4
  import type { Accessor, SelectionConfig, LinkedHoverProp } from "./types";
4
5
  import type { OnObservationCallback } from "../../store/ObservationStore";
5
- import type { MarginType } from "../../types/generalTypes";
6
+ import type { PartialMargin } from "../../types/marginType";
6
7
  import type { SelectionHookResult } from "./selectionUtils";
7
8
  import type { ReactElement, ReactNode } from "react";
8
9
  /**
@@ -14,7 +15,7 @@ import type { ReactElement, ReactNode } from "react";
14
15
  */
15
16
  export interface ChartSetupInput {
16
17
  /** The data array used for color scale and category extraction */
17
- data: Array<Record<string, any>>;
18
+ data: Array<Datum>;
18
19
  /** The original data prop (may be undefined) — used for empty-state check */
19
20
  rawData: unknown[] | undefined;
20
21
  /** The color-by accessor (may be an "actual" colorBy derived from stackBy/groupBy/categoryAccessor) */
@@ -42,7 +43,7 @@ export interface ChartSetupInput {
42
43
  /** Show legend override */
43
44
  showLegend: boolean | undefined;
44
45
  /** User-provided margin */
45
- userMargin: MarginType | undefined;
46
+ userMargin: PartialMargin | undefined;
46
47
  /** Mode-resolved margin defaults */
47
48
  marginDefaults: {
48
49
  top: number;
@@ -81,9 +82,9 @@ export interface ChartSetupResult {
81
82
  /** The active cross-chart selection hook (before legend merge) */
82
83
  activeSelectionHook: SelectionHookResult | null;
83
84
  /** Custom hover behavior callback for the frame */
84
- customHoverBehavior: (d: Record<string, any> | null) => void;
85
+ customHoverBehavior: (d: Datum | null) => void;
85
86
  /** Custom click behavior callback for the frame */
86
- customClickBehavior: (d: Record<string, any> | null) => void;
87
+ customClickBehavior: (d: Datum | null) => void;
87
88
  /** Legend config (or undefined if no legend) */
88
89
  legend: ReturnType<typeof useChartLegendAndMargin>["legend"];
89
90
  /** Computed margin with legend-aware adjustments */
@@ -98,7 +99,7 @@ export interface ChartSetupResult {
98
99
  /** If non-null, the HOC should return this element (loading or empty state) */
99
100
  earlyReturn: ReactElement | null;
100
101
  /** Props to spread into the stream frame for legend behavior */
101
- legendBehaviorProps: Record<string, any>;
102
+ legendBehaviorProps: Datum;
102
103
  /** Crosshair props to spread into StreamXYFrame when linkedHover mode is "x-position" */
103
104
  crosshairProps: {
104
105
  linkedCrosshairName: string;
@@ -1,5 +1,6 @@
1
1
  import type { RefObject, MutableRefObject } from "react";
2
2
  import type { StreamOrdinalFrameHandle } from "../../stream/ordinalTypes";
3
+ import type { Datum } from "./datumTypes";
3
4
  export interface AggregatedRow {
4
5
  __likertCategory: string;
5
6
  /** Stacking key — may be sentinel value for neutral halves */
@@ -13,22 +14,32 @@ export interface AggregatedRow {
13
14
  /** Sentinel level names for the neutral split halves */
14
15
  export declare const NEUTRAL_NEG = "__likert_neutral_neg";
15
16
  export declare const NEUTRAL_POS = "__likert_neutral_pos";
16
- export declare function resolveAccessorFn<T>(accessor: string | ((d: any) => T) | undefined, fallback: string): (d: any) => T;
17
+ export declare function resolveAccessorFn<T>(accessor: string | ((d: Datum) => T) | undefined, fallback: string): (d: Datum) => T;
17
18
  /**
18
19
  * Generate a diverging color scheme for N levels.
20
+ *
21
+ * Two paths:
22
+ * • `themeDivergingSchemeName` supplied → sample the named d3-scale-chromatic
23
+ * diverging interpolator at N evenly-spaced positions. Gives consumers the
24
+ * ability to change the palette by changing the active theme's
25
+ * `colors.diverging` string, without touching chart code.
26
+ * • No scheme name → the original Carbon-inspired hardcoded palette
27
+ * (preserves exact pre-theming behavior for consumers without a
28
+ * ThemeProvider, and for custom themes that don't declare `diverging`).
29
+ *
19
30
  * Interpolates from red → gray → blue for odd, red → blue for even.
20
31
  */
21
- export declare function defaultDivergingScheme(n: number): string[];
22
- export declare function aggregateData(data: any[], levels: string[], getCat: (d: any) => string, getScore: ((d: any) => number) | null, getLevel: ((d: any) => string) | null, getCount: ((d: any) => number) | null): AggregatedRow[];
32
+ export declare function defaultDivergingScheme(n: number, themeDivergingSchemeName?: string): string[];
33
+ export declare function aggregateData(data: any[], levels: string[], getCat: (d: Datum) => string, getScore: ((d: Datum) => number) | null, getLevel: ((d: Datum) => string) | null, getCount: ((d: Datum) => number) | null): AggregatedRow[];
23
34
  export declare function toDivergingValues(rows: AggregatedRow[], levels: string[]): AggregatedRow[];
24
35
  export declare function orderForDiverging(rows: AggregatedRow[], levels: string[]): AggregatedRow[];
25
36
  interface UseLikertAggregationConfig {
26
37
  data: any[] | undefined;
27
38
  levels: string[];
28
- categoryAccessor?: string | ((d: any) => string);
29
- valueAccessor?: string | ((d: any) => number);
30
- levelAccessor?: string | ((d: any) => string);
31
- countAccessor?: string | ((d: any) => number);
39
+ categoryAccessor?: string | ((d: Datum) => string);
40
+ valueAccessor?: string | ((d: Datum) => number);
41
+ levelAccessor?: string | ((d: Datum) => string);
42
+ countAccessor?: string | ((d: Datum) => number);
32
43
  isDiverging: boolean;
33
44
  frameRef: RefObject<StreamOrdinalFrameHandle | null>;
34
45
  }
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "./datumTypes";
1
2
  import type { Ref, RefObject } from "react";
2
3
  import type { StreamOrdinalFrameHandle } from "../../stream/ordinalTypes";
3
4
  import type { RealtimeFrameHandle } from "../../realtime/types";
@@ -20,7 +21,7 @@ interface UseOrdinalStreamingConfig {
20
21
  legendPosition?: LegendPosition;
21
22
  /** Results from useChartSetup — needed for legend/margin merge */
22
23
  setup: {
23
- legendBehaviorProps: Record<string, any>;
24
+ legendBehaviorProps: Datum;
24
25
  legendPosition: LegendPosition;
25
26
  margin: {
26
27
  top: number;
@@ -32,7 +33,7 @@ interface UseOrdinalStreamingConfig {
32
33
  }
33
34
  interface UseOrdinalStreamingResult {
34
35
  /** Legend props merged with streaming legend (spread into streamProps) */
35
- effectiveLegendProps: Record<string, any>;
36
+ effectiveLegendProps: Datum;
36
37
  /** Margin merged with streaming legend margin adjustments */
37
38
  effectiveMargin: {
38
39
  top: number;
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "./datumTypes";
1
2
  import type { Accessor } from "./types";
2
3
  import type { LegendPosition } from "./hooks";
3
4
  /**
@@ -27,7 +28,7 @@ export declare function useStreamingLegend({ isPushMode, colorBy, colorScheme, s
27
28
  /** Legend position */
28
29
  legendPosition?: LegendPosition;
29
30
  }): {
30
- wrapPush: (originalPush: (d: any) => void) => (datum: any) => void;
31
+ wrapPush: (originalPush: (d: Datum) => void) => (datum: Datum) => void;
31
32
  wrapPushMany: (originalPushMany: (d: any[]) => void) => (data: any[]) => void;
32
33
  resetCategories: () => void;
33
34
  streamingLegend: {
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "./datumTypes";
1
2
  /**
2
3
  * Validates chart data and accessors at render time.
3
4
  * Returns null if data is valid, or an error message string if not.
@@ -13,7 +14,7 @@ interface ArrayDataValidation {
13
14
  componentName: string;
14
15
  data: any[] | undefined | null;
15
16
  accessors?: Record<string, AccessorLike | undefined>;
16
- requiredProps?: Record<string, any>;
17
+ requiredProps?: Datum;
17
18
  }
18
19
  interface ObjectDataValidation {
19
20
  componentName: string;
@@ -1,10 +1,4 @@
1
- /**
2
- * Static props validation for AI code-generation pipelines.
3
- *
4
- * Validates component name, required props, prop types, enum values,
5
- * unknown props (typo detection), and data shape via the existing
6
- * validateArrayData / validateObjectData / validateNetworkData helpers.
7
- */
1
+ import type { Datum } from "./datumTypes";
8
2
  import { VALIDATION_MAP } from "./validationMap";
9
3
  export { VALIDATION_MAP };
10
4
  export interface ValidationResult {
@@ -33,4 +27,4 @@ export interface ComponentSpec {
33
27
  * Checks: component name, required props, prop types, enum values,
34
28
  * unknown prop names (typo detection), and data shape + accessor validity.
35
29
  */
36
- export declare function validateProps(componentName: string, props: Record<string, any>): ValidationResult;
30
+ export declare function validateProps(componentName: string, props: Datum): ValidationResult;
@@ -11,7 +11,7 @@ interface SafeRenderProps {
11
11
  * If the chart throws during render, runs diagnoseConfig to produce
12
12
  * actionable fix suggestions alongside the error message.
13
13
  */
14
- export declare function SafeRender({ componentName, width, height, chartProps, children }: SafeRenderProps): React.JSX.Element;
14
+ export declare function SafeRender({ componentName, width, height, chartProps, children }: SafeRenderProps): import("react/jsx-runtime").JSX.Element;
15
15
  /**
16
16
  * Renders a "No data available" placeholder when data is empty.
17
17
  * Returns null when data is present or emptyContent is `false`.
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../shared/datumTypes";
1
2
  import * as React from "react";
2
3
  import type { StreamXYFrameProps } from "../../stream/types";
3
4
  import type { RealtimeFrameHandle } from "../../realtime/types";
@@ -7,7 +8,7 @@ import { type TooltipProp } from "../../Tooltip/Tooltip";
7
8
  /**
8
9
  * AreaChart component props
9
10
  */
10
- export interface AreaChartProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps, AxisConfig {
11
+ export interface AreaChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
11
12
  /**
12
13
  * Array of data points, grouped by category.
13
14
  * @example
@@ -156,7 +157,7 @@ export interface AreaChartProps<TDatum extends Record<string, any> = Record<stri
156
157
  /**
157
158
  * Annotation objects to render on the chart
158
159
  */
159
- annotations?: Record<string, any>[];
160
+ annotations?: Datum[];
160
161
  /**
161
162
  * Additional StreamXYFrame props for advanced customization
162
163
  * For full control, consider using StreamXYFrame directly
@@ -189,6 +190,6 @@ export interface AreaChartProps<TDatum extends Record<string, any> = Record<stri
189
190
  * ```
190
191
  */
191
192
  export declare const AreaChart: {
192
- <TDatum extends Record<string, any> = Record<string, any>>(props: AreaChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
193
+ <TDatum extends Datum = Datum>(props: AreaChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
193
194
  displayName?: string;
194
195
  };
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../shared/datumTypes";
1
2
  import * as React from "react";
2
3
  import type { StreamXYFrameProps, MarginalGraphicsConfig } from "../../stream/types";
3
4
  import type { RealtimeFrameHandle } from "../../realtime/types";
@@ -7,7 +8,7 @@ import { type TooltipProp } from "../../Tooltip/Tooltip";
7
8
  /**
8
9
  * BubbleChart component props
9
10
  */
10
- export interface BubbleChartProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps, AxisConfig {
11
+ export interface BubbleChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
11
12
  /**
12
13
  * Array of data points. Each point should have x, y, and size properties.
13
14
  * @example
@@ -108,7 +109,7 @@ export interface BubbleChartProps<TDatum extends Record<string, any> = Record<st
108
109
  /**
109
110
  * Annotation objects to render on the chart
110
111
  */
111
- annotations?: Record<string, any>[];
112
+ annotations?: Datum[];
112
113
  /**
113
114
  * Additional StreamXYFrame props for advanced customization
114
115
  * For full control, consider using StreamXYFrame directly
@@ -178,6 +179,6 @@ export interface BubbleChartProps<TDatum extends Record<string, any> = Record<st
178
179
  * @returns Rendered bubble chart
179
180
  */
180
181
  export declare const BubbleChart: {
181
- <TDatum extends Record<string, any> = Record<string, any>>(props: BubbleChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
182
+ <TDatum extends Datum = Datum>(props: BubbleChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
182
183
  displayName?: string;
183
184
  };
@@ -0,0 +1,47 @@
1
+ import type { Datum } from "../shared/datumTypes";
2
+ import * as React from "react";
3
+ import type { StreamXYFrameProps } from "../../stream/types";
4
+ import type { RealtimeFrameHandle } from "../../realtime/types";
5
+ import type { CandlestickStyle } from "../../stream/types";
6
+ import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types";
7
+ import { type TooltipProp } from "../../Tooltip/Tooltip";
8
+ export interface CandlestickChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
9
+ data?: TDatum[];
10
+ xAccessor?: ChartAccessor<TDatum, number>;
11
+ /** Required — upper bound (candlestick high, or range top) */
12
+ highAccessor?: ChartAccessor<TDatum, number>;
13
+ /** Required — lower bound (candlestick low, or range bottom) */
14
+ lowAccessor?: ChartAccessor<TDatum, number>;
15
+ /** Optional — when paired with closeAccessor, renders OHLC candlesticks. Omit both to render a range chart. */
16
+ openAccessor?: ChartAccessor<TDatum, number>;
17
+ /** Optional — see openAccessor */
18
+ closeAccessor?: ChartAccessor<TDatum, number>;
19
+ candlestickStyle?: CandlestickStyle;
20
+ tooltip?: TooltipProp;
21
+ annotations?: Datum[];
22
+ enableHover?: boolean;
23
+ showGrid?: boolean;
24
+ frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
25
+ }
26
+ /**
27
+ * CandlestickChart — OHLC bars, or a range chart when open/close are omitted.
28
+ *
29
+ * Pass all four of `open/high/low/close` for classic candlesticks. Pass only
30
+ * `high/low` to degrade into a range/dumbbell visualization (PipelineStore
31
+ * auto-detects this via `candlestickRangeMode`).
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * // Full OHLC
36
+ * <CandlestickChart data={data} xAccessor="date"
37
+ * openAccessor="o" highAccessor="h" lowAccessor="l" closeAccessor="c" />
38
+ *
39
+ * // Range-only (e.g. min/max over a window)
40
+ * <CandlestickChart data={data} xAccessor="date"
41
+ * highAccessor="max" lowAccessor="min" />
42
+ * ```
43
+ */
44
+ export declare const CandlestickChart: {
45
+ <TDatum extends Datum = Datum>(props: CandlestickChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
46
+ displayName?: string;
47
+ };
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../shared/datumTypes";
1
2
  import * as React from "react";
2
3
  import type { StreamXYFrameProps } from "../../stream/types";
3
4
  import type { RealtimeFrameHandle } from "../../realtime/types";
@@ -7,7 +8,7 @@ import type { LegendInteractionMode } from "../shared/hooks";
7
8
  /**
8
9
  * ConnectedScatterplot component props
9
10
  */
10
- export interface ConnectedScatterplotProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps, AxisConfig {
11
+ export interface ConnectedScatterplotProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
11
12
  /** Array of data points. Each point needs x and y properties. Omit when using push API. */
12
13
  data?: TDatum[];
13
14
  /** Field name or function to access x values @default "x" */
@@ -35,7 +36,7 @@ export interface ConnectedScatterplotProps<TDatum extends Record<string, any> =
35
36
  /** Legend interaction mode */
36
37
  legendInteraction?: LegendInteractionMode;
37
38
  /** Annotation objects to render on the chart */
38
- annotations?: Record<string, any>[];
39
+ annotations?: Datum[];
39
40
  /** Additional StreamXYFrame props for advanced customization */
40
41
  frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
41
42
  }
@@ -59,6 +60,6 @@ export interface ConnectedScatterplotProps<TDatum extends Record<string, any> =
59
60
  * ```
60
61
  */
61
62
  export declare const ConnectedScatterplot: {
62
- <TDatum extends Record<string, any> = Record<string, any>>(props: ConnectedScatterplotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
63
+ <TDatum extends Datum = Datum>(props: ConnectedScatterplotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
63
64
  displayName?: string;
64
65
  };
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../shared/datumTypes";
1
2
  import * as React from "react";
2
3
  import type { StreamXYFrameProps } from "../../stream/types";
3
4
  import type { RealtimeFrameHandle } from "../../realtime/types";
@@ -7,7 +8,7 @@ import { type TooltipProp } from "../../Tooltip/Tooltip";
7
8
  /**
8
9
  * Heatmap component props
9
10
  */
10
- export interface HeatmapProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps {
11
+ export interface HeatmapProps<TDatum extends Datum = Datum> extends BaseChartProps {
11
12
  /**
12
13
  * Array of data points with x, y, and value properties.
13
14
  * @example
@@ -46,12 +47,16 @@ export interface HeatmapProps<TDatum extends Record<string, any> = Record<string
46
47
  /**
47
48
  * Format function for y-axis tick labels
48
49
  */
49
- yFormat?: (d: any) => string;
50
+ yFormat?: (d: number | Date | string) => string;
50
51
  /**
51
- * Color scheme for the heatmap
52
- * @default "blues"
52
+ * Color scheme for the heatmap — any d3-scale-chromatic sequential scheme
53
+ * name, `"custom"` (paired with `customColorScale`), or any scheme name
54
+ * emitted by a SemioticTheme's `colors.sequential`. When unset, falls back
55
+ * to the active theme's sequential scheme, then to `"blues"`.
56
+ *
57
+ * @default `theme.colors.sequential` (or `"blues"` when no ThemeProvider)
53
58
  */
54
- colorScheme?: "blues" | "reds" | "greens" | "viridis" | "custom";
59
+ colorScheme?: "blues" | "reds" | "greens" | "viridis" | "oranges" | "purples" | "greys" | "plasma" | "inferno" | "magma" | "cividis" | "turbo" | "custom" | (string & {});
55
60
  /**
56
61
  * Custom color scale (used when colorScheme is "custom")
57
62
  * @example
@@ -108,7 +113,7 @@ export interface HeatmapProps<TDatum extends Record<string, any> = Record<string
108
113
  /**
109
114
  * Annotation objects to render on the chart
110
115
  */
111
- annotations?: Record<string, any>[];
116
+ annotations?: Datum[];
112
117
  /**
113
118
  * Additional StreamXYFrame props for advanced customization
114
119
  * For full control, consider using StreamXYFrame directly
@@ -174,6 +179,6 @@ export interface HeatmapProps<TDatum extends Record<string, any> = Record<string
174
179
  * @returns Rendered heatmap
175
180
  */
176
181
  export declare const Heatmap: {
177
- <TDatum extends Record<string, any> = Record<string, any>>(props: HeatmapProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
182
+ <TDatum extends Datum = Datum>(props: HeatmapProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
178
183
  displayName?: string;
179
184
  };
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../shared/datumTypes";
1
2
  import * as React from "react";
2
3
  import type { StreamXYFrameProps } from "../../stream/types";
3
4
  import type { RealtimeFrameHandle } from "../../realtime/types";
@@ -8,7 +9,7 @@ import type { AnomalyConfig, ForecastConfig } from "../shared/statisticalOverlay
8
9
  /**
9
10
  * LineChart component props
10
11
  */
11
- export interface LineChartProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps, AxisConfig {
12
+ export interface LineChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
12
13
  /**
13
14
  * Array of data points or array of line objects with coordinates.
14
15
  * @example
@@ -150,7 +151,7 @@ export interface LineChartProps<TDatum extends Record<string, any> = Record<stri
150
151
  /**
151
152
  * Annotation objects to render on the chart
152
153
  */
153
- annotations?: Record<string, any>[];
154
+ annotations?: Datum[];
154
155
  /**
155
156
  * Place category labels directly at line endpoints instead of using a separate legend.
156
157
  * When true, auto-hides the legend (override with `showLegend: true`).
@@ -262,6 +263,6 @@ export interface LineChartProps<TDatum extends Record<string, any> = Record<stri
262
263
  * @returns Rendered line chart
263
264
  */
264
265
  export declare const LineChart: {
265
- <TDatum extends Record<string, any> = Record<string, any>>(props: LineChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
266
+ <TDatum extends Datum = Datum>(props: LineChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
266
267
  displayName?: string;
267
268
  };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type { Datum } from "../shared/datumTypes";
2
2
  import type { StreamXYFrameProps } from "../../stream/types";
3
3
  import type { LegendPosition } from "../shared/hooks";
4
4
  import type { BaseChartProps, AxisConfig, ChartAccessor } from "../shared/types";
@@ -14,7 +14,7 @@ export interface MinimapConfig {
14
14
  left?: number;
15
15
  };
16
16
  /** Line style override for the minimap */
17
- lineStyle?: (d: Record<string, any>) => Record<string, any>;
17
+ lineStyle?: (d: Datum) => Datum;
18
18
  /** Show axes in minimap (default: false) */
19
19
  showAxes?: boolean;
20
20
  /** Background color for minimap */
@@ -22,7 +22,7 @@ export interface MinimapConfig {
22
22
  /** Brush direction: "x" (default) or "y" */
23
23
  brushDirection?: "x" | "y";
24
24
  }
25
- export interface MinimapChartProps<TDatum extends Record<string, any> = Record<string, any>> extends Omit<BaseChartProps, "onClick" | "onObservation" | "selection" | "linkedHover">, AxisConfig {
25
+ export interface MinimapChartProps<TDatum extends Datum = Datum> extends Omit<BaseChartProps, "onClick" | "onObservation" | "selection" | "linkedHover">, AxisConfig {
26
26
  /** Array of data points or line objects with coordinates */
27
27
  data: TDatum[];
28
28
  /** X accessor (default: "x") */
@@ -70,7 +70,7 @@ export interface MinimapChartProps<TDatum extends Record<string, any> = Record<s
70
70
  /** Additional StreamXYFrame props */
71
71
  frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
72
72
  }
73
- export declare function MinimapChart<TDatum extends Record<string, any> = Record<string, any>>(props: MinimapChartProps<TDatum>): React.JSX.Element;
73
+ export declare function MinimapChart<TDatum extends Datum = Datum>(props: MinimapChartProps<TDatum>): import("react/jsx-runtime").JSX.Element;
74
74
  export declare namespace MinimapChart {
75
75
  var displayName: string;
76
76
  }
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../shared/datumTypes";
1
2
  import * as React from "react";
2
3
  import type { StreamXYFrameProps, CurveType } from "../../stream/types";
3
4
  import type { RealtimeFrameHandle } from "../../realtime/types";
@@ -7,7 +8,7 @@ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
7
8
  /**
8
9
  * Configuration for a single series in a MultiAxisLineChart.
9
10
  */
10
- export interface MultiAxisSeriesConfig<TDatum = Record<string, any>> {
11
+ export interface MultiAxisSeriesConfig<TDatum = Datum> {
11
12
  /** Field name or function to access y values for this series */
12
13
  yAccessor: ChartAccessor<TDatum, number>;
13
14
  /** Axis label for this series */
@@ -23,7 +24,7 @@ export interface MultiAxisSeriesConfig<TDatum = Record<string, any>> {
23
24
  /**
24
25
  * MultiAxisLineChart component props
25
26
  */
26
- export interface MultiAxisLineChartProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps, AxisConfig {
27
+ export interface MultiAxisLineChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
27
28
  /** Array of data points shared by both series */
28
29
  data?: TDatum[];
29
30
  /** Field name or function to access x values @default "x" */
@@ -50,7 +51,7 @@ export interface MultiAxisLineChartProps<TDatum extends Record<string, any> = Re
50
51
  /** Legend position */
51
52
  legendPosition?: LegendPosition;
52
53
  /** Annotations */
53
- annotations?: Record<string, any>[];
54
+ annotations?: Datum[];
54
55
  /** Additional StreamXYFrame props */
55
56
  frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
56
57
  }
@@ -66,6 +67,6 @@ export interface MultiAxisLineChartProps<TDatum extends Record<string, any> = Re
66
67
  * multi-line chart with a dev-mode console warning.
67
68
  */
68
69
  export declare const MultiAxisLineChart: {
69
- <TDatum extends Record<string, any> = Record<string, any>>(props: MultiAxisLineChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
70
+ <TDatum extends Datum = Datum>(props: MultiAxisLineChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
70
71
  displayName?: string;
71
72
  };