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