semiotic 3.3.1 → 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 +25 -6
- package/README.md +1 -1
- package/ai/dist/mcp-server.js +104 -9
- 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 +9 -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 +3 -1
- 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 +30 -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 +13 -4
- 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 +6 -5
- package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
- package/dist/components/charts/ordinal/LikertChart.d.ts +8 -4
- 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 +6 -5
- 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 +41 -24
- 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 +14 -11
- 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 +20 -7
- package/dist/components/charts/shared/types.d.ts +27 -19
- package/dist/components/charts/shared/useChartSetup.d.ts +15 -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/useResolvedSelection.d.ts +2 -0
- 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 +32 -16
- package/dist/components/semiotic-geo.d.ts +4 -0
- package/dist/components/semiotic-network.d.ts +7 -0
- package/dist/components/semiotic-ordinal.d.ts +8 -0
- package/dist/components/semiotic-themes.d.ts +2 -1
- package/dist/components/semiotic-xy.d.ts +11 -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 +6 -5
- 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 +34 -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 +10 -4
- package/dist/components/stream/DataSourceAdapter.d.ts +19 -1
- package/dist/components/stream/FocusRing.d.ts +1 -2
- package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
- package/dist/components/stream/GeoParticlePool.d.ts +2 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +26 -7
- package/dist/components/stream/MarginalGraphics.d.ts +1 -2
- package/dist/components/stream/NetworkPipelineStore.d.ts +8 -2
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -4
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +3 -1
- package/dist/components/stream/OrdinalPipelineStore.d.ts +44 -6
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
- package/dist/components/stream/ParticlePool.d.ts +4 -0
- package/dist/components/stream/PipelineStore.d.ts +80 -30
- 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 +19 -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 +32 -18
- package/dist/components/stream/hoverUtils.d.ts +14 -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 +51 -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 +102 -29
- package/dist/components/stream/pipelineDecay.d.ts +2 -1
- package/dist/components/stream/pipelinePulse.d.ts +2 -1
- package/dist/components/stream/pipelineTransitionUtils.d.ts +21 -0
- package/dist/components/stream/pipelineTransitions.d.ts +16 -4
- package/dist/components/stream/quadtreeHitTest.d.ts +22 -0
- package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +23 -6
- package/dist/components/stream/types.d.ts +63 -8
- package/dist/components/stream/useFrame.d.ts +122 -0
- 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-geo.d.ts +4 -0
- package/dist/semiotic-network.d.ts +7 -0
- package/dist/semiotic-ordinal.d.ts +8 -0
- 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 +11 -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 +35 -1
- package/dist/test-utils/ordinalFixtures.d.ts +48 -0
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +50 -42
- 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,5 +1,6 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
|
-
import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
|
|
3
|
+
import type { StreamOrdinalFrameProps, StreamOrdinalFrameHandle } from "../../stream/ordinalTypes";
|
|
3
4
|
import type { LegendInteractionMode } from "../shared/hooks";
|
|
4
5
|
import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/types";
|
|
5
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
@@ -35,7 +36,7 @@ import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
|
35
36
|
* doesn't follow this low-to-high convention, the chart will misrepresent
|
|
36
37
|
* the polarity.
|
|
37
38
|
*/
|
|
38
|
-
export interface LikertChartProps<TDatum extends
|
|
39
|
+
export interface LikertChartProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
39
40
|
data?: TDatum[];
|
|
40
41
|
/** Question / item accessor — the ordinal axis. */
|
|
41
42
|
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
@@ -83,12 +84,15 @@ export interface LikertChartProps<TDatum extends Record<string, any> = Record<st
|
|
|
83
84
|
legendInteraction?: LegendInteractionMode;
|
|
84
85
|
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
85
86
|
tooltip?: TooltipProp;
|
|
86
|
-
annotations?:
|
|
87
|
+
annotations?: Datum[];
|
|
87
88
|
/** Custom formatter for category tick labels */
|
|
88
89
|
categoryFormat?: CategoryFormatFn;
|
|
89
90
|
frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
|
|
90
91
|
}
|
|
92
|
+
export interface LikertChartHandle extends RealtimeFrameHandle {
|
|
93
|
+
getScales(): ReturnType<NonNullable<StreamOrdinalFrameHandle["getScales"]>>;
|
|
94
|
+
}
|
|
91
95
|
export declare const LikertChart: {
|
|
92
|
-
<TDatum extends
|
|
96
|
+
<TDatum extends Datum = Datum>(props: LikertChartProps<TDatum> & React.RefAttributes<LikertChartHandle>): React.ReactElement | null;
|
|
93
97
|
displayName?: string;
|
|
94
98
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
|
|
3
4
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
4
5
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
5
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
6
7
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
7
|
-
export interface PieChartProps<TDatum extends
|
|
8
|
+
export interface PieChartProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
9
|
data?: TDatum[];
|
|
9
10
|
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
10
11
|
valueAccessor?: ChartAccessor<TDatum, number>;
|
|
@@ -19,10 +20,10 @@ export interface PieChartProps<TDatum extends Record<string, any> = Record<strin
|
|
|
19
20
|
legendInteraction?: LegendInteractionMode;
|
|
20
21
|
legendPosition?: LegendPosition;
|
|
21
22
|
tooltip?: TooltipProp;
|
|
22
|
-
annotations?:
|
|
23
|
+
annotations?: Datum[];
|
|
23
24
|
frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
|
|
24
25
|
}
|
|
25
26
|
export declare const PieChart: {
|
|
26
|
-
<TDatum extends
|
|
27
|
+
<TDatum extends Datum = Datum>(props: PieChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
27
28
|
displayName?: string;
|
|
28
29
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
|
|
3
4
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
4
5
|
import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/types";
|
|
5
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
6
7
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
7
|
-
export interface RidgelinePlotProps<TDatum extends
|
|
8
|
+
export interface RidgelinePlotProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
9
|
data?: TDatum[];
|
|
9
10
|
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
10
11
|
valueAccessor?: ChartAccessor<TDatum, number>;
|
|
@@ -25,7 +26,7 @@ export interface RidgelinePlotProps<TDatum extends Record<string, any> = Record<
|
|
|
25
26
|
legendInteraction?: LegendInteractionMode;
|
|
26
27
|
legendPosition?: LegendPosition;
|
|
27
28
|
tooltip?: TooltipProp;
|
|
28
|
-
annotations?:
|
|
29
|
+
annotations?: Datum[];
|
|
29
30
|
/** Custom formatter for category tick labels */
|
|
30
31
|
categoryFormat?: CategoryFormatFn;
|
|
31
32
|
frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
|
|
@@ -37,6 +38,6 @@ export interface RidgelinePlotProps<TDatum extends Record<string, any> = Record<
|
|
|
37
38
|
* baseline. The amplitude prop controls overlap between rows.
|
|
38
39
|
*/
|
|
39
40
|
export declare const RidgelinePlot: {
|
|
40
|
-
<TDatum extends
|
|
41
|
+
<TDatum extends Datum = Datum>(props: RidgelinePlotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
41
42
|
displayName?: string;
|
|
42
43
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
|
|
3
4
|
import type { LegendInteractionMode } from "../shared/hooks";
|
|
4
5
|
import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/types";
|
|
5
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
6
7
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
7
|
-
export interface StackedBarChartProps<TDatum extends
|
|
8
|
+
export interface StackedBarChartProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
9
|
data?: TDatum[];
|
|
9
10
|
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
10
11
|
stackBy: ChartAccessor<TDatum, string>;
|
|
@@ -16,8 +17,8 @@ export interface StackedBarChartProps<TDatum extends Record<string, any> = Recor
|
|
|
16
17
|
colorBy?: ChartAccessor<TDatum, string>;
|
|
17
18
|
colorScheme?: string | string[];
|
|
18
19
|
normalize?: boolean;
|
|
19
|
-
/** Category sort order. Default: false (data insertion order). "asc"
|
|
20
|
-
sort?: boolean | "asc" | "desc" | ((a: string, b: string) => number);
|
|
20
|
+
/** Category sort order. Default: `false` (data insertion order). `"asc"`/`"desc"` sorts by total stacked value. `"auto"` preserves insertion order while streaming and falls through to value-desc on static data. Custom comparators receive category keys. */
|
|
21
|
+
sort?: boolean | "asc" | "desc" | "auto" | ((a: string, b: string) => number);
|
|
21
22
|
barPadding?: number;
|
|
22
23
|
/** Rounded top corner radius. Only the topmost stacked segment gets rounded. */
|
|
23
24
|
roundedTop?: number;
|
|
@@ -29,12 +30,12 @@ export interface StackedBarChartProps<TDatum extends Record<string, any> = Recor
|
|
|
29
30
|
legendInteraction?: LegendInteractionMode;
|
|
30
31
|
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
31
32
|
tooltip?: TooltipProp;
|
|
32
|
-
annotations?:
|
|
33
|
+
annotations?: Datum[];
|
|
33
34
|
/** Custom formatter for category tick labels */
|
|
34
35
|
categoryFormat?: CategoryFormatFn;
|
|
35
36
|
frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
|
|
36
37
|
}
|
|
37
38
|
export declare const StackedBarChart: {
|
|
38
|
-
<TDatum extends
|
|
39
|
+
<TDatum extends Datum = Datum>(props: StackedBarChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
39
40
|
displayName?: string;
|
|
40
41
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
|
|
3
4
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
4
5
|
import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/types";
|
|
5
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
6
7
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
7
|
-
export interface SwarmPlotProps<TDatum extends
|
|
8
|
+
export interface SwarmPlotProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
9
|
data?: TDatum[];
|
|
9
10
|
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
10
11
|
valueAccessor?: ChartAccessor<TDatum, number>;
|
|
@@ -26,7 +27,7 @@ export interface SwarmPlotProps<TDatum extends Record<string, any> = Record<stri
|
|
|
26
27
|
legendInteraction?: LegendInteractionMode;
|
|
27
28
|
legendPosition?: LegendPosition;
|
|
28
29
|
tooltip?: TooltipProp;
|
|
29
|
-
annotations?:
|
|
30
|
+
annotations?: Datum[];
|
|
30
31
|
/** Enable brush on the value axis */
|
|
31
32
|
brush?: boolean;
|
|
32
33
|
/** Callback when brush selection changes */
|
|
@@ -43,6 +44,6 @@ export interface SwarmPlotProps<TDatum extends Record<string, any> = Record<stri
|
|
|
43
44
|
frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
|
|
44
45
|
}
|
|
45
46
|
export declare const SwarmPlot: {
|
|
46
|
-
<TDatum extends
|
|
47
|
+
<TDatum extends Datum = Datum>(props: SwarmPlotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
47
48
|
displayName?: string;
|
|
48
49
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
|
|
3
4
|
import type { LegendInteractionMode } from "../shared/hooks";
|
|
4
5
|
import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/types";
|
|
5
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
6
7
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
7
|
-
export interface SwimlaneChartProps<TDatum extends
|
|
8
|
+
export interface SwimlaneChartProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
9
|
/** Data array. Omit for push API mode. */
|
|
9
10
|
data?: TDatum[];
|
|
10
11
|
/** Accessor for lane categories (swim lanes). Default "category". */
|
|
@@ -42,7 +43,7 @@ export interface SwimlaneChartProps<TDatum extends Record<string, any> = Record<
|
|
|
42
43
|
/** Tooltip configuration */
|
|
43
44
|
tooltip?: TooltipProp;
|
|
44
45
|
/** Annotation objects */
|
|
45
|
-
annotations?:
|
|
46
|
+
annotations?: Datum[];
|
|
46
47
|
/** Enable brush on the value axis */
|
|
47
48
|
brush?: boolean;
|
|
48
49
|
/** Callback when brush selection changes */
|
|
@@ -64,6 +65,6 @@ export interface SwimlaneChartProps<TDatum extends Record<string, any> = Record<
|
|
|
64
65
|
frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
|
|
65
66
|
}
|
|
66
67
|
export declare const SwimlaneChart: {
|
|
67
|
-
<TDatum extends
|
|
68
|
+
<TDatum extends Datum = Datum>(props: SwimlaneChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
68
69
|
displayName?: string;
|
|
69
70
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
|
|
3
4
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
4
5
|
import type { BaseChartProps, ChartAccessor, CategoryFormatFn } from "../shared/types";
|
|
5
6
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
6
7
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
7
|
-
export interface ViolinPlotProps<TDatum extends
|
|
8
|
+
export interface ViolinPlotProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
8
9
|
data?: TDatum[];
|
|
9
10
|
categoryAccessor?: ChartAccessor<TDatum, string>;
|
|
10
11
|
valueAccessor?: ChartAccessor<TDatum, number>;
|
|
@@ -25,7 +26,7 @@ export interface ViolinPlotProps<TDatum extends Record<string, any> = Record<str
|
|
|
25
26
|
legendInteraction?: LegendInteractionMode;
|
|
26
27
|
legendPosition?: LegendPosition;
|
|
27
28
|
tooltip?: TooltipProp;
|
|
28
|
-
annotations?:
|
|
29
|
+
annotations?: Datum[];
|
|
29
30
|
/** Enable brush on the value axis */
|
|
30
31
|
brush?: boolean;
|
|
31
32
|
/** Callback when brush selection changes */
|
|
@@ -42,6 +43,6 @@ export interface ViolinPlotProps<TDatum extends Record<string, any> = Record<str
|
|
|
42
43
|
frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
|
|
43
44
|
}
|
|
44
45
|
export declare const ViolinPlot: {
|
|
45
|
-
<TDatum extends
|
|
46
|
+
<TDatum extends Datum = Datum>(props: ViolinPlotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
46
47
|
displayName?: string;
|
|
47
48
|
};
|
|
@@ -5,7 +5,8 @@ import type { ReactNode } from "react";
|
|
|
5
5
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
6
6
|
import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
|
|
7
7
|
import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
8
|
-
|
|
8
|
+
import type { Datum } from "../shared/datumTypes";
|
|
9
|
+
export interface RealtimeHeatmapProps<TDatum extends Datum = Datum> {
|
|
9
10
|
/** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
|
|
10
11
|
mode?: ChartMode;
|
|
11
12
|
/** Chart dimensions as [width, height] */
|
|
@@ -32,7 +33,7 @@ export interface RealtimeHeatmapProps<TDatum extends Record<string, any> = Recor
|
|
|
32
33
|
/** Ring buffer capacity */
|
|
33
34
|
windowSize?: number;
|
|
34
35
|
/** Controlled data array */
|
|
35
|
-
data?:
|
|
36
|
+
data?: Datum[];
|
|
36
37
|
/** Time/x value accessor */
|
|
37
38
|
timeAccessor?: ChartAccessor<TDatum, number>;
|
|
38
39
|
/** Value/y accessor */
|
|
@@ -62,9 +63,9 @@ export interface RealtimeHeatmapProps<TDatum extends Record<string, any> = Recor
|
|
|
62
63
|
/** Callback on hover */
|
|
63
64
|
onHover?: (d: HoverData | null) => void;
|
|
64
65
|
/** Annotation objects */
|
|
65
|
-
annotations?:
|
|
66
|
+
annotations?: Datum[];
|
|
66
67
|
/** SVG annotation render function */
|
|
67
|
-
svgAnnotationRules?: (annotation:
|
|
68
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
68
69
|
/** Custom formatter for time axis ticks */
|
|
69
70
|
tickFormatTime?: (value: number) => string;
|
|
70
71
|
/** Custom formatter for value axis ticks */
|
|
@@ -97,7 +98,7 @@ export interface RealtimeHeatmapProps<TDatum extends Record<string, any> = Recor
|
|
|
97
98
|
/** Legend interaction mode */
|
|
98
99
|
legendInteraction?: LegendInteractionMode;
|
|
99
100
|
/** ID accessor for remove()/update() on the push API */
|
|
100
|
-
pointIdAccessor?: string | ((d:
|
|
101
|
+
pointIdAccessor?: string | ((d: Datum) => string);
|
|
101
102
|
}
|
|
102
103
|
/**
|
|
103
104
|
* RealtimeHeatmap - Streaming heatmap with 2D grid binning.
|
|
@@ -121,6 +122,6 @@ export interface RealtimeHeatmapProps<TDatum extends Record<string, any> = Recor
|
|
|
121
122
|
* ```
|
|
122
123
|
*/
|
|
123
124
|
export declare const RealtimeHeatmap: {
|
|
124
|
-
<TDatum extends
|
|
125
|
+
<TDatum extends Datum = Datum>(props: RealtimeHeatmapProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
125
126
|
displayName?: string;
|
|
126
127
|
};
|
|
@@ -5,7 +5,8 @@ import type { ReactNode } from "react";
|
|
|
5
5
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
6
6
|
import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
|
|
7
7
|
import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
8
|
-
|
|
8
|
+
import type { Datum } from "../shared/datumTypes";
|
|
9
|
+
export interface RealtimeTemporalHistogramProps<TDatum extends Datum = Datum> {
|
|
9
10
|
/** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
|
|
10
11
|
mode?: ChartMode;
|
|
11
12
|
/** Time interval for binning */
|
|
@@ -34,7 +35,7 @@ export interface RealtimeTemporalHistogramProps<TDatum extends Record<string, an
|
|
|
34
35
|
/** Ring buffer capacity */
|
|
35
36
|
windowSize?: number;
|
|
36
37
|
/** Controlled data array */
|
|
37
|
-
data?:
|
|
38
|
+
data?: Datum[];
|
|
38
39
|
/** Time value accessor */
|
|
39
40
|
timeAccessor?: ChartAccessor<TDatum, number>;
|
|
40
41
|
/** Value accessor */
|
|
@@ -61,6 +62,8 @@ export interface RealtimeTemporalHistogramProps<TDatum extends Record<string, an
|
|
|
61
62
|
stroke?: string;
|
|
62
63
|
/** Bar stroke width */
|
|
63
64
|
strokeWidth?: number;
|
|
65
|
+
/** Uniform bar opacity (0–1). Pairs with `color` / `stroke` / `strokeWidth` for the designer-facing primitive vocabulary. */
|
|
66
|
+
opacity?: number;
|
|
64
67
|
/** Gap between bars in pixels */
|
|
65
68
|
gap?: number;
|
|
66
69
|
/** Show canvas-drawn axes */
|
|
@@ -74,9 +77,9 @@ export interface RealtimeTemporalHistogramProps<TDatum extends Record<string, an
|
|
|
74
77
|
/** Callback on hover */
|
|
75
78
|
onHover?: (d: HoverData | null) => void;
|
|
76
79
|
/** Annotation objects */
|
|
77
|
-
annotations?:
|
|
80
|
+
annotations?: Datum[];
|
|
78
81
|
/** SVG annotation render function */
|
|
79
|
-
svgAnnotationRules?: (annotation:
|
|
82
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
80
83
|
/** Custom formatter for time axis ticks */
|
|
81
84
|
tickFormatTime?: (value: number) => string;
|
|
82
85
|
/** Custom formatter for value axis ticks */
|
|
@@ -131,7 +134,7 @@ export interface RealtimeTemporalHistogramProps<TDatum extends Record<string, an
|
|
|
131
134
|
/** Legend interaction mode */
|
|
132
135
|
legendInteraction?: LegendInteractionMode;
|
|
133
136
|
/** ID accessor for remove()/update() on the push API */
|
|
134
|
-
pointIdAccessor?: string | ((d:
|
|
137
|
+
pointIdAccessor?: string | ((d: Datum) => string);
|
|
135
138
|
}
|
|
136
139
|
/**
|
|
137
140
|
* RealtimeTemporalHistogram - Streaming temporal histogram.
|
|
@@ -164,12 +167,12 @@ export interface RealtimeTemporalHistogramProps<TDatum extends Record<string, an
|
|
|
164
167
|
* ```
|
|
165
168
|
*/
|
|
166
169
|
export declare const RealtimeTemporalHistogram: {
|
|
167
|
-
<TDatum extends
|
|
170
|
+
<TDatum extends Datum = Datum>(props: RealtimeTemporalHistogramProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
168
171
|
displayName?: string;
|
|
169
172
|
};
|
|
170
173
|
/** @deprecated Use RealtimeTemporalHistogram instead */
|
|
171
174
|
export declare const RealtimeHistogram: {
|
|
172
|
-
<TDatum extends
|
|
175
|
+
<TDatum extends Datum = Datum>(props: RealtimeTemporalHistogramProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
173
176
|
displayName?: string;
|
|
174
177
|
};
|
|
175
178
|
/** @deprecated Use RealtimeTemporalHistogramProps instead */
|
|
@@ -5,7 +5,8 @@ import type { ReactNode } from "react";
|
|
|
5
5
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
6
6
|
import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
|
|
7
7
|
import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
8
|
-
|
|
8
|
+
import type { Datum } from "../shared/datumTypes";
|
|
9
|
+
export interface RealtimeLineChartProps<TDatum extends Datum = Datum> {
|
|
9
10
|
/** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
|
|
10
11
|
mode?: ChartMode;
|
|
11
12
|
/** Chart dimensions as [width, height] */
|
|
@@ -32,7 +33,7 @@ export interface RealtimeLineChartProps<TDatum extends Record<string, any> = Rec
|
|
|
32
33
|
/** Ring buffer capacity */
|
|
33
34
|
windowSize?: number;
|
|
34
35
|
/** Controlled data array */
|
|
35
|
-
data?:
|
|
36
|
+
data?: Datum[];
|
|
36
37
|
/** Time value accessor */
|
|
37
38
|
timeAccessor?: ChartAccessor<TDatum, number>;
|
|
38
39
|
/** Value accessor */
|
|
@@ -49,6 +50,8 @@ export interface RealtimeLineChartProps<TDatum extends Record<string, any> = Rec
|
|
|
49
50
|
strokeWidth?: number;
|
|
50
51
|
/** Dash pattern (e.g. "4,2") */
|
|
51
52
|
strokeDasharray?: string;
|
|
53
|
+
/** Uniform line opacity (0–1). Pairs with `stroke` / `strokeWidth` for the designer-facing primitive vocabulary. */
|
|
54
|
+
opacity?: number;
|
|
52
55
|
/** Show canvas-drawn axes */
|
|
53
56
|
showAxes?: boolean;
|
|
54
57
|
/** Background fill color */
|
|
@@ -60,9 +63,9 @@ export interface RealtimeLineChartProps<TDatum extends Record<string, any> = Rec
|
|
|
60
63
|
/** Callback on hover */
|
|
61
64
|
onHover?: (d: HoverData | null) => void;
|
|
62
65
|
/** Annotation objects */
|
|
63
|
-
annotations?:
|
|
66
|
+
annotations?: Datum[];
|
|
64
67
|
/** SVG annotation render function */
|
|
65
|
-
svgAnnotationRules?: (annotation:
|
|
68
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
66
69
|
/** Custom formatter for time axis ticks */
|
|
67
70
|
tickFormatTime?: (value: number) => string;
|
|
68
71
|
/** Custom formatter for value axis ticks */
|
|
@@ -97,7 +100,7 @@ export interface RealtimeLineChartProps<TDatum extends Record<string, any> = Rec
|
|
|
97
100
|
/** Legend interaction mode */
|
|
98
101
|
legendInteraction?: LegendInteractionMode;
|
|
99
102
|
/** ID accessor for remove()/update() on the push API */
|
|
100
|
-
pointIdAccessor?: string | ((d:
|
|
103
|
+
pointIdAccessor?: string | ((d: Datum) => string);
|
|
101
104
|
}
|
|
102
105
|
/**
|
|
103
106
|
* RealtimeLineChart - Simplified wrapper for streaming line charts.
|
|
@@ -119,6 +122,6 @@ export interface RealtimeLineChartProps<TDatum extends Record<string, any> = Rec
|
|
|
119
122
|
* ```
|
|
120
123
|
*/
|
|
121
124
|
export declare const RealtimeLineChart: {
|
|
122
|
-
<TDatum extends
|
|
125
|
+
<TDatum extends Datum = Datum>(props: RealtimeLineChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
123
126
|
displayName?: string;
|
|
124
127
|
};
|
|
@@ -5,7 +5,8 @@ import type { ReactNode } from "react";
|
|
|
5
5
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
6
6
|
import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
|
|
7
7
|
import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
8
|
-
|
|
8
|
+
import type { Datum } from "../shared/datumTypes";
|
|
9
|
+
export interface RealtimeSwarmChartProps<TDatum extends Datum = Datum> {
|
|
9
10
|
/** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
|
|
10
11
|
mode?: ChartMode;
|
|
11
12
|
/** Chart dimensions as [width, height] */
|
|
@@ -32,7 +33,7 @@ export interface RealtimeSwarmChartProps<TDatum extends Record<string, any> = Re
|
|
|
32
33
|
/** Ring buffer capacity */
|
|
33
34
|
windowSize?: number;
|
|
34
35
|
/** Controlled data array */
|
|
35
|
-
data?:
|
|
36
|
+
data?: Datum[];
|
|
36
37
|
/** Time value accessor */
|
|
37
38
|
timeAccessor?: ChartAccessor<TDatum, number>;
|
|
38
39
|
/** Value accessor */
|
|
@@ -68,9 +69,9 @@ export interface RealtimeSwarmChartProps<TDatum extends Record<string, any> = Re
|
|
|
68
69
|
/** Callback on hover */
|
|
69
70
|
onHover?: (d: HoverData | null) => void;
|
|
70
71
|
/** Annotation objects (including threshold coloring) */
|
|
71
|
-
annotations?:
|
|
72
|
+
annotations?: Datum[];
|
|
72
73
|
/** SVG annotation render function */
|
|
73
|
-
svgAnnotationRules?: (annotation:
|
|
74
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
74
75
|
/** Custom formatter for time axis ticks */
|
|
75
76
|
tickFormatTime?: (value: number) => string;
|
|
76
77
|
/** Custom formatter for value axis ticks */
|
|
@@ -97,7 +98,7 @@ export interface RealtimeSwarmChartProps<TDatum extends Record<string, any> = Re
|
|
|
97
98
|
/** Legend interaction mode */
|
|
98
99
|
legendInteraction?: LegendInteractionMode;
|
|
99
100
|
/** ID accessor for remove()/update() on the push API */
|
|
100
|
-
pointIdAccessor?: string | ((d:
|
|
101
|
+
pointIdAccessor?: string | ((d: Datum) => string);
|
|
101
102
|
}
|
|
102
103
|
/**
|
|
103
104
|
* RealtimeSwarmChart - Simplified wrapper for streaming dot/swarm charts.
|
|
@@ -121,6 +122,6 @@ export interface RealtimeSwarmChartProps<TDatum extends Record<string, any> = Re
|
|
|
121
122
|
* ```
|
|
122
123
|
*/
|
|
123
124
|
export declare const RealtimeSwarmChart: {
|
|
124
|
-
<TDatum extends
|
|
125
|
+
<TDatum extends Datum = Datum>(props: RealtimeSwarmChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
125
126
|
displayName?: string;
|
|
126
127
|
};
|
|
@@ -5,7 +5,8 @@ import type { ReactNode } from "react";
|
|
|
5
5
|
import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
6
6
|
import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
|
|
7
7
|
import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
8
|
-
|
|
8
|
+
import type { Datum } from "../shared/datumTypes";
|
|
9
|
+
export interface RealtimeWaterfallChartProps<TDatum extends Datum = Datum> {
|
|
9
10
|
/** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
|
|
10
11
|
mode?: ChartMode;
|
|
11
12
|
/** Chart dimensions as [width, height] */
|
|
@@ -32,7 +33,7 @@ export interface RealtimeWaterfallChartProps<TDatum extends Record<string, any>
|
|
|
32
33
|
/** Ring buffer capacity */
|
|
33
34
|
windowSize?: number;
|
|
34
35
|
/** Controlled data array */
|
|
35
|
-
data?:
|
|
36
|
+
data?: Datum[];
|
|
36
37
|
/** Time value accessor */
|
|
37
38
|
timeAccessor?: ChartAccessor<TDatum, number>;
|
|
38
39
|
/** Value accessor (positive = gain, negative = loss) */
|
|
@@ -57,6 +58,8 @@ export interface RealtimeWaterfallChartProps<TDatum extends Record<string, any>
|
|
|
57
58
|
stroke?: string;
|
|
58
59
|
/** Bar stroke width */
|
|
59
60
|
strokeWidth?: number;
|
|
61
|
+
/** Uniform bar opacity (0–1). */
|
|
62
|
+
opacity?: number;
|
|
60
63
|
/** Show canvas-drawn axes */
|
|
61
64
|
showAxes?: boolean;
|
|
62
65
|
/** Background fill color */
|
|
@@ -68,9 +71,9 @@ export interface RealtimeWaterfallChartProps<TDatum extends Record<string, any>
|
|
|
68
71
|
/** Callback on hover */
|
|
69
72
|
onHover?: (d: HoverData | null) => void;
|
|
70
73
|
/** Annotation objects */
|
|
71
|
-
annotations?:
|
|
74
|
+
annotations?: Datum[];
|
|
72
75
|
/** SVG annotation render function */
|
|
73
|
-
svgAnnotationRules?: (annotation:
|
|
76
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
74
77
|
/** Custom formatter for time axis ticks */
|
|
75
78
|
tickFormatTime?: (value: number) => string;
|
|
76
79
|
/** Custom formatter for value axis ticks */
|
|
@@ -97,7 +100,7 @@ export interface RealtimeWaterfallChartProps<TDatum extends Record<string, any>
|
|
|
97
100
|
/** Legend interaction mode */
|
|
98
101
|
legendInteraction?: LegendInteractionMode;
|
|
99
102
|
/** ID accessor for remove()/update() on the push API */
|
|
100
|
-
pointIdAccessor?: string | ((d:
|
|
103
|
+
pointIdAccessor?: string | ((d: Datum) => string);
|
|
101
104
|
}
|
|
102
105
|
/**
|
|
103
106
|
* RealtimeWaterfallChart - Simplified wrapper for streaming waterfall charts.
|
|
@@ -118,6 +121,6 @@ export interface RealtimeWaterfallChartProps<TDatum extends Record<string, any>
|
|
|
118
121
|
* ```
|
|
119
122
|
*/
|
|
120
123
|
export declare const RealtimeWaterfallChart: {
|
|
121
|
-
<TDatum extends
|
|
124
|
+
<TDatum extends Datum = Datum>(props: RealtimeWaterfallChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
122
125
|
displayName?: string;
|
|
123
126
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
export interface ChartErrorProps {
|
|
3
2
|
/** Component name for the error message */
|
|
4
3
|
componentName: string;
|
|
@@ -18,4 +17,4 @@ export interface ChartErrorProps {
|
|
|
18
17
|
* Designed to be obvious in development but not alarming in production —
|
|
19
18
|
* uses muted colors that adapt to light/dark backgrounds.
|
|
20
19
|
*/
|
|
21
|
-
export default function ChartError({ componentName, message, diagnosticHint, width, height, }: ChartErrorProps):
|
|
20
|
+
export default function ChartError({ componentName, message, diagnosticHint, width, height, }: ChartErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "./datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Coordinate resolution helpers for annotations.
|
|
3
4
|
*
|
|
@@ -9,15 +10,15 @@
|
|
|
9
10
|
* Consumed by: annotationRules.tsx (all annotation type renderers)
|
|
10
11
|
*/
|
|
11
12
|
import type { AnnotationContext } from "../../realtime/types";
|
|
12
|
-
export declare function resolveX(ann:
|
|
13
|
-
export declare function resolveY(ann:
|
|
13
|
+
export declare function resolveX(ann: Datum, context: AnnotationContext): number | null;
|
|
14
|
+
export declare function resolveY(ann: Datum, context: AnnotationContext): number | null;
|
|
14
15
|
/**
|
|
15
16
|
* Resolve annotation position respecting anchor mode.
|
|
16
17
|
* - "fixed" (default): resolve from annotation's own fields
|
|
17
18
|
* - "latest": resolve from the most recent datum in the buffer
|
|
18
19
|
* - "sticky": resolve from annotation fields; if not found, use cached position
|
|
19
20
|
*/
|
|
20
|
-
export declare function resolveAnchoredPosition(ann:
|
|
21
|
+
export declare function resolveAnchoredPosition(ann: Datum, index: number, context: AnnotationContext): {
|
|
21
22
|
x: number;
|
|
22
23
|
y: number;
|
|
23
24
|
} | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { AnnotationContext } from "../../realtime/types";
|
|
3
|
-
|
|
3
|
+
import type { Datum } from "./datumTypes";
|
|
4
|
+
export declare function createDefaultAnnotationRules(_frameType: "xy" | "ordinal" | "network"): (annotation: Datum, index: number, context: AnnotationContext) => React.ReactNode | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { interpolateBlues, interpolateReds, interpolateGreens, interpolateOranges, interpolatePurples, interpolateViridis, interpolatePlasma } from "d3-scale-chromatic";
|
|
2
|
+
import type { Datum } from "./datumTypes";
|
|
2
3
|
/**
|
|
3
4
|
* Predefined color schemes
|
|
4
5
|
*/
|
|
@@ -45,7 +46,7 @@ export declare const DEPTH_PALETTE_COLORS: string[];
|
|
|
45
46
|
* getColor({value: 10}, d => d.value > 5 ? 'red' : 'blue')
|
|
46
47
|
* ```
|
|
47
48
|
*/
|
|
48
|
-
export declare function getColor(dataPoint: any, colorBy: string | ((d:
|
|
49
|
+
export declare function getColor(dataPoint: any, colorBy: string | ((d: Datum) => string), colorScale?: (v: any) => string): string;
|
|
49
50
|
/**
|
|
50
51
|
* Creates a color scale function from data
|
|
51
52
|
*
|
|
@@ -60,7 +61,7 @@ export declare function getColor(dataPoint: any, colorBy: string | ((d: any) =>
|
|
|
60
61
|
* const color = colorScale('A') // Returns color for category 'A'
|
|
61
62
|
* ```
|
|
62
63
|
*/
|
|
63
|
-
export declare function createColorScale(data: Array<
|
|
64
|
+
export declare function createColorScale(data: Array<Datum>, colorBy: string, scheme?: string | string[]): (v: string) => string;
|
|
64
65
|
/**
|
|
65
66
|
* Generates a size function based on sizeBy configuration
|
|
66
67
|
*
|
|
@@ -70,4 +71,4 @@ export declare function createColorScale(data: Array<Record<string, any>>, color
|
|
|
70
71
|
* @param domain - Optional domain for scaling [minValue, maxValue]
|
|
71
72
|
* @returns Size value
|
|
72
73
|
*/
|
|
73
|
-
export declare function getSize(dataPoint: any, sizeBy: string | ((d:
|
|
74
|
+
export declare function getSize(dataPoint: any, sizeBy: string | ((d: Datum) => number), sizeRange?: [number, number], domain?: [number, number]): number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Datum` — the canonical "user-supplied chart data row" type.
|
|
3
|
+
*
|
|
4
|
+
* A charting library cannot know the shape of the user's data ahead of time.
|
|
5
|
+
* This alias names that intent: "an object whose field types we do not know
|
|
6
|
+
* until the user plugs in a concrete generic." Every HOC threads a
|
|
7
|
+
* `<TDatum extends Datum = Datum>` generic so accessors can autocomplete
|
|
8
|
+
* user field names when a concrete type is supplied, while still accepting
|
|
9
|
+
* arbitrary data otherwise.
|
|
10
|
+
*
|
|
11
|
+
* Why `any` (and not `unknown`) on the value side: the library and user code
|
|
12
|
+
* both do unguarded field access (`d.x`, `d[accessor]`, `...d` spreads). With
|
|
13
|
+
* `unknown`, each access would require a narrowing step that adds no runtime
|
|
14
|
+
* safety (the data is still dynamically shaped at runtime) but imposes
|
|
15
|
+
* ergonomic cost on every user accessor function and every internal pass
|
|
16
|
+
* that augments rows. The `any` in this specific alias is the single,
|
|
17
|
+
* documented, library-wide allowance; it's the "clear and established
|
|
18
|
+
* reason" referenced by the lint policy for `@typescript-eslint/no-explicit-any`.
|
|
19
|
+
*/
|
|
20
|
+
export type Datum = Record<string, any>;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* diagnoseConfig — anti-pattern detector for Semiotic chart configurations.
|
|
3
|
-
*
|
|
4
|
-
* Catches common failure modes that produce blank charts or runtime errors,
|
|
5
|
-
* returning actionable fix instructions for each issue found.
|
|
6
|
-
*/
|
|
1
|
+
import type { Datum } from "./datumTypes";
|
|
7
2
|
export interface Diagnosis {
|
|
8
3
|
severity: "error" | "warning";
|
|
9
4
|
code: string;
|
|
@@ -20,4 +15,4 @@ export interface DiagnosisResult {
|
|
|
20
15
|
* Returns actionable diagnoses with severity, code, message, and fix instruction.
|
|
21
16
|
* Runs validateProps internally — validation errors are included as diagnoses.
|
|
22
17
|
*/
|
|
23
|
-
export declare function diagnoseConfig(componentName: string, props:
|
|
18
|
+
export declare function diagnoseConfig(componentName: string, props: Datum): DiagnosisResult;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Datum } from "./datumTypes";
|
|
1
3
|
/**
|
|
2
4
|
* Format number with specified format string
|
|
3
5
|
*
|
|
@@ -38,7 +40,7 @@ export declare function formatAxis(type?: "number" | "date" | "percent" | "curre
|
|
|
38
40
|
decimals?: number;
|
|
39
41
|
format?: string;
|
|
40
42
|
currency?: string;
|
|
41
|
-
}): (d:
|
|
43
|
+
}): (d: number | string | Date) => string;
|
|
42
44
|
/**
|
|
43
45
|
* Creates a tooltip content generator
|
|
44
46
|
*
|
|
@@ -56,7 +58,7 @@ export declare function formatAxis(type?: "number" | "date" | "percent" | "curre
|
|
|
56
58
|
* )
|
|
57
59
|
* ```
|
|
58
60
|
*/
|
|
59
|
-
export declare function createTooltip(fields: string[], formatters?: Record<string, (v: any) => string>, labels?: Record<string, string>): (d:
|
|
61
|
+
export declare function createTooltip(fields: string[], formatters?: Record<string, (v: any) => string>, labels?: Record<string, string>): (d: Datum) => React.JSX.Element;
|
|
60
62
|
/**
|
|
61
63
|
* Formats large numbers with K/M/B suffixes
|
|
62
64
|
*
|