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
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
|
};
|
|
@@ -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";
|
|
@@ -43,7 +44,7 @@ export interface CenterlineStyle {
|
|
|
43
44
|
/**
|
|
44
45
|
* QuadrantChart component props
|
|
45
46
|
*/
|
|
46
|
-
export interface QuadrantChartProps<TDatum extends
|
|
47
|
+
export interface QuadrantChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
|
|
47
48
|
/** Array of data points */
|
|
48
49
|
data?: TDatum[];
|
|
49
50
|
/** Field name or function to access x values @default "x" */
|
|
@@ -89,7 +90,7 @@ export interface QuadrantChartProps<TDatum extends Record<string, any> = Record<
|
|
|
89
90
|
/** Legend position */
|
|
90
91
|
legendPosition?: LegendPosition;
|
|
91
92
|
/** Annotation objects */
|
|
92
|
-
annotations?:
|
|
93
|
+
annotations?: Datum[];
|
|
93
94
|
/** Additional StreamXYFrame props */
|
|
94
95
|
frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
|
|
95
96
|
}
|
|
@@ -115,6 +116,6 @@ export interface QuadrantChartProps<TDatum extends Record<string, any> = Record<
|
|
|
115
116
|
* ```
|
|
116
117
|
*/
|
|
117
118
|
export declare const QuadrantChart: {
|
|
118
|
-
<TDatum extends
|
|
119
|
+
<TDatum extends Datum = Datum>(props: QuadrantChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
119
120
|
displayName?: string;
|
|
120
121
|
};
|
|
@@ -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 { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
|
7
8
|
/**
|
|
8
9
|
* Scatterplot component props
|
|
9
10
|
*/
|
|
10
|
-
export interface ScatterplotProps<TDatum extends
|
|
11
|
+
export interface ScatterplotProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
|
|
11
12
|
/** Array of data points. Each point should have x and y properties. */
|
|
12
13
|
data?: TDatum[];
|
|
13
14
|
/** Field name or function to access x values @default "x" */
|
|
@@ -43,7 +44,7 @@ export interface ScatterplotProps<TDatum extends Record<string, any> = Record<st
|
|
|
43
44
|
/** Legend position */
|
|
44
45
|
legendPosition?: LegendPosition;
|
|
45
46
|
/** Annotation objects to render on the chart */
|
|
46
|
-
annotations?:
|
|
47
|
+
annotations?: Datum[];
|
|
47
48
|
/** Additional StreamXYFrame props for advanced customization */
|
|
48
49
|
frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
|
|
49
50
|
}
|
|
@@ -60,6 +61,6 @@ export interface ScatterplotProps<TDatum extends Record<string, any> = Record<st
|
|
|
60
61
|
* ```
|
|
61
62
|
*/
|
|
62
63
|
export declare const Scatterplot: {
|
|
63
|
-
<TDatum extends
|
|
64
|
+
<TDatum extends Datum = Datum>(props: ScatterplotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
64
65
|
displayName?: string;
|
|
65
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
2
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
3
3
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
4
|
-
export interface ScatterplotMatrixProps<TDatum extends
|
|
4
|
+
export interface ScatterplotMatrixProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
5
5
|
/** Array of data objects */
|
|
6
6
|
data: TDatum[];
|
|
7
7
|
/** Array of field names to include in the matrix */
|
|
@@ -65,7 +65,7 @@ export interface ScatterplotMatrixProps<TDatum extends Record<string, any> = Rec
|
|
|
65
65
|
* />
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare function ScatterplotMatrix<TDatum extends
|
|
68
|
+
export declare function ScatterplotMatrix<TDatum extends Datum = Datum>(props: ScatterplotMatrixProps<TDatum>): import("react/jsx-runtime").JSX.Element;
|
|
69
69
|
export declare namespace ScatterplotMatrix {
|
|
70
70
|
var displayName: string;
|
|
71
71
|
}
|
|
@@ -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
|
* StackedAreaChart component props
|
|
9
10
|
*/
|
|
10
|
-
export interface StackedAreaChartProps<TDatum extends
|
|
11
|
+
export interface StackedAreaChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
|
|
11
12
|
/**
|
|
12
13
|
* Array of data points, grouped by category.
|
|
13
14
|
* @example
|
|
@@ -124,7 +125,7 @@ export interface StackedAreaChartProps<TDatum extends Record<string, any> = Reco
|
|
|
124
125
|
/**
|
|
125
126
|
* Annotation objects to render on the chart
|
|
126
127
|
*/
|
|
127
|
-
annotations?:
|
|
128
|
+
annotations?: Datum[];
|
|
128
129
|
/**
|
|
129
130
|
* Additional StreamXYFrame props for advanced customization
|
|
130
131
|
* For full control, consider using StreamXYFrame directly
|
|
@@ -157,6 +158,6 @@ export interface StackedAreaChartProps<TDatum extends Record<string, any> = Reco
|
|
|
157
158
|
* ```
|
|
158
159
|
*/
|
|
159
160
|
export declare const StackedAreaChart: {
|
|
160
|
-
<TDatum extends
|
|
161
|
+
<TDatum extends Datum = Datum>(props: StackedAreaChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
161
162
|
displayName?: string;
|
|
162
163
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Data transform helpers for common data shapes.
|
|
3
4
|
* Import from "semiotic/data"
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
* Bin continuous data into histogram-ready format.
|
|
7
8
|
* Returns array of { category, value } objects suitable for BarChart.
|
|
8
9
|
*/
|
|
9
|
-
export declare function bin<T extends
|
|
10
|
+
export declare function bin<T extends Datum>(data: T[], options: {
|
|
10
11
|
field: string;
|
|
11
12
|
bins?: number;
|
|
12
13
|
domain?: [number, number];
|
|
@@ -18,28 +19,28 @@ export declare function bin<T extends Record<string, any>>(data: T[], options: {
|
|
|
18
19
|
* Group and aggregate data.
|
|
19
20
|
* Returns array of { [groupBy]: string, value: number } objects.
|
|
20
21
|
*/
|
|
21
|
-
export declare function rollup<T extends
|
|
22
|
+
export declare function rollup<T extends Datum>(data: T[], options: {
|
|
22
23
|
groupBy: string;
|
|
23
24
|
value: string;
|
|
24
25
|
agg?: "sum" | "mean" | "count" | "min" | "max";
|
|
25
|
-
}):
|
|
26
|
+
}): Datum[];
|
|
26
27
|
/**
|
|
27
28
|
* Group flat rows into line-chart-ready nested format.
|
|
28
29
|
* Returns array of { id, coordinates } objects for LineChart with lineBy.
|
|
29
30
|
*/
|
|
30
|
-
export declare function groupBy<T extends
|
|
31
|
+
export declare function groupBy<T extends Datum>(data: T[], options: {
|
|
31
32
|
key: string;
|
|
32
33
|
fields?: string[];
|
|
33
34
|
}): {
|
|
34
35
|
id: string;
|
|
35
|
-
coordinates:
|
|
36
|
+
coordinates: Datum[];
|
|
36
37
|
}[];
|
|
37
38
|
/**
|
|
38
39
|
* Pivot wide data to long format.
|
|
39
40
|
* Converts column-per-variable to row-per-variable.
|
|
40
41
|
*/
|
|
41
|
-
export declare function pivot<T extends
|
|
42
|
+
export declare function pivot<T extends Datum>(data: T[], options: {
|
|
42
43
|
columns: string[];
|
|
43
44
|
nameField?: string;
|
|
44
45
|
valueField?: string;
|
|
45
|
-
}):
|
|
46
|
+
}): Datum[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { SerializedSelections } from "./selectionSerializer";
|
|
2
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
3
|
export interface ChartConfig {
|
|
3
4
|
/** Component name, e.g. "LineChart", "SankeyDiagram" */
|
|
4
5
|
component: string;
|
|
5
6
|
/** Serializable props only — functions and React elements stripped */
|
|
6
|
-
props:
|
|
7
|
+
props: Datum;
|
|
7
8
|
/** Config schema version */
|
|
8
9
|
version: string;
|
|
9
10
|
/** ISO 8601 timestamp */
|
|
@@ -18,10 +19,10 @@ export interface ToConfigOptions {
|
|
|
18
19
|
selections?: SerializedSelections;
|
|
19
20
|
}
|
|
20
21
|
export type CopyFormat = "json" | "jsx";
|
|
21
|
-
export declare function toConfig(componentName: string, props:
|
|
22
|
+
export declare function toConfig(componentName: string, props: Datum, options?: ToConfigOptions): ChartConfig;
|
|
22
23
|
export declare function fromConfig(config: ChartConfig): {
|
|
23
24
|
componentName: string;
|
|
24
|
-
props:
|
|
25
|
+
props: Datum;
|
|
25
26
|
};
|
|
26
27
|
export declare function toURL(config: ChartConfig): string;
|
|
27
28
|
export declare function fromURL(urlString: string): ChartConfig;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Merge external data into GeoJSON features by joining on a key field.
|
|
3
4
|
*
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
* Cross-pollination: This pattern (key-based data join) could be extracted
|
|
13
14
|
* to a shared utility for any data merge operation in Semiotic.
|
|
14
15
|
*/
|
|
15
|
-
export declare function mergeData<T extends
|
|
16
|
+
export declare function mergeData<T extends Datum>(features: GeoJSON.Feature[], data: T[], options: {
|
|
16
17
|
featureKey: string;
|
|
17
18
|
dataKey: string;
|
|
18
19
|
}): GeoJSON.Feature[];
|