semiotic 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +16 -3
- package/ai/schema.json +42 -1
- package/ai/system-prompt.md +4 -0
- package/dist/components/Annotation.d.ts +42 -2
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/ChartGrid.d.ts +1 -1
- package/dist/components/ContextLayout.d.ts +1 -1
- package/dist/components/DataSummaryContext.d.ts +1 -1
- package/dist/components/DetailsPanel.d.ts +3 -2
- package/dist/components/Legend.d.ts +2 -3
- package/dist/components/LinkedCharts.d.ts +1 -1
- package/dist/components/ThemeProvider.d.ts +1 -1
- package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -3
- package/dist/components/charts/geo/ChoroplethMap.d.ts +4 -4
- package/dist/components/charts/geo/DistanceCartogram.d.ts +5 -4
- package/dist/components/charts/geo/FlowMap.d.ts +4 -4
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +4 -3
- package/dist/components/charts/index.d.ts +2 -0
- package/dist/components/charts/network/ChordDiagram.d.ts +4 -3
- package/dist/components/charts/network/CirclePack.d.ts +3 -3
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +3 -2
- package/dist/components/charts/network/OrbitDiagram.d.ts +6 -5
- package/dist/components/charts/network/SankeyDiagram.d.ts +4 -3
- package/dist/components/charts/network/TreeDiagram.d.ts +3 -3
- package/dist/components/charts/network/Treemap.d.ts +3 -3
- package/dist/components/charts/ordinal/BarChart.d.ts +24 -4
- package/dist/components/charts/ordinal/BoxPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/DonutChart.d.ts +4 -3
- package/dist/components/charts/ordinal/DotPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/FunnelChart.d.ts +4 -3
- package/dist/components/charts/ordinal/GaugeChart.d.ts +2 -1
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
- package/dist/components/charts/ordinal/LikertChart.d.ts +4 -3
- package/dist/components/charts/ordinal/PieChart.d.ts +4 -3
- package/dist/components/charts/ordinal/RidgelinePlot.d.ts +4 -3
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -3
- package/dist/components/charts/ordinal/ViolinPlot.d.ts +4 -3
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +9 -6
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -6
- package/dist/components/charts/shared/ChartError.d.ts +1 -2
- package/dist/components/charts/shared/annotationResolvers.d.ts +4 -3
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- package/dist/components/charts/shared/colorUtils.d.ts +4 -3
- package/dist/components/charts/shared/datumTypes.d.ts +20 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +2 -7
- package/dist/components/charts/shared/formatUtils.d.ts +4 -2
- package/dist/components/charts/shared/hooks.d.ts +27 -23
- package/dist/components/charts/shared/legendUtils.d.ts +3 -2
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +43 -0
- package/dist/components/charts/shared/networkUtils.d.ts +7 -6
- package/dist/components/charts/shared/selectionUtils.d.ts +5 -4
- package/dist/components/charts/shared/statisticalOverlays.d.ts +14 -26
- package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +2 -2
- package/dist/components/charts/shared/statsTooltip.d.ts +3 -2
- package/dist/components/charts/shared/tooltipUtils.d.ts +7 -6
- package/dist/components/charts/shared/types.d.ts +22 -13
- package/dist/components/charts/shared/useChartSetup.d.ts +7 -6
- package/dist/components/charts/shared/useLikertAggregation.d.ts +18 -7
- package/dist/components/charts/shared/useOrdinalStreaming.d.ts +3 -2
- package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -1
- package/dist/components/charts/shared/validateChartData.d.ts +2 -1
- package/dist/components/charts/shared/validateProps.d.ts +2 -8
- package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +4 -3
- package/dist/components/charts/xy/BubbleChart.d.ts +4 -3
- package/dist/components/charts/xy/CandlestickChart.d.ts +47 -0
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -3
- package/dist/components/charts/xy/Heatmap.d.ts +12 -7
- package/dist/components/charts/xy/LineChart.d.ts +4 -3
- package/dist/components/charts/xy/MinimapChart.d.ts +4 -4
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +5 -4
- package/dist/components/charts/xy/QuadrantChart.d.ts +4 -3
- package/dist/components/charts/xy/Scatterplot.d.ts +4 -3
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +3 -3
- package/dist/components/charts/xy/StackedAreaChart.d.ts +4 -3
- package/dist/components/data/transforms.d.ts +8 -7
- package/dist/components/export/chartConfig.d.ts +4 -3
- package/dist/components/geo/mergeData.d.ts +2 -1
- package/dist/components/realtime/BinAccumulator.d.ts +3 -2
- package/dist/components/realtime/renderers/types.d.ts +2 -1
- package/dist/components/realtime/renderers/waterfallRenderer.d.ts +2 -1
- package/dist/components/realtime/types.d.ts +20 -16
- package/dist/components/semiotic-themes.d.ts +2 -1
- package/dist/components/semiotic-xy.d.ts +2 -0
- package/dist/components/semiotic.d.ts +3 -3
- package/dist/components/server/animatedGif.d.ts +4 -18
- package/dist/components/server/renderToStaticSVG.d.ts +5 -4
- package/dist/components/server/serverChartConfigs.d.ts +2 -10
- package/dist/components/server/staticAnnotations.d.ts +2 -1
- package/dist/components/server/staticLegend.d.ts +2 -1
- package/dist/components/store/ObservationStore.d.ts +4 -3
- package/dist/components/store/SelectionStore.d.ts +3 -8
- package/dist/components/store/ThemeStore.d.ts +32 -4
- package/dist/components/store/TooltipStore.d.ts +1 -1
- package/dist/components/store/useSelection.d.ts +6 -5
- package/dist/components/stream/AccessibleDataTable.d.ts +5 -5
- package/dist/components/stream/CanvasHitTester.d.ts +2 -1
- package/dist/components/stream/DataSourceAdapter.d.ts +2 -1
- package/dist/components/stream/FocusRing.d.ts +1 -2
- package/dist/components/stream/GeoParticlePool.d.ts +2 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +7 -6
- package/dist/components/stream/MarginalGraphics.d.ts +1 -2
- package/dist/components/stream/NetworkPipelineStore.d.ts +3 -2
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -4
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
- package/dist/components/stream/OrdinalPipelineStore.d.ts +6 -5
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
- package/dist/components/stream/PipelineStore.d.ts +63 -28
- package/dist/components/stream/SVGOverlay.d.ts +10 -10
- package/dist/components/stream/SceneGraph.d.ts +6 -5
- package/dist/components/stream/StreamGeoFrame.d.ts +2 -1
- package/dist/components/stream/StreamNetworkFrame.d.ts +2 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +2 -1
- package/dist/components/stream/StreamXYFrame.d.ts +2 -1
- package/dist/components/stream/XYBrushOverlay.d.ts +1 -21
- package/dist/components/stream/devDataAccessWarning.d.ts +2 -11
- package/dist/components/stream/geoTypes.d.ts +25 -18
- package/dist/components/stream/hoverUtils.d.ts +2 -1
- package/dist/components/stream/layouts/hierarchySceneBuilders.d.ts +4 -3
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +4 -3
- package/dist/components/stream/networkTypes.d.ts +33 -28
- package/dist/components/stream/ordinalSceneBuilders/barFunnelScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/barScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/connectorScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/pointScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/statisticalScene.d.ts +4 -4
- package/dist/components/stream/ordinalSceneBuilders/swimlaneScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/timelineScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +9 -8
- package/dist/components/stream/ordinalTypes.d.ts +54 -22
- package/dist/components/stream/pipelineDecay.d.ts +2 -1
- package/dist/components/stream/pipelinePulse.d.ts +2 -1
- package/dist/components/stream/pipelineTransitions.d.ts +16 -4
- package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
- package/dist/components/stream/types.d.ts +45 -8
- package/dist/components/stream/xySceneBuilders/areaScene.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/barScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/boundsScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/emitPointNodes.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/lineScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/mixedScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/types.d.ts +35 -26
- package/dist/components/stream/xySceneBuilders/waterfallScene.d.ts +2 -1
- package/dist/components/types/marginType.d.ts +15 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-statisticalOverlays-Ckd_jM8z.js +1 -0
- package/dist/semiotic-themes.d.ts +2 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +2 -0
- package/dist/semiotic.d.ts +3 -3
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/test-utils/canvasMock.d.ts +10 -2
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +38 -31
- package/dist/components/types/annotationTypes.d.ts +0 -145
- package/dist/components/types/generalTypes.d.ts +0 -241
- package/dist/components/types/interactionTypes.d.ts +0 -72
- package/dist/components/types/networkTypes.d.ts +0 -174
- package/dist/components/types/ordinalTypes.d.ts +0 -112
- package/dist/semiotic-statisticalOverlays-DGX_WWc5.js +0 -1
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { RenderPipelineType, DataAccessor } from "./generalTypes";
|
|
2
|
-
import { GeneralFrameProps, GeneralFrameState } from "./generalTypes";
|
|
3
|
-
export interface NodeType {
|
|
4
|
-
degree: number;
|
|
5
|
-
inDegree: number;
|
|
6
|
-
outDegree: number;
|
|
7
|
-
id?: string;
|
|
8
|
-
createdByFrame?: boolean;
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
x1: number;
|
|
12
|
-
x0: number;
|
|
13
|
-
y1: number;
|
|
14
|
-
y0: number;
|
|
15
|
-
height: number;
|
|
16
|
-
width: number;
|
|
17
|
-
radius: number;
|
|
18
|
-
direction: string;
|
|
19
|
-
textHeight: number;
|
|
20
|
-
textWidth: number;
|
|
21
|
-
fontSize: number;
|
|
22
|
-
fontWeight?: number;
|
|
23
|
-
rotate?: number;
|
|
24
|
-
scale: number;
|
|
25
|
-
_NWFText?: string;
|
|
26
|
-
text?: string;
|
|
27
|
-
r: number;
|
|
28
|
-
nodeSize: number;
|
|
29
|
-
component: number;
|
|
30
|
-
shapeNode: boolean;
|
|
31
|
-
depth?: number;
|
|
32
|
-
d?: string;
|
|
33
|
-
index?: number;
|
|
34
|
-
zoomedHeight?: number;
|
|
35
|
-
zoomedWidth?: number;
|
|
36
|
-
value?: number;
|
|
37
|
-
}
|
|
38
|
-
export interface EdgeType {
|
|
39
|
-
circular?: boolean;
|
|
40
|
-
circularPathData?: {
|
|
41
|
-
sourceX: number;
|
|
42
|
-
sourceY: number;
|
|
43
|
-
leftFullExtent: number;
|
|
44
|
-
rightFullExtent: number;
|
|
45
|
-
verticalFullExtent: number;
|
|
46
|
-
targetX: number;
|
|
47
|
-
targetY: number;
|
|
48
|
-
};
|
|
49
|
-
source?: NodeType;
|
|
50
|
-
target?: NodeType;
|
|
51
|
-
d?: string;
|
|
52
|
-
x?: number;
|
|
53
|
-
y?: number;
|
|
54
|
-
y0?: number;
|
|
55
|
-
y1?: number;
|
|
56
|
-
sankeyWidth?: number;
|
|
57
|
-
direction?: string;
|
|
58
|
-
width?: number;
|
|
59
|
-
points?: Array<{
|
|
60
|
-
x: number;
|
|
61
|
-
y: number;
|
|
62
|
-
}>;
|
|
63
|
-
showArrows?: boolean;
|
|
64
|
-
ephemeral?: boolean;
|
|
65
|
-
value?: number;
|
|
66
|
-
}
|
|
67
|
-
export interface GraphSettingsType {
|
|
68
|
-
type: string | (({ edges, nodes }: {
|
|
69
|
-
edges: EdgeType[];
|
|
70
|
-
nodes: NodeType[];
|
|
71
|
-
}) => void);
|
|
72
|
-
nodes: object[];
|
|
73
|
-
edges: object[] | object;
|
|
74
|
-
nodeHash: Map<any, NodeType>;
|
|
75
|
-
edgeHash: Map<any, EdgeType>;
|
|
76
|
-
hierarchicalNetwork: boolean;
|
|
77
|
-
filterRenderedNodes?: Function;
|
|
78
|
-
}
|
|
79
|
-
export interface NetworkSettingsType {
|
|
80
|
-
type?: string | (({ edges, nodes }: {
|
|
81
|
-
edges: EdgeType[];
|
|
82
|
-
nodes: NodeType[];
|
|
83
|
-
}) => void);
|
|
84
|
-
hierarchyChildren?: Function;
|
|
85
|
-
hierarchySum?: Function;
|
|
86
|
-
layout?: Function;
|
|
87
|
-
nodeSize?: Function;
|
|
88
|
-
nodes?: NodeType[];
|
|
89
|
-
edges?: EdgeType[];
|
|
90
|
-
iterations?: number;
|
|
91
|
-
width?: number;
|
|
92
|
-
height?: number;
|
|
93
|
-
projection?: "horizontal" | "radial" | "vertical";
|
|
94
|
-
customSankey?: Function;
|
|
95
|
-
groupWidth?: number;
|
|
96
|
-
padAngle?: number;
|
|
97
|
-
padding?: number;
|
|
98
|
-
orient?: string;
|
|
99
|
-
nodePadding?: number;
|
|
100
|
-
nodePaddingRatio?: number;
|
|
101
|
-
nodeWidth?: number;
|
|
102
|
-
direction?: string;
|
|
103
|
-
fontSize?: number;
|
|
104
|
-
rotate?: Function;
|
|
105
|
-
fontWeight?: number;
|
|
106
|
-
textAccessor?: Function;
|
|
107
|
-
edgeStrength?: number;
|
|
108
|
-
distanceMax?: number;
|
|
109
|
-
edgeDistance?: number;
|
|
110
|
-
forceManyBody?: Function | number;
|
|
111
|
-
hierarchicalNetwork: boolean;
|
|
112
|
-
graphSettings: GraphSettingsType;
|
|
113
|
-
sortGroups?: Function;
|
|
114
|
-
simulation?: Function;
|
|
115
|
-
sort?: (a: Record<string, any>, b: Record<string, any>) => number;
|
|
116
|
-
zoom?: boolean | "stretch" | ((nodes: NodeType[], edges: EdgeType[], size: number[]) => void);
|
|
117
|
-
fixExistingNodes?: boolean | Function;
|
|
118
|
-
showArrows?: boolean;
|
|
119
|
-
}
|
|
120
|
-
export interface NetworkFrameState<TNode = Record<string, any>, TEdge = Record<string, any>> extends GeneralFrameState {
|
|
121
|
-
nodeData: object[];
|
|
122
|
-
edgeData: object[];
|
|
123
|
-
projectedNodes: NodeType[];
|
|
124
|
-
projectedEdges: EdgeType[];
|
|
125
|
-
projectedXYPoints: object[];
|
|
126
|
-
overlay: object[];
|
|
127
|
-
nodeIDAccessor: (args: Record<string, any>) => string;
|
|
128
|
-
sourceAccessor: (args: Record<string, any>) => Record<string, any> | string;
|
|
129
|
-
targetAccessor: (args: Record<string, any>) => Record<string, any> | string;
|
|
130
|
-
nodeSizeAccessor: (args: Record<string, any>) => number;
|
|
131
|
-
edgeWidthAccessor: (args: Record<string, any>) => number;
|
|
132
|
-
nodeLabelAnnotations: object[];
|
|
133
|
-
graphSettings: GraphSettingsType;
|
|
134
|
-
networkFrameRender: RenderPipelineType;
|
|
135
|
-
props: NetworkFrameProps<TNode, TEdge>;
|
|
136
|
-
}
|
|
137
|
-
export interface NetworkFrameProps<TNode = Record<string, any>, TEdge = Record<string, any>> extends GeneralFrameProps {
|
|
138
|
-
graph?: {
|
|
139
|
-
nodes: NodeType[];
|
|
140
|
-
edges: EdgeType[];
|
|
141
|
-
} | EdgeType[] | {
|
|
142
|
-
(): () => void;
|
|
143
|
-
nodes: Function;
|
|
144
|
-
edges: Function;
|
|
145
|
-
node: Function;
|
|
146
|
-
edge: Function;
|
|
147
|
-
};
|
|
148
|
-
nodes?: TNode[];
|
|
149
|
-
edges?: TEdge[] | TEdge;
|
|
150
|
-
networkType?: string | object;
|
|
151
|
-
nodeStyle?: Record<string, any> | ((args: Record<string, any>) => Record<string, any>);
|
|
152
|
-
nodeClass?: string | ((args: Record<string, any>) => string);
|
|
153
|
-
canvasNodes?: boolean | ((args: Record<string, any>) => boolean);
|
|
154
|
-
edgeStyle?: Record<string, any> | ((args: Record<string, any>) => Record<string, any>);
|
|
155
|
-
edgeClass?: string | ((args: Record<string, any>) => string);
|
|
156
|
-
canvasEdges?: boolean | ((args: Record<string, any>) => boolean);
|
|
157
|
-
nodeRenderMode?: string | ((args: Record<string, any>) => string);
|
|
158
|
-
edgeRenderMode?: string | ((args: Record<string, any>) => string);
|
|
159
|
-
nodeLabels?: boolean | ((args: Record<string, any>) => JSX.Element | string | null);
|
|
160
|
-
edgeRenderKey?: (args: Record<string, any>) => string;
|
|
161
|
-
nodeRenderKey?: (args: Record<string, any>) => string;
|
|
162
|
-
edgeWidthAccessor?: DataAccessor<TEdge, number>;
|
|
163
|
-
nodeSizeAccessor?: DataAccessor<TNode, number> | number;
|
|
164
|
-
targetAccessor?: DataAccessor<TEdge, string | Record<string, any>>;
|
|
165
|
-
sourceAccessor?: DataAccessor<TEdge, string | Record<string, any>>;
|
|
166
|
-
nodeIDAccessor?: DataAccessor<TNode, string>;
|
|
167
|
-
edgeType?: string | Function;
|
|
168
|
-
customNodeIcon?: Function;
|
|
169
|
-
customEdgeIcon?: Function;
|
|
170
|
-
renderOrder?: ReadonlyArray<"edges" | "nodes">;
|
|
171
|
-
filterRenderedNodes?: (value?: NodeType, index?: number, array?: NodeType[]) => any;
|
|
172
|
-
/** @internal Layout map for tree-shaking optimization. Do not use directly. */
|
|
173
|
-
_layoutMap?: Record<string, any>;
|
|
174
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { CustomHoverType } from "./annotationTypes";
|
|
2
|
-
import { CanvasPostProcessTypes, ProjectionTypes, accessorType, DataAccessor, GenericAccessor, RenderPipelineType, OrdinalSummaryTypeSettings, GeneralFrameState, GeneralFrameProps } from "./generalTypes";
|
|
3
|
-
import { ScaleLinear, ScaleBand } from "d3-scale";
|
|
4
|
-
import { AxisProps, AxisGeneratingFunction } from "./annotationTypes";
|
|
5
|
-
export type OExtentObject = {
|
|
6
|
-
extent?: Array<string>;
|
|
7
|
-
onChange?: Function;
|
|
8
|
-
};
|
|
9
|
-
type OExtentSettingsType = Array<string> | OExtentObject;
|
|
10
|
-
interface RExtentObject {
|
|
11
|
-
extent?: Array<number>;
|
|
12
|
-
onChange?: Function;
|
|
13
|
-
includeAnnotations?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export type PieceTypes = "none" | "bar" | "clusterbar" | "point" | "swarm" | "timeline" | "barpercent";
|
|
16
|
-
export interface PieceTypeSettings {
|
|
17
|
-
type: PieceTypes;
|
|
18
|
-
offsetAngle?: number;
|
|
19
|
-
angleRange?: number[];
|
|
20
|
-
innerRadius?: number;
|
|
21
|
-
}
|
|
22
|
-
export interface ProjectedOrdinalSummary {
|
|
23
|
-
originalData?: {
|
|
24
|
-
x?: number;
|
|
25
|
-
y?: number;
|
|
26
|
-
};
|
|
27
|
-
xyPoints?: object[];
|
|
28
|
-
marks?: object[];
|
|
29
|
-
thresholds?: number[];
|
|
30
|
-
}
|
|
31
|
-
export interface OrdinalFrameProps<TDatum = Record<string, any>> extends GeneralFrameProps {
|
|
32
|
-
type?: PieceTypes | PieceTypeSettings;
|
|
33
|
-
summaryType?: OrdinalSummaryTypeSettings;
|
|
34
|
-
connectorType?: Function;
|
|
35
|
-
rAccessor?: DataAccessor<TDatum, number> | DataAccessor<TDatum, number>[];
|
|
36
|
-
oAccessor?: DataAccessor<TDatum, string | number> | DataAccessor<TDatum, string | number>[];
|
|
37
|
-
oExtent?: OExtentSettingsType;
|
|
38
|
-
rExtent?: RExtentObject | number[];
|
|
39
|
-
invertR?: boolean;
|
|
40
|
-
projection?: ProjectionTypes;
|
|
41
|
-
summaryHoverAnnotation?: CustomHoverType;
|
|
42
|
-
pieceHoverAnnotation?: CustomHoverType;
|
|
43
|
-
hoverAnnotation?: CustomHoverType;
|
|
44
|
-
canvasPostProcess?: CanvasPostProcessTypes;
|
|
45
|
-
canvasPieces?: boolean | accessorType<boolean>;
|
|
46
|
-
canvasSummaries?: boolean | accessorType<boolean>;
|
|
47
|
-
connectorClass?: string | accessorType<string>;
|
|
48
|
-
pieceClass?: string | accessorType<string>;
|
|
49
|
-
summaryClass?: string | accessorType<string>;
|
|
50
|
-
connectorRenderMode?: string | accessorType<string | Record<string, any>>;
|
|
51
|
-
connectorStyle?: object | accessorType<Record<string, any>>;
|
|
52
|
-
canvasConnectors?: boolean | accessorType<boolean>;
|
|
53
|
-
summaryStyle?: object | accessorType<object>;
|
|
54
|
-
style?: object | accessorType<object>;
|
|
55
|
-
oSort?: (a: string, b: string, c: object[], d: object[]) => number;
|
|
56
|
-
dynamicColumnWidth?: string | accessorType<number>;
|
|
57
|
-
pieceIDAccessor?: string | accessorType<string>;
|
|
58
|
-
ordinalAlign?: string;
|
|
59
|
-
oLabel?: boolean | ((labelValue: string, columnData: object[], index: number, column: {
|
|
60
|
-
name: string;
|
|
61
|
-
pieceData: object[];
|
|
62
|
-
x: number;
|
|
63
|
-
y: number;
|
|
64
|
-
middle: number;
|
|
65
|
-
width: number;
|
|
66
|
-
padding: number;
|
|
67
|
-
pieces: object[];
|
|
68
|
-
}) => string | Element);
|
|
69
|
-
renderMode?: object | string | accessorType<string | object>;
|
|
70
|
-
summaryRenderMode?: object | string | accessorType<string | object>;
|
|
71
|
-
pixelColumnWidth?: number;
|
|
72
|
-
oScaleType?: ScaleBand<string>;
|
|
73
|
-
rScaleType?: () => ScaleLinear<number, number>;
|
|
74
|
-
data: TDatum[];
|
|
75
|
-
oPadding?: number;
|
|
76
|
-
axes?: AxisGeneratingFunction | AxisProps | Array<AxisProps | AxisGeneratingFunction>;
|
|
77
|
-
renderOrder?: ReadonlyArray<"pieces" | "summaries" | "connectors">;
|
|
78
|
-
multiAxis?: boolean;
|
|
79
|
-
}
|
|
80
|
-
export interface OrdinalFrameState<TDatum = Record<string, any>> extends GeneralFrameState {
|
|
81
|
-
pieceDataXY: Array<object>;
|
|
82
|
-
axisData?: AxisProps[];
|
|
83
|
-
axes?: React.ReactNode[];
|
|
84
|
-
axesTickLines?: Object[];
|
|
85
|
-
oLabels: {
|
|
86
|
-
labels: React.ReactNode;
|
|
87
|
-
};
|
|
88
|
-
columnOverlays: Array<object>;
|
|
89
|
-
oAccessor: Array<Function>;
|
|
90
|
-
rAccessor: Array<Function>;
|
|
91
|
-
oScaleType: ScaleBand<string>;
|
|
92
|
-
rScaleType: ScaleLinear<number, number>;
|
|
93
|
-
oExtent: Array<string>;
|
|
94
|
-
rExtent: Array<number>;
|
|
95
|
-
oScale: ScaleBand<string>;
|
|
96
|
-
rScale: ScaleLinear<number, number>;
|
|
97
|
-
calculatedOExtent: Array<string>;
|
|
98
|
-
calculatedRExtent: Array<number>;
|
|
99
|
-
projectedColumns: object;
|
|
100
|
-
orFrameRender: RenderPipelineType;
|
|
101
|
-
pieceIDAccessor: GenericAccessor<string>;
|
|
102
|
-
type: object;
|
|
103
|
-
summaryType: object;
|
|
104
|
-
props: OrdinalFrameProps<TDatum>;
|
|
105
|
-
}
|
|
106
|
-
export interface LabelSettingsType {
|
|
107
|
-
orient?: string;
|
|
108
|
-
padding?: number;
|
|
109
|
-
label?: boolean | Function;
|
|
110
|
-
labelFormatter?: Function;
|
|
111
|
-
}
|
|
112
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{darkenColor as t,lightenColor as o}from"./semiotic.module.min.js";import"react";import"d3-selection";import"d3-brush";import"d3-scale";import"d3-quadtree";import"d3-scale-chromatic";import"d3-array";import"d3-hierarchy";import"d3-shape";import"regression";import"d3-interpolate";import"d3-force";import"d3-chord";const e="__forecastSegment";function n(t,o){return"function"==typeof o?o(t):!!t[o]}function s(t){var o,e,n;return[{type:"anomaly-band",threshold:null!==(o=t.threshold)&&void 0!==o?o:2,showBand:!1!==t.showBand,fill:t.bandColor||"#6366f1",fillOpacity:null!==(e=t.bandOpacity)&&void 0!==e?e:.1,anomalyColor:t.anomalyColor||"#ef4444",anomalyRadius:null!==(n=t.anomalyRadius)&&void 0!==n?n:6,label:t.label}]}function a(t,o,s,a,r){return(i=a).isTraining||i.isForecast||i.isAnomaly||i.upperBounds||i.lowerBounds?function(t,o,s,a,r){var i,l,c,p;const{isTraining:f,isForecast:u,isAnomaly:h,upperBounds:d,lowerBounds:y,color:b="#6366f1",bandOpacity:g=.15,anomalyColor:m="#ef4444",anomalyRadius:O=6,label:j}=a,v=t.map(t=>{let o="observed";return u&&n(t,u)?o="forecast":f&&n(t,f)&&(o="training"),Object.assign(Object.assign({},t),{[e]:o})}),k=a._groupBy,_=[];if(k){const t=new Map;for(const o of v){const e=null!==(i=o[k])&&void 0!==i?i:"__default";t.has(e)||t.set(e,[]),t.get(e).push(o)}const o=[];for(const[,n]of t)for(let t=0;n.length-1>t;t++)n[t][e]!==n[t+1][e]&&(o.push(Object.assign(Object.assign({},n[t+1]),{[e]:n[t][e]})),o.push(Object.assign(Object.assign({},n[t]),{[e]:n[t+1][e]})));_.push(...v,...o)}else for(let t=0;v.length>t;t++)_.push(v[t]),v.length-1>t&&v[t][e]!==v[t+1][e]&&(_.push(Object.assign(Object.assign({},v[t+1]),{[e]:v[t][e]})),_.push(Object.assign(Object.assign({},v[t]),{[e]:v[t+1][e]})));if(a.trainUnderline){const t=[];for(const o of _)"training"===o[e]&&t.push(Object.assign(Object.assign({},o),{[e]:"training-base"}));_.unshift(...t)}const w=[];if(d&&y){const t="string"==typeof d?d:"__envUpper",o="string"==typeof y?y:"__envLower";if("function"==typeof d||"function"==typeof y)for(const e of _)"function"==typeof d&&(e[t]=d(e)),"function"==typeof y&&(e[o]=y(e));w.push({type:"envelope",upperAccessor:t,lowerAccessor:o,fill:b,fillOpacity:g,label:j})}if(h){const t=a.anomalyStyle,o={type:"highlight",filter:t=>n(t,h)};t?(o.style=t,o.r=O):"function"==typeof m?(o.style=t=>{const o=m(t);return{stroke:o,strokeWidth:1.5,fill:o,fillOpacity:.7}},o.r=O):(o.color=m,o.r=O,o.style={stroke:m,strokeWidth:1.5,fill:m,fillOpacity:.7}),w.push(o)}return r&&w.push({type:"anomaly-band",threshold:null!==(l=r.threshold)&&void 0!==l?l:2,showBand:!1!==r.showBand,fill:r.bandColor||"#6366f1",fillOpacity:null!==(c=r.bandOpacity)&&void 0!==c?c:.1,anomalyColor:r.anomalyColor||"#ef4444",anomalyRadius:null!==(p=r.anomalyRadius)&&void 0!==p?p:6,label:r.label}),{processedData:_,annotations:w}}(t,0,0,a,r):function(t,o,n,s,a){var r,i,l;const{trainEnd:c,steps:p=10,confidence:f=.95,color:u="#6366f1",bandOpacity:h=.15,label:d}=s;if(null==c)return{processedData:t,annotations:[]};const y=[],b=[];for(const n of t)n[o]>c?b.push(Object.assign(Object.assign({},n),{[e]:"observed"})):y.push(Object.assign(Object.assign({},n),{[e]:"training"}));const g=y.map(t=>[t[o],t[n]]).filter(t=>null!=t[0]&&null!=t[1]&&isFinite(t[0])&&isFinite(t[1])).sort((t,o)=>t[0]-o[0]),m=[],O=[];if(g.length>=3){const s=g.length;let a=0,r=0,i=0,l=0;for(const[t,o]of g)a+=t,r+=o,i+=t*t,l+=t*o;const c=s*i-a*a;if(Math.abs(c)>1e-12){const i=(s*l-a*r)/c,y=(r-i*a)/s,b=t=>y+i*t,j=g.map(([t,o])=>o-b(t)).reduce((t,o)=>t+o*o,0),v=Math.sqrt(j/Math.max(s-2,1)),k=g.reduce((t,o)=>t+o[0],0)/s,_=g.reduce((t,o)=>t+Math.pow(o[0]-k,2),0),w=.99>f?.95>f?.9>f?1:1.645:1.96:2.576,B=t.map(t=>t[o]).filter(t=>null!=t&&isFinite(t)),C=Math.max(...B),D=g.length>1?(g[s-1][0]-g[0][0])/(s-1):1;for(let t=1;p>=t;t++){const a=C+t*D,r=b(a),i=v*Math.sqrt(1+1/s+(_>0?Math.pow(a-k,2)/_:0))*w;O.push({[o]:a,[n]:r,[e]:"forecast",__forecastUpper:r+i,__forecastLower:r-i})}m.push({type:"envelope",upperAccessor:"__forecastUpper",lowerAccessor:"__forecastLower",fill:u,fillOpacity:h,label:d})}}m.push({type:"x-threshold",x:c,color:"#94a3b8",strokeWidth:1,strokeDasharray:"4,2",label:"Train / Forecast"}),a&&m.push({type:"anomaly-band",threshold:null!==(r=a.threshold)&&void 0!==r?r:2,showBand:!1!==a.showBand,fill:a.bandColor||"#6366f1",fillOpacity:null!==(i=a.bandOpacity)&&void 0!==i?i:.1,anomalyColor:a.anomalyColor||"#ef4444",anomalyRadius:null!==(l=a.anomalyRadius)&&void 0!==l?l:6,label:a.label});const j=[];if(j.push(...y),y.length>0&&b.length>0&&j.push(Object.assign(Object.assign({},y[y.length-1]),{[e]:"observed"})),j.push(...b),O.length>0){const t=b.length>0?b[b.length-1]:y[y.length-1];t&&j.push(Object.assign(Object.assign({},t),{[e]:"forecast"})),j.push(...O)}return{processedData:j,annotations:m}}(t,o,s,a,r);var i}function r(n,s){var a,r;const i=null!==(a=s.trainDasharray)&&void 0!==a?a:"8,4",l=null!==(r=s.forecastDasharray)&&void 0!==r?r:"4,4",c=s.color||"#6366f1",p=s.trainOpacity,f=s.forecastOpacity,u=s.trainStroke,h=s.trainLinecap,d=s.trainUnderline;return s=>{const a=n(s),r=s[e];if("training"===r){let o=a.stroke;return"darken"===u?o=t(a.stroke||"#666",.5):u&&(o=u),Object.assign(Object.assign(Object.assign(Object.assign({},a),{stroke:o,strokeDasharray:i}),h&&{strokeLinecap:h}),null!=p&&{strokeOpacity:p})}if("training-base"===r){let t=a.stroke||"#666";return"lighten"===d&&(t=o(t,.4)),Object.assign(Object.assign({},a),{stroke:t,strokeDasharray:void 0})}return"forecast"===r?Object.assign(Object.assign(Object.assign({},a),{stroke:c,strokeDasharray:l}),null!=f&&{strokeOpacity:f}):a}}export{e as SEGMENT_FIELD,s as buildAnomalyAnnotations,a as buildForecast,r as createSegmentLineStyle,t as darkenColor,o as lightenColor};
|