semiotic 3.4.0 → 3.4.1
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.
- package/CLAUDE.md +16 -3
- package/ai/schema.json +42 -1
- package/ai/system-prompt.md +4 -0
- package/dist/components/Annotation.d.ts +42 -2
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/ChartGrid.d.ts +1 -1
- package/dist/components/ContextLayout.d.ts +1 -1
- package/dist/components/DataSummaryContext.d.ts +1 -1
- package/dist/components/DetailsPanel.d.ts +3 -2
- package/dist/components/Legend.d.ts +2 -3
- package/dist/components/LinkedCharts.d.ts +1 -1
- package/dist/components/ThemeProvider.d.ts +1 -1
- package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -3
- package/dist/components/charts/geo/ChoroplethMap.d.ts +4 -4
- package/dist/components/charts/geo/DistanceCartogram.d.ts +5 -4
- package/dist/components/charts/geo/FlowMap.d.ts +4 -4
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +4 -3
- package/dist/components/charts/index.d.ts +2 -0
- package/dist/components/charts/network/ChordDiagram.d.ts +4 -3
- package/dist/components/charts/network/CirclePack.d.ts +3 -3
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +3 -2
- package/dist/components/charts/network/OrbitDiagram.d.ts +6 -5
- package/dist/components/charts/network/SankeyDiagram.d.ts +4 -3
- package/dist/components/charts/network/TreeDiagram.d.ts +3 -3
- package/dist/components/charts/network/Treemap.d.ts +3 -3
- package/dist/components/charts/ordinal/BarChart.d.ts +24 -4
- package/dist/components/charts/ordinal/BoxPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/DonutChart.d.ts +4 -3
- package/dist/components/charts/ordinal/DotPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/FunnelChart.d.ts +4 -3
- package/dist/components/charts/ordinal/GaugeChart.d.ts +2 -1
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
- package/dist/components/charts/ordinal/LikertChart.d.ts +4 -3
- package/dist/components/charts/ordinal/PieChart.d.ts +4 -3
- package/dist/components/charts/ordinal/RidgelinePlot.d.ts +4 -3
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -3
- package/dist/components/charts/ordinal/ViolinPlot.d.ts +4 -3
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +9 -6
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -6
- package/dist/components/charts/shared/ChartError.d.ts +1 -2
- package/dist/components/charts/shared/annotationResolvers.d.ts +4 -3
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- package/dist/components/charts/shared/colorUtils.d.ts +4 -3
- package/dist/components/charts/shared/datumTypes.d.ts +20 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +2 -7
- package/dist/components/charts/shared/formatUtils.d.ts +4 -2
- package/dist/components/charts/shared/hooks.d.ts +27 -23
- package/dist/components/charts/shared/legendUtils.d.ts +3 -2
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +43 -0
- package/dist/components/charts/shared/networkUtils.d.ts +7 -6
- package/dist/components/charts/shared/selectionUtils.d.ts +5 -4
- package/dist/components/charts/shared/statisticalOverlays.d.ts +14 -26
- package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +2 -2
- package/dist/components/charts/shared/statsTooltip.d.ts +3 -2
- package/dist/components/charts/shared/tooltipUtils.d.ts +7 -6
- package/dist/components/charts/shared/types.d.ts +22 -13
- package/dist/components/charts/shared/useChartSetup.d.ts +7 -6
- package/dist/components/charts/shared/useLikertAggregation.d.ts +18 -7
- package/dist/components/charts/shared/useOrdinalStreaming.d.ts +3 -2
- package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -1
- package/dist/components/charts/shared/validateChartData.d.ts +2 -1
- package/dist/components/charts/shared/validateProps.d.ts +2 -8
- package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +4 -3
- package/dist/components/charts/xy/BubbleChart.d.ts +4 -3
- package/dist/components/charts/xy/CandlestickChart.d.ts +47 -0
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -3
- package/dist/components/charts/xy/Heatmap.d.ts +12 -7
- package/dist/components/charts/xy/LineChart.d.ts +4 -3
- package/dist/components/charts/xy/MinimapChart.d.ts +4 -4
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +5 -4
- package/dist/components/charts/xy/QuadrantChart.d.ts +4 -3
- package/dist/components/charts/xy/Scatterplot.d.ts +4 -3
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +3 -3
- package/dist/components/charts/xy/StackedAreaChart.d.ts +4 -3
- package/dist/components/data/transforms.d.ts +8 -7
- package/dist/components/export/chartConfig.d.ts +4 -3
- package/dist/components/geo/mergeData.d.ts +2 -1
- package/dist/components/realtime/BinAccumulator.d.ts +3 -2
- package/dist/components/realtime/renderers/types.d.ts +2 -1
- package/dist/components/realtime/renderers/waterfallRenderer.d.ts +2 -1
- package/dist/components/realtime/types.d.ts +20 -16
- package/dist/components/semiotic-themes.d.ts +2 -1
- package/dist/components/semiotic-xy.d.ts +2 -0
- package/dist/components/semiotic.d.ts +3 -3
- package/dist/components/server/animatedGif.d.ts +4 -18
- package/dist/components/server/renderToStaticSVG.d.ts +5 -4
- package/dist/components/server/serverChartConfigs.d.ts +2 -10
- package/dist/components/server/staticAnnotations.d.ts +2 -1
- package/dist/components/server/staticLegend.d.ts +2 -1
- package/dist/components/store/ObservationStore.d.ts +4 -3
- package/dist/components/store/SelectionStore.d.ts +3 -8
- package/dist/components/store/ThemeStore.d.ts +32 -4
- package/dist/components/store/TooltipStore.d.ts +1 -1
- package/dist/components/store/useSelection.d.ts +6 -5
- package/dist/components/stream/AccessibleDataTable.d.ts +5 -5
- package/dist/components/stream/CanvasHitTester.d.ts +2 -1
- package/dist/components/stream/DataSourceAdapter.d.ts +2 -1
- package/dist/components/stream/FocusRing.d.ts +1 -2
- package/dist/components/stream/GeoParticlePool.d.ts +2 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +7 -6
- package/dist/components/stream/MarginalGraphics.d.ts +1 -2
- package/dist/components/stream/NetworkPipelineStore.d.ts +3 -2
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -4
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
- package/dist/components/stream/OrdinalPipelineStore.d.ts +6 -5
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
- package/dist/components/stream/PipelineStore.d.ts +63 -28
- package/dist/components/stream/SVGOverlay.d.ts +10 -10
- package/dist/components/stream/SceneGraph.d.ts +6 -5
- package/dist/components/stream/StreamGeoFrame.d.ts +2 -1
- package/dist/components/stream/StreamNetworkFrame.d.ts +2 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +2 -1
- package/dist/components/stream/StreamXYFrame.d.ts +2 -1
- package/dist/components/stream/XYBrushOverlay.d.ts +1 -21
- package/dist/components/stream/devDataAccessWarning.d.ts +2 -11
- package/dist/components/stream/geoTypes.d.ts +25 -18
- package/dist/components/stream/hoverUtils.d.ts +2 -1
- package/dist/components/stream/layouts/hierarchySceneBuilders.d.ts +4 -3
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +4 -3
- package/dist/components/stream/networkTypes.d.ts +33 -28
- package/dist/components/stream/ordinalSceneBuilders/barFunnelScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/barScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/connectorScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/pointScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/statisticalScene.d.ts +4 -4
- package/dist/components/stream/ordinalSceneBuilders/swimlaneScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/timelineScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +9 -8
- package/dist/components/stream/ordinalTypes.d.ts +54 -22
- package/dist/components/stream/pipelineDecay.d.ts +2 -1
- package/dist/components/stream/pipelinePulse.d.ts +2 -1
- package/dist/components/stream/pipelineTransitions.d.ts +16 -4
- package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
- package/dist/components/stream/types.d.ts +45 -8
- package/dist/components/stream/xySceneBuilders/areaScene.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/barScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/boundsScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/emitPointNodes.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/lineScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/mixedScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/types.d.ts +35 -26
- package/dist/components/stream/xySceneBuilders/waterfallScene.d.ts +2 -1
- package/dist/components/types/marginType.d.ts +15 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-statisticalOverlays-Ckd_jM8z.js +1 -0
- package/dist/semiotic-themes.d.ts +2 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +2 -0
- package/dist/semiotic.d.ts +3 -3
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/test-utils/canvasMock.d.ts +10 -2
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +38 -31
- package/dist/components/types/annotationTypes.d.ts +0 -145
- package/dist/components/types/generalTypes.d.ts +0 -241
- package/dist/components/types/interactionTypes.d.ts +0 -72
- package/dist/components/types/networkTypes.d.ts +0 -174
- package/dist/components/types/ordinalTypes.d.ts +0 -112
- package/dist/semiotic-statisticalOverlays-DGX_WWc5.js +0 -1
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* XYBrushOverlay — d3-brush SVG overlay for XY frames.
|
|
3
|
-
*
|
|
4
|
-
* Renders a transparent SVG positioned above the canvas. Supports x, y, and
|
|
5
|
-
* xy brush dimensions, bin snapping, and streaming brush tracking (shrinks/
|
|
6
|
-
* clears the brush as data scrolls past the selected range).
|
|
7
|
-
*
|
|
8
|
-
* Key design decisions:
|
|
9
|
-
* - d3-brush lifecycle depends on [width, height, dimension, snap, binSize, snapDuring]
|
|
10
|
-
* only — scales and binBoundaries are read from refs to avoid teardown mid-drag.
|
|
11
|
-
* - Data-driven snapping (binBoundaries) uses binary search to snap to actual bin
|
|
12
|
-
* edges. Falls back to uniform grid math (binSize) when no boundaries are provided.
|
|
13
|
-
* - Bin snapping applies on "end" events by default. Set snapDuring=true to also
|
|
14
|
-
* snap during drag (the "brush" event).
|
|
15
|
-
* - Streaming tracking guards against y-only dimension (no x-domain to track).
|
|
16
|
-
* - isProgrammaticMoveRef prevents re-entrant brush events from .move() calls.
|
|
17
|
-
*
|
|
18
|
-
* Consumed by: StreamXYFrame (rendered when brush prop is set).
|
|
19
|
-
*/
|
|
20
|
-
import * as React from "react";
|
|
21
1
|
import type { StreamScales } from "./types";
|
|
22
2
|
export interface XYBrushOverlayProps {
|
|
23
3
|
width: number;
|
|
@@ -44,4 +24,4 @@ export interface XYBrushOverlayProps {
|
|
|
44
24
|
snapDuring?: boolean;
|
|
45
25
|
streaming?: boolean;
|
|
46
26
|
}
|
|
47
|
-
export declare function XYBrushOverlay({ width, height, totalWidth, totalHeight, margin, dimension, scales, onBrush, binSize, snap, binBoundaries, snapDuring, streaming }: XYBrushOverlayProps):
|
|
27
|
+
export declare function XYBrushOverlay({ width, height, totalWidth, totalHeight, margin, dimension, scales, onBrush, binSize, snap, binBoundaries, snapDuring, streaming }: XYBrushOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Dev-mode helper that warns when user callbacks access properties that exist
|
|
3
|
-
* on `.data` but not on the RealtimeNode/RealtimeEdge wrapper.
|
|
4
|
-
*
|
|
5
|
-
* Common pitfall:
|
|
6
|
-
* nodeStyle={(d) => ({ fill: d.category })} // undefined!
|
|
7
|
-
* nodeStyle={(d) => ({ fill: d.data?.category })} // correct
|
|
8
|
-
*
|
|
9
|
-
* In production, this is a no-op passthrough.
|
|
10
|
-
*/
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
11
2
|
export declare function wrapWithDataHint<T extends {
|
|
12
|
-
data?:
|
|
3
|
+
data?: Datum;
|
|
13
4
|
}>(datum: T, callbackName: string): T;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { GeoProjection, GeoPath, GeoPermissibleObjects } from "d3-geo";
|
|
3
|
-
import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, PointSceneNode, LineSceneNode } from "./types";
|
|
3
|
+
import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, PointSceneNode, LineSceneNode, ThemeSemanticColors } from "./types";
|
|
4
4
|
import type { AnimateProp } from "./pipelineTransitionUtils";
|
|
5
5
|
import type { HoverAnnotationConfig, HoverData } from "../realtime/types";
|
|
6
6
|
import type { GeoParticleStyle } from "./GeoParticlePool";
|
|
7
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
7
8
|
export type ProjectionProp = GeoProjection | ProjectionName | ProjectionConfig;
|
|
8
9
|
export type ProjectionName = "mercator" | "equalEarth" | "albersUsa" | "orthographic" | "naturalEarth" | "equirectangular";
|
|
9
10
|
export interface ProjectionConfig {
|
|
@@ -21,8 +22,8 @@ export interface GraticuleConfig {
|
|
|
21
22
|
}
|
|
22
23
|
export interface DistanceCartogramConfig {
|
|
23
24
|
center: string;
|
|
24
|
-
centerAccessor?: string | ((d:
|
|
25
|
-
costAccessor: string | ((d:
|
|
25
|
+
centerAccessor?: string | ((d: Datum) => string);
|
|
26
|
+
costAccessor: string | ((d: Datum) => number);
|
|
26
27
|
strength?: number;
|
|
27
28
|
lineMode?: "straight" | "fractional";
|
|
28
29
|
}
|
|
@@ -59,18 +60,24 @@ export interface GeoPipelineConfig {
|
|
|
59
60
|
projectionExtent?: [[number, number], [number, number]];
|
|
60
61
|
/** Padding fraction for auto-fit projection. 0.1 = 10% inset from edges. @default 0 */
|
|
61
62
|
fitPadding?: number;
|
|
62
|
-
xAccessor?: string | ((d:
|
|
63
|
-
yAccessor?: string | ((d:
|
|
64
|
-
lineDataAccessor?: string | ((d:
|
|
63
|
+
xAccessor?: string | ((d: Datum) => number);
|
|
64
|
+
yAccessor?: string | ((d: Datum) => number);
|
|
65
|
+
lineDataAccessor?: string | ((d: Datum) => any[]);
|
|
65
66
|
lineType?: "geo" | "line";
|
|
66
67
|
/** Flow rendering style: "basic" (straight/great-circle), "offset" (bidirectional offset), "arc" (curved arcs) @default "basic" */
|
|
67
68
|
flowStyle?: "basic" | "offset" | "arc";
|
|
68
|
-
areaStyle?: Style | ((d:
|
|
69
|
-
pointStyle?: (d:
|
|
69
|
+
areaStyle?: Style | ((d: Datum) => Style);
|
|
70
|
+
pointStyle?: (d: Datum) => Style & {
|
|
70
71
|
r?: number;
|
|
71
72
|
};
|
|
72
73
|
lineStyle?: Style | ((d: any, group?: string) => Style);
|
|
73
74
|
colorScheme?: string | string[];
|
|
75
|
+
/** Theme-resolved semantic role colors — default fallback before hardcoded hex. See `ThemeSemanticColors` in ./types. */
|
|
76
|
+
themeSemantic?: ThemeSemanticColors;
|
|
77
|
+
/** Theme sequential scheme name — fallback for ChoroplethMap when colorScheme is not set. */
|
|
78
|
+
themeSequential?: string;
|
|
79
|
+
/** Theme diverging scheme name — available for geo consumers that need midpoint encodings. */
|
|
80
|
+
themeDiverging?: string;
|
|
74
81
|
graticule?: boolean | GraticuleConfig;
|
|
75
82
|
projectionTransform?: DistanceCartogramConfig;
|
|
76
83
|
decay?: DecayConfig;
|
|
@@ -78,10 +85,10 @@ export interface GeoPipelineConfig {
|
|
|
78
85
|
transition?: TransitionConfig;
|
|
79
86
|
/** Whether to animate elements on first render */
|
|
80
87
|
introAnimation?: boolean;
|
|
81
|
-
annotations?:
|
|
82
|
-
pointIdAccessor?: string | ((d:
|
|
88
|
+
annotations?: Datum[];
|
|
89
|
+
pointIdAccessor?: string | ((d: Datum) => string);
|
|
83
90
|
}
|
|
84
|
-
export interface StreamGeoFrameProps<T =
|
|
91
|
+
export interface StreamGeoFrameProps<T = Datum> {
|
|
85
92
|
projection: ProjectionProp;
|
|
86
93
|
projectionExtent?: [[number, number], [number, number]];
|
|
87
94
|
/** Padding fraction for auto-fit projection. 0.1 = 10% inset from edges. @default 0 */
|
|
@@ -134,8 +141,8 @@ export interface StreamGeoFrameProps<T = Record<string, any>> {
|
|
|
134
141
|
className?: string;
|
|
135
142
|
background?: string;
|
|
136
143
|
runtimeMode?: "bounded" | "streaming";
|
|
137
|
-
areaStyle?: Style | ((d:
|
|
138
|
-
pointStyle?: (d:
|
|
144
|
+
areaStyle?: Style | ((d: Datum) => Style);
|
|
145
|
+
pointStyle?: (d: Datum) => Style & {
|
|
139
146
|
r?: number;
|
|
140
147
|
};
|
|
141
148
|
lineStyle?: Style | ((d: any, group?: string) => Style);
|
|
@@ -145,7 +152,7 @@ export interface StreamGeoFrameProps<T = Record<string, any>> {
|
|
|
145
152
|
tooltipContent?: (d: HoverData) => ReactNode;
|
|
146
153
|
customClickBehavior?: (d: HoverData | null) => void;
|
|
147
154
|
customHoverBehavior?: (d: HoverData | null) => void;
|
|
148
|
-
annotations?:
|
|
155
|
+
annotations?: Datum[];
|
|
149
156
|
decay?: DecayConfig;
|
|
150
157
|
pulse?: PulseConfig;
|
|
151
158
|
transition?: TransitionConfig;
|
|
@@ -176,10 +183,10 @@ export interface StreamGeoFrameProps<T = Record<string, any>> {
|
|
|
176
183
|
summary?: string;
|
|
177
184
|
}
|
|
178
185
|
export interface StreamGeoFrameHandle {
|
|
179
|
-
push(datum:
|
|
180
|
-
pushMany(data:
|
|
186
|
+
push(datum: Datum): void;
|
|
187
|
+
pushMany(data: Datum[]): void;
|
|
181
188
|
/** Remove points by ID. Requires pointIdAccessor. */
|
|
182
|
-
removePoint(id: string | string[]):
|
|
189
|
+
removePoint(id: string | string[]): Datum[];
|
|
183
190
|
clear(): void;
|
|
184
191
|
getProjection(): GeoProjection | null;
|
|
185
192
|
getGeoPath(): GeoPath<any, GeoPermissibleObjects> | null;
|
|
@@ -195,5 +202,5 @@ export interface StreamGeoFrameHandle {
|
|
|
195
202
|
/** Animate back to initial view */
|
|
196
203
|
resetZoom(): void;
|
|
197
204
|
/** Get current data points */
|
|
198
|
-
getData():
|
|
205
|
+
getData(): Datum[];
|
|
199
206
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Shared hover data utilities for stream frames.
|
|
3
4
|
*
|
|
@@ -25,7 +26,7 @@ export interface HoverPointerCoords {
|
|
|
25
26
|
* this matches the historical behavior where all datum fields are
|
|
26
27
|
* accessible directly on the hover object (d.fieldName).
|
|
27
28
|
*/
|
|
28
|
-
export declare function spreadDatum(rawDatum: any):
|
|
29
|
+
export declare function spreadDatum(rawDatum: any): Datum;
|
|
29
30
|
/**
|
|
30
31
|
* Build a HoverData object from a raw datum and pixel coordinates.
|
|
31
32
|
* Spreads plain-object datum properties for backwards compatibility
|
|
@@ -13,17 +13,18 @@
|
|
|
13
13
|
* Consumed by: hierarchyLayoutPlugin.ts (buildScene dispatcher)
|
|
14
14
|
*/
|
|
15
15
|
import type { NetworkPipelineConfig, NetworkSceneNode, NetworkSceneEdge, NetworkLabel, RealtimeNode, RealtimeEdge } from "../networkTypes";
|
|
16
|
-
|
|
16
|
+
import type { Style } from "../types";
|
|
17
|
+
export declare function buildTreeScene(nodes: RealtimeNode[], edges: RealtimeEdge[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d: RealtimeNode) => Style, edgeStyleFn: (d: RealtimeEdge) => Style): {
|
|
17
18
|
sceneNodes: NetworkSceneNode[];
|
|
18
19
|
sceneEdges: NetworkSceneEdge[];
|
|
19
20
|
labels: NetworkLabel[];
|
|
20
21
|
};
|
|
21
|
-
export declare function buildRectScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d:
|
|
22
|
+
export declare function buildRectScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d: RealtimeNode) => Style): {
|
|
22
23
|
sceneNodes: NetworkSceneNode[];
|
|
23
24
|
sceneEdges: NetworkSceneEdge[];
|
|
24
25
|
labels: NetworkLabel[];
|
|
25
26
|
};
|
|
26
|
-
export declare function buildCircleScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d:
|
|
27
|
+
export declare function buildCircleScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d: RealtimeNode) => Style): {
|
|
27
28
|
sceneNodes: NetworkSceneNode[];
|
|
28
29
|
sceneEdges: NetworkSceneEdge[];
|
|
29
30
|
labels: NetworkLabel[];
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Consumed by: hierarchyLayoutPlugin.ts, hierarchySceneBuilders.ts
|
|
8
8
|
*/
|
|
9
9
|
import type { NetworkPipelineConfig } from "../networkTypes";
|
|
10
|
+
import type { Datum } from "../../charts/shared/datumTypes";
|
|
10
11
|
/** Depth-based color palette shared across all hierarchy scene builders */
|
|
11
12
|
export declare const DEPTH_PALETTE: string[];
|
|
12
13
|
/**
|
|
@@ -19,7 +20,7 @@ export declare function parseColor(color: string): [number, number, number];
|
|
|
19
20
|
* Uses perceived luminance (ITU-R BT.601).
|
|
20
21
|
*/
|
|
21
22
|
export declare function contrastTextColor(bgColor: string): string;
|
|
22
|
-
export declare function resolveChildrenAccessor(accessor: string | ((d:
|
|
23
|
+
export declare function resolveChildrenAccessor(accessor: string | ((d: Datum) => any[]) | undefined): ((d: Datum) => any[]) | undefined;
|
|
23
24
|
export declare function resolveNodeId(d: any, config: NetworkPipelineConfig, index: number): string;
|
|
24
|
-
export declare function resolveLabelFn(nodeLabel: string | ((d:
|
|
25
|
-
export declare function resolveDefaultNodeSize(nodeSize: number | string | ((d:
|
|
25
|
+
export declare function resolveLabelFn(nodeLabel: string | ((d: Datum) => string) | undefined): ((d: Datum) => string) | null;
|
|
26
|
+
export declare function resolveDefaultNodeSize(nodeSize: number | string | ((d: Datum) => number) | undefined): number;
|
|
@@ -2,8 +2,9 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
import type { OnObservationCallback } from "../store/ObservationStore";
|
|
3
3
|
import type { HoverData, AnnotationContext } from "../realtime/types";
|
|
4
4
|
import type { LegendGroup } from "../types/legendTypes";
|
|
5
|
-
import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig } from "./types";
|
|
5
|
+
import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors } from "./types";
|
|
6
6
|
import type { AnimateProp } from "./pipelineTransitionUtils";
|
|
7
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
7
8
|
export interface TensionConfig {
|
|
8
9
|
weightChange: number;
|
|
9
10
|
newEdge: number;
|
|
@@ -32,7 +33,7 @@ export interface RealtimeNode {
|
|
|
32
33
|
_targetY1?: number;
|
|
33
34
|
value: number;
|
|
34
35
|
depth?: number;
|
|
35
|
-
data?:
|
|
36
|
+
data?: Datum;
|
|
36
37
|
createdByFrame?: boolean;
|
|
37
38
|
sourceLinks?: RealtimeEdge[];
|
|
38
39
|
targetLinks?: RealtimeEdge[];
|
|
@@ -59,7 +60,7 @@ export interface RealtimeEdge {
|
|
|
59
60
|
circular?: boolean;
|
|
60
61
|
circularPathData?: any;
|
|
61
62
|
bezier?: BezierCache;
|
|
62
|
-
data?:
|
|
63
|
+
data?: Datum;
|
|
63
64
|
/** Unique key for this edge (supports parallel edges between same node pair) */
|
|
64
65
|
_edgeKey?: string;
|
|
65
66
|
_pulseIntensity?: number;
|
|
@@ -299,14 +300,14 @@ export interface ThresholdAlertConfig {
|
|
|
299
300
|
}
|
|
300
301
|
export interface NetworkPipelineConfig {
|
|
301
302
|
chartType: NetworkChartType;
|
|
302
|
-
nodeIDAccessor?: string | ((d:
|
|
303
|
-
sourceAccessor?: string | ((d:
|
|
304
|
-
targetAccessor?: string | ((d:
|
|
305
|
-
valueAccessor?: string | ((d:
|
|
303
|
+
nodeIDAccessor?: string | ((d: Datum) => string);
|
|
304
|
+
sourceAccessor?: string | ((d: Datum) => string);
|
|
305
|
+
targetAccessor?: string | ((d: Datum) => string);
|
|
306
|
+
valueAccessor?: string | ((d: Datum) => number);
|
|
306
307
|
/** Edge ID accessor for removeEdge(edgeId) — enables single-ID edge removal */
|
|
307
|
-
edgeIdAccessor?: string | ((d:
|
|
308
|
-
childrenAccessor?: string | ((d:
|
|
309
|
-
hierarchySum?: string | ((d:
|
|
308
|
+
edgeIdAccessor?: string | ((d: Datum) => string);
|
|
309
|
+
childrenAccessor?: string | ((d: Datum) => any[]);
|
|
310
|
+
hierarchySum?: string | ((d: Datum) => number);
|
|
310
311
|
orientation?: "horizontal" | "vertical";
|
|
311
312
|
nodeAlign?: "justify" | "left" | "right" | "center";
|
|
312
313
|
nodePaddingRatio?: number;
|
|
@@ -324,17 +325,21 @@ export interface NetworkPipelineConfig {
|
|
|
324
325
|
tensionConfig?: TensionConfig;
|
|
325
326
|
showParticles?: boolean;
|
|
326
327
|
particleStyle?: ParticleStyle;
|
|
327
|
-
nodeStyle?: (d:
|
|
328
|
-
edgeStyle?: (d:
|
|
329
|
-
nodeLabel?: string | ((d:
|
|
328
|
+
nodeStyle?: (d: Datum) => Datum;
|
|
329
|
+
edgeStyle?: (d: Datum) => Datum;
|
|
330
|
+
nodeLabel?: string | ((d: Datum) => string);
|
|
330
331
|
showLabels?: boolean;
|
|
331
332
|
labelMode?: "leaf" | "parent" | "all";
|
|
332
|
-
colorBy?: string | ((d:
|
|
333
|
+
colorBy?: string | ((d: Datum) => string | number);
|
|
333
334
|
colorScheme?: string | string[];
|
|
334
|
-
|
|
335
|
+
/** Theme categorical palette — used as fallback when colorScheme is not an explicit array */
|
|
336
|
+
themeCategorical?: string[];
|
|
337
|
+
/** Theme-resolved semantic role colors — default fallback before hardcoded hex. See `ThemeSemanticColors` in ./types. */
|
|
338
|
+
themeSemantic?: ThemeSemanticColors;
|
|
339
|
+
edgeColorBy?: "source" | "target" | "gradient" | ((d: Datum) => string);
|
|
335
340
|
edgeOpacity?: number;
|
|
336
341
|
colorByDepth?: boolean;
|
|
337
|
-
nodeSize?: number | string | ((d:
|
|
342
|
+
nodeSize?: number | string | ((d: Datum) => number);
|
|
338
343
|
nodeSizeRange?: [number, number];
|
|
339
344
|
decay?: DecayConfig;
|
|
340
345
|
pulse?: PulseConfig;
|
|
@@ -377,7 +382,7 @@ export interface NetworkPipelineConfig {
|
|
|
377
382
|
y: number;
|
|
378
383
|
}>;
|
|
379
384
|
}
|
|
380
|
-
export interface StreamNetworkFrameProps<T =
|
|
385
|
+
export interface StreamNetworkFrameProps<T = Datum> {
|
|
381
386
|
chartType: NetworkChartType;
|
|
382
387
|
nodes?: T[];
|
|
383
388
|
edges?: T[] | T;
|
|
@@ -389,7 +394,7 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
|
|
|
389
394
|
targetAccessor?: string | ((d: T) => string);
|
|
390
395
|
valueAccessor?: string | ((d: T) => number);
|
|
391
396
|
/** Edge ID accessor for removeEdge(edgeId) single-ID removal */
|
|
392
|
-
edgeIdAccessor?: string | ((d:
|
|
397
|
+
edgeIdAccessor?: string | ((d: Datum) => string);
|
|
393
398
|
childrenAccessor?: string | ((d: T) => T[]);
|
|
394
399
|
hierarchySum?: string | ((d: T) => number);
|
|
395
400
|
orientation?: "horizontal" | "vertical";
|
|
@@ -409,16 +414,16 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
|
|
|
409
414
|
tensionConfig?: Partial<TensionConfig>;
|
|
410
415
|
showParticles?: boolean;
|
|
411
416
|
particleStyle?: ParticleStyle;
|
|
412
|
-
nodeStyle?: (d:
|
|
413
|
-
edgeStyle?: (d:
|
|
414
|
-
colorBy?: string | ((d:
|
|
417
|
+
nodeStyle?: (d: Datum) => Datum;
|
|
418
|
+
edgeStyle?: (d: Datum) => Datum;
|
|
419
|
+
colorBy?: string | ((d: Datum) => string | number);
|
|
415
420
|
colorScheme?: string | string[];
|
|
416
|
-
edgeColorBy?: "source" | "target" | "gradient" | ((d:
|
|
421
|
+
edgeColorBy?: "source" | "target" | "gradient" | ((d: Datum) => string);
|
|
417
422
|
edgeOpacity?: number;
|
|
418
423
|
colorByDepth?: boolean;
|
|
419
|
-
nodeSize?: number | string | ((d:
|
|
424
|
+
nodeSize?: number | string | ((d: Datum) => number);
|
|
420
425
|
nodeSizeRange?: [number, number];
|
|
421
|
-
nodeLabel?: string | ((d:
|
|
426
|
+
nodeLabel?: string | ((d: Datum) => string);
|
|
422
427
|
showLabels?: boolean;
|
|
423
428
|
labelMode?: "leaf" | "parent" | "all";
|
|
424
429
|
size?: [number, number];
|
|
@@ -441,8 +446,8 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
|
|
|
441
446
|
/** Chart instance identifier for observation filtering */
|
|
442
447
|
chartId?: string;
|
|
443
448
|
onTopologyChange?: (nodes: RealtimeNode[], edges: RealtimeEdge[]) => void;
|
|
444
|
-
annotations?:
|
|
445
|
-
svgAnnotationRules?: (annotation:
|
|
449
|
+
annotations?: Datum[];
|
|
450
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
446
451
|
legend?: ReactNode | {
|
|
447
452
|
legendGroups: LegendGroup[];
|
|
448
453
|
};
|
|
@@ -490,9 +495,9 @@ export interface StreamNetworkFrameHandle {
|
|
|
490
495
|
/** Remove edges by source+target, or by edge ID when edgeIdAccessor is configured. */
|
|
491
496
|
removeEdge(sourceIdOrEdgeId: string, targetId?: string): boolean;
|
|
492
497
|
/** Update a node's data by ID. Returns previous data. */
|
|
493
|
-
updateNode(id: string, updater: (data:
|
|
498
|
+
updateNode(id: string, updater: (data: Datum) => Datum): Datum | null;
|
|
494
499
|
/** Update all edges between source+target. Returns array of previous data. */
|
|
495
|
-
updateEdge(sourceId: string, targetId: string, updater: (data:
|
|
500
|
+
updateEdge(sourceId: string, targetId: string, updater: (data: Datum) => Datum): Datum[];
|
|
496
501
|
clear(): void;
|
|
497
502
|
getTopology(): {
|
|
498
503
|
nodes: RealtimeNode[];
|
|
@@ -24,4 +24,4 @@ import type { OrdinalSceneContext } from "./types";
|
|
|
24
24
|
* - __barFunnelCategory: category key (for multi-category)
|
|
25
25
|
* - __barFunnelLabelX/Y: position for the floating label
|
|
26
26
|
*/
|
|
27
|
-
export declare function buildBarFunnelScene(ctx: OrdinalSceneContext,
|
|
27
|
+
export declare function buildBarFunnelScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { OrdinalSceneNode, OrdinalLayout } from "../ordinalTypes";
|
|
2
2
|
import type { OrdinalSceneContext } from "./types";
|
|
3
|
-
export declare function buildBarScene(ctx: OrdinalSceneContext,
|
|
4
|
-
export declare function buildClusterBarScene(ctx: OrdinalSceneContext,
|
|
3
|
+
export declare function buildBarScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
4
|
+
export declare function buildClusterBarScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ConnectorSceneNode, OrdinalSceneNode, OrdinalLayout } from "../ordinalTypes";
|
|
2
2
|
import type { OrdinalSceneContext } from "./types";
|
|
3
|
-
export declare function buildConnectors(ctx: OrdinalSceneContext, pieceNodes: OrdinalSceneNode[],
|
|
3
|
+
export declare function buildConnectors(ctx: OrdinalSceneContext, pieceNodes: OrdinalSceneNode[], _layout: OrdinalLayout): ConnectorSceneNode[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { OrdinalSceneNode, OrdinalLayout } from "../ordinalTypes";
|
|
2
2
|
import type { OrdinalSceneContext } from "./types";
|
|
3
|
-
export declare function buildPointScene(ctx: OrdinalSceneContext,
|
|
4
|
-
export declare function buildSwarmScene(ctx: OrdinalSceneContext,
|
|
3
|
+
export declare function buildPointScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
4
|
+
export declare function buildSwarmScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OrdinalSceneNode, OrdinalLayout } from "../ordinalTypes";
|
|
2
2
|
import type { OrdinalSceneContext } from "./types";
|
|
3
|
-
export declare function buildBoxplotScene(ctx: OrdinalSceneContext,
|
|
4
|
-
export declare function buildViolinScene(ctx: OrdinalSceneContext,
|
|
5
|
-
export declare function buildHistogramScene(ctx: OrdinalSceneContext,
|
|
6
|
-
export declare function buildRidgelineScene(ctx: OrdinalSceneContext,
|
|
3
|
+
export declare function buildBoxplotScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
4
|
+
export declare function buildViolinScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
5
|
+
export declare function buildHistogramScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
6
|
+
export declare function buildRidgelineScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
@@ -9,4 +9,4 @@ import type { OrdinalSceneContext } from "./types";
|
|
|
9
9
|
* multiple items with the same subcategory can appear in the same lane —
|
|
10
10
|
* they simply stack sequentially.
|
|
11
11
|
*/
|
|
12
|
-
export declare function buildSwimlaneScene(ctx: OrdinalSceneContext,
|
|
12
|
+
export declare function buildSwimlaneScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { OrdinalSceneNode, OrdinalLayout } from "../ordinalTypes";
|
|
2
2
|
import type { OrdinalSceneContext } from "./types";
|
|
3
|
-
export declare function buildTimelineScene(ctx: OrdinalSceneContext,
|
|
3
|
+
export declare function buildTimelineScene(ctx: OrdinalSceneContext, _layout: OrdinalLayout): OrdinalSceneNode[];
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { ScaleLinear } from "d3-scale";
|
|
2
2
|
import type { OrdinalScales, OrdinalColumn, OrdinalPipelineConfig, OrdinalSceneNode, OrdinalLayout } from "../ordinalTypes";
|
|
3
3
|
import type { Style } from "../types";
|
|
4
|
+
import type { Datum } from "../../charts/shared/datumTypes";
|
|
4
5
|
export interface OrdinalSceneContext {
|
|
5
6
|
scales: OrdinalScales;
|
|
6
7
|
columns: Record<string, OrdinalColumn>;
|
|
7
8
|
config: OrdinalPipelineConfig;
|
|
8
|
-
getR: (d:
|
|
9
|
-
getStack?: (d:
|
|
10
|
-
getGroup?: (d:
|
|
11
|
-
getColor?: (d:
|
|
12
|
-
getConnector?: (d:
|
|
13
|
-
getO: (d:
|
|
9
|
+
getR: (d: Datum) => number;
|
|
10
|
+
getStack?: (d: Datum) => string;
|
|
11
|
+
getGroup?: (d: Datum) => string;
|
|
12
|
+
getColor?: (d: Datum) => string;
|
|
13
|
+
getConnector?: (d: Datum) => string;
|
|
14
|
+
getO: (d: Datum) => string;
|
|
14
15
|
multiScales: ScaleLinear<number, number>[];
|
|
15
|
-
rAccessors: ((d:
|
|
16
|
+
rAccessors: ((d: Datum) => number)[];
|
|
16
17
|
resolvePieceStyle: (d: any, category?: string) => Style;
|
|
17
18
|
resolveSummaryStyle: (d: any, category?: string) => Style;
|
|
18
19
|
/** For timeline: resolve rAccessor as [start, end] */
|
|
19
|
-
getRawRange: (d:
|
|
20
|
+
getRawRange: (d: Datum) => [number, number] | null;
|
|
20
21
|
}
|
|
21
22
|
export type SceneBuilderFn = (ctx: OrdinalSceneContext, layout: OrdinalLayout) => OrdinalSceneNode[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { ScaleLinear, ScaleBand } from "d3-scale";
|
|
3
|
-
import type {
|
|
4
|
-
import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig } from "./types";
|
|
3
|
+
import type { WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext } from "../realtime/types";
|
|
4
|
+
import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors } from "./types";
|
|
5
5
|
import type { AnimateProp } from "./pipelineTransitionUtils";
|
|
6
6
|
import type { LegendGroup } from "../types/legendTypes";
|
|
7
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
7
8
|
export type OrdinalChartType = "bar" | "clusterbar" | "point" | "swarm" | "pie" | "donut" | "boxplot" | "violin" | "histogram" | "ridgeline" | "timeline" | "funnel" | "bar-funnel" | "swimlane";
|
|
8
9
|
export interface OrdinalScales {
|
|
9
10
|
o: ScaleBand<string>;
|
|
@@ -143,7 +144,7 @@ export interface OrdinalColumn {
|
|
|
143
144
|
width: number;
|
|
144
145
|
middle: number;
|
|
145
146
|
padding: number;
|
|
146
|
-
pieceData:
|
|
147
|
+
pieceData: Datum[];
|
|
147
148
|
/** For radial: proportion of total (0-1) */
|
|
148
149
|
pct: number;
|
|
149
150
|
/** For radial: cumulative start proportion */
|
|
@@ -156,22 +157,36 @@ export interface OrdinalPipelineConfig {
|
|
|
156
157
|
windowMode: WindowMode;
|
|
157
158
|
extentPadding: number;
|
|
158
159
|
projection: "vertical" | "horizontal" | "radial";
|
|
159
|
-
categoryAccessor?: string | ((d:
|
|
160
|
-
valueAccessor?: string | ((d:
|
|
161
|
-
colorAccessor?: string | ((d:
|
|
162
|
-
stackBy?: string | ((d:
|
|
163
|
-
groupBy?: string | ((d:
|
|
164
|
-
timeAccessor?: string | ((d:
|
|
160
|
+
categoryAccessor?: string | ((d: Datum) => string);
|
|
161
|
+
valueAccessor?: string | ((d: Datum) => number) | Array<string | ((d: Datum) => number)>;
|
|
162
|
+
colorAccessor?: string | ((d: Datum) => string);
|
|
163
|
+
stackBy?: string | ((d: Datum) => string);
|
|
164
|
+
groupBy?: string | ((d: Datum) => string);
|
|
165
|
+
timeAccessor?: string | ((d: Datum) => number);
|
|
165
166
|
/** @deprecated Use categoryAccessor */
|
|
166
|
-
oAccessor?: string | ((d:
|
|
167
|
+
oAccessor?: string | ((d: Datum) => string);
|
|
167
168
|
/** @deprecated Use valueAccessor */
|
|
168
|
-
rAccessor?: string | ((d:
|
|
169
|
+
rAccessor?: string | ((d: Datum) => number) | Array<string | ((d: Datum) => number)>;
|
|
169
170
|
multiAxis?: boolean;
|
|
170
171
|
rExtent?: [number?, number?];
|
|
171
172
|
oExtent?: string[];
|
|
172
173
|
barPadding?: number;
|
|
173
174
|
/** Rounded top corner radius for bar charts. Only the end away from the baseline is rounded. For stacked bars, only the topmost segment gets rounded. */
|
|
174
175
|
roundedTop?: number;
|
|
176
|
+
/** Gradient fill for bar rects. `{ topOpacity, bottomOpacity }` fades the
|
|
177
|
+
* resolved fill color from tip (opposite the baseline) to base; `{ colorStops }`
|
|
178
|
+
* renders a multi-color gradient along the same axis. Direction follows the
|
|
179
|
+
* bar's orientation (tip → base). Same shape as AreaChart.gradientFill
|
|
180
|
+
* sans the `boolean` case — the HOC resolves `true` to default opacities. */
|
|
181
|
+
gradientFill?: {
|
|
182
|
+
topOpacity: number;
|
|
183
|
+
bottomOpacity: number;
|
|
184
|
+
} | {
|
|
185
|
+
colorStops: Array<{
|
|
186
|
+
offset: number;
|
|
187
|
+
color: string;
|
|
188
|
+
}>;
|
|
189
|
+
};
|
|
175
190
|
/** When true, adds padding below the 0 baseline. When false (default), bars are flush with the axis line. */
|
|
176
191
|
baselinePadding?: boolean;
|
|
177
192
|
innerRadius?: number;
|
|
@@ -188,16 +203,22 @@ export interface OrdinalPipelineConfig {
|
|
|
188
203
|
connectorOpacity?: number;
|
|
189
204
|
showLabels?: boolean;
|
|
190
205
|
oSort?: ((a: string, b: string) => number) | boolean | "asc" | "desc" | "auto";
|
|
191
|
-
connectorAccessor?: string | ((d:
|
|
192
|
-
connectorStyle?: Style | ((d:
|
|
206
|
+
connectorAccessor?: string | ((d: Datum) => string);
|
|
207
|
+
connectorStyle?: Style | ((d: Datum) => Style);
|
|
193
208
|
dynamicColumnWidth?: string | ((data: any[]) => number);
|
|
194
209
|
pieceStyle?: (d: any, category?: string) => Style;
|
|
195
210
|
summaryStyle?: (d: any, category?: string) => Style;
|
|
196
211
|
colorScheme?: string | string[];
|
|
197
212
|
themeCategorical?: string[];
|
|
213
|
+
/** Theme-resolved semantic role colors — default fallback before hardcoded hex. See `ThemeSemanticColors` in ./types. */
|
|
214
|
+
themeSemantic?: ThemeSemanticColors;
|
|
215
|
+
/** Theme sequential scheme name — fallback for magnitude encodings. */
|
|
216
|
+
themeSequential?: string;
|
|
217
|
+
/** Theme diverging scheme name — fallback for midpoint encodings (LikertChart). */
|
|
218
|
+
themeDiverging?: string;
|
|
198
219
|
barColors?: Record<string, string>;
|
|
199
220
|
/** ID accessor for remove() — extracts a unique identifier from each datum */
|
|
200
|
-
dataIdAccessor?: string | ((d:
|
|
221
|
+
dataIdAccessor?: string | ((d: Datum) => string);
|
|
201
222
|
decay?: DecayConfig;
|
|
202
223
|
pulse?: PulseConfig;
|
|
203
224
|
transition?: TransitionConfig;
|
|
@@ -205,7 +226,7 @@ export interface OrdinalPipelineConfig {
|
|
|
205
226
|
introAnimation?: boolean;
|
|
206
227
|
staleness?: StalenessConfig;
|
|
207
228
|
}
|
|
208
|
-
export interface StreamOrdinalFrameProps<T =
|
|
229
|
+
export interface StreamOrdinalFrameProps<T = Datum> {
|
|
209
230
|
chartType: OrdinalChartType;
|
|
210
231
|
runtimeMode?: "bounded" | "streaming";
|
|
211
232
|
data?: T[];
|
|
@@ -234,6 +255,17 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
|
|
|
234
255
|
};
|
|
235
256
|
barPadding?: number;
|
|
236
257
|
roundedTop?: number;
|
|
258
|
+
/** Gradient fill for bar rects. Same shape as AreaChart.gradientFill sans
|
|
259
|
+
* the boolean case — resolve booleans at the HOC layer. */
|
|
260
|
+
gradientFill?: {
|
|
261
|
+
topOpacity: number;
|
|
262
|
+
bottomOpacity: number;
|
|
263
|
+
} | {
|
|
264
|
+
colorStops: Array<{
|
|
265
|
+
offset: number;
|
|
266
|
+
color: string;
|
|
267
|
+
}>;
|
|
268
|
+
};
|
|
237
269
|
baselinePadding?: boolean;
|
|
238
270
|
innerRadius?: number;
|
|
239
271
|
cornerRadius?: number;
|
|
@@ -251,13 +283,12 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
|
|
|
251
283
|
oExtent?: string[];
|
|
252
284
|
extentPadding?: number;
|
|
253
285
|
oSort?: ((a: string, b: string) => number) | boolean | "asc" | "desc" | "auto";
|
|
254
|
-
arrowOfTime?: ArrowOfTime;
|
|
255
286
|
windowMode?: WindowMode;
|
|
256
287
|
windowSize?: number;
|
|
257
288
|
connectorAccessor?: string | ((d: T) => string);
|
|
258
|
-
connectorStyle?: Style | ((d:
|
|
289
|
+
connectorStyle?: Style | ((d: Datum) => Style);
|
|
259
290
|
/** ID accessor for remove()/update() — extracts a unique identifier from each datum */
|
|
260
|
-
dataIdAccessor?: string | ((d:
|
|
291
|
+
dataIdAccessor?: string | ((d: Datum) => string);
|
|
261
292
|
/** Custom tick values for the value (r) axis. Overrides the default d3 ticks. */
|
|
262
293
|
rTickValues?: number[];
|
|
263
294
|
/** Align first tick label to start and last tick label to end. Default false. */
|
|
@@ -288,8 +319,8 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
|
|
|
288
319
|
hoverAnnotation?: boolean | HoverAnnotationConfig;
|
|
289
320
|
tooltipContent?: (d: HoverData) => ReactNode;
|
|
290
321
|
customHoverBehavior?: (d: HoverData | null) => void;
|
|
291
|
-
annotations?:
|
|
292
|
-
svgAnnotationRules?: (annotation:
|
|
322
|
+
annotations?: Datum[];
|
|
323
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
293
324
|
showGrid?: boolean;
|
|
294
325
|
legend?: ReactNode | {
|
|
295
326
|
legendGroups: LegendGroup[];
|
|
@@ -334,7 +365,7 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
|
|
|
334
365
|
/** Accessible summary rendered as a screen-reader-only note */
|
|
335
366
|
summary?: string;
|
|
336
367
|
}
|
|
337
|
-
export interface StreamOrdinalFrameHandle<T =
|
|
368
|
+
export interface StreamOrdinalFrameHandle<T = Datum> {
|
|
338
369
|
push(datum: T): void;
|
|
339
370
|
pushMany(data: T[]): void;
|
|
340
371
|
/** Replace all data. Unlike `clear() + pushMany()`, `replace()` preserves
|
|
@@ -363,4 +394,5 @@ export interface OrdinalLayout {
|
|
|
363
394
|
height: number;
|
|
364
395
|
}
|
|
365
396
|
export type OrdinalRendererFn = (ctx: CanvasRenderingContext2D, nodes: OrdinalSceneNode[], scales: OrdinalScales, layout: OrdinalLayout) => void;
|
|
366
|
-
export type { HoverData, HoverAnnotationConfig, AnnotationContext,
|
|
397
|
+
export type { HoverData, HoverAnnotationConfig, AnnotationContext, WindowMode };
|
|
398
|
+
export type { ArrowOfTime } from "../realtime/types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Shared decay encoding utilities for all pipeline stores.
|
|
3
4
|
*
|
|
@@ -18,4 +19,4 @@ export declare function computeDecayOpacity(decay: DecayConfig, bufferIndex: num
|
|
|
18
19
|
* Apply decay opacity to a list of scene nodes.
|
|
19
20
|
* Uses the datum's index in the buffer data array.
|
|
20
21
|
*/
|
|
21
|
-
export declare function applyDecay(decay: DecayConfig, nodes: SceneNode[], data:
|
|
22
|
+
export declare function applyDecay(decay: DecayConfig, nodes: SceneNode[], data: Datum[]): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Pulse encoding for XY pipeline scene nodes.
|
|
3
4
|
*
|
|
@@ -17,7 +18,7 @@ export declare function computePulseIntensity(pulse: PulseConfig, insertTime: nu
|
|
|
17
18
|
/**
|
|
18
19
|
* Apply pulse glow to scene nodes using insertion timestamps.
|
|
19
20
|
*/
|
|
20
|
-
export declare function applyPulse(pulse: PulseConfig, nodes: SceneNode[], data:
|
|
21
|
+
export declare function applyPulse(pulse: PulseConfig, nodes: SceneNode[], data: Datum[], timestampBuffer: RingBuffer<number>): void;
|
|
21
22
|
/**
|
|
22
23
|
* Check whether there are active pulse animations needing continuous rendering.
|
|
23
24
|
*/
|