semiotic 2.0.2 → 2.0.3
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/dist/Annotation.d.ts +3 -0
- package/dist/AnnotationLayer/AnnotationLayer.d.ts +26 -0
- package/dist/AnnotationLayer/helpers.d.ts +6 -0
- package/dist/AnnotationLayer/index.d.ts +2 -0
- package/dist/Axis/Axis.d.ts +7 -0
- package/dist/Axis/axisTitle.d.ts +10 -0
- package/dist/Axis/index.d.ts +2 -0
- package/dist/Axis/summaryGraphic.d.ts +17 -0
- package/dist/Brush.d.ts +12 -0
- package/dist/DividedLine.d.ts +16 -0
- package/dist/FacetController.d.ts +12 -0
- package/dist/Frame.d.ts +2 -0
- package/dist/InteractionLayer.d.ts +3 -0
- package/dist/Legend.d.ts +3 -0
- package/dist/Mark/Mark.d.ts +3 -0
- package/dist/Mark/Mark.types.d.ts +10 -0
- package/dist/Mark/constants/markTransition.d.ts +10 -0
- package/dist/Mark/markBehavior/drawing.d.ts +13 -0
- package/dist/MiniMap.d.ts +14 -0
- package/dist/MinimapXYFrame.d.ts +10 -0
- package/dist/NetworkFrame.d.ts +4 -0
- package/dist/OrdinalFrame.d.ts +4 -0
- package/dist/ResponsiveFrame.d.ts +22 -0
- package/dist/ResponsiveMinimapXYFrame.d.ts +6 -0
- package/dist/ResponsiveNetworkFrame.d.ts +6 -0
- package/dist/ResponsiveOrdinalFrame.d.ts +6 -0
- package/dist/ResponsiveXYFrame.d.ts +6 -0
- package/dist/SpanOrDiv.d.ts +10 -0
- package/dist/SparkFrame.d.ts +14 -0
- package/dist/SparkNetworkFrame.d.ts +5 -0
- package/dist/SparkOrdinalFrame.d.ts +5 -0
- package/dist/SparkXYFrame.d.ts +5 -0
- package/dist/TooltipPositioner/index.d.ts +7 -0
- package/dist/VisualizationLayer.d.ts +33 -0
- package/dist/XYFrame.d.ts +4 -0
- package/dist/annotationLayerBehavior/annotationHandling.d.ts +19 -0
- package/dist/annotationLayerBehavior/d3labeler.d.ts +9 -0
- package/dist/annotationRules/baseRules.d.ts +25 -0
- package/dist/annotationRules/networkframeRules.d.ts +48 -0
- package/dist/annotationRules/orframeRules.d.ts +105 -0
- package/dist/annotationRules/xyframeRules.d.ts +117 -0
- package/dist/batchWork.d.ts +6 -0
- package/dist/components/Annotation.d.ts +3 -0
- package/dist/components/AnnotationLayer/AnnotationLayer.d.ts +26 -0
- package/dist/components/Axis/Axis.d.ts +7 -0
- package/dist/components/Axis/axisTitle.d.ts +10 -0
- package/dist/components/Axis/index.d.ts +2 -0
- package/dist/components/Axis/summaryGraphic.d.ts +17 -0
- package/dist/components/Brush.d.ts +12 -0
- package/dist/components/DividedLine.d.ts +16 -0
- package/dist/components/FacetController.d.ts +12 -0
- package/dist/components/Frame.d.ts +2 -0
- package/dist/components/InteractionLayer.d.ts +3 -0
- package/dist/components/Legend.d.ts +3 -0
- package/dist/components/Mark/Mark.d.ts +3 -0
- package/dist/components/Mark/Mark.types.d.ts +10 -0
- package/dist/components/Mark/markBehavior/drawing.d.ts +13 -0
- package/dist/components/MiniMap.d.ts +14 -0
- package/dist/components/MinimapXYFrame.d.ts +10 -0
- package/dist/components/NetworkFrame.d.ts +4 -0
- package/dist/components/OrdinalFrame.d.ts +4 -0
- package/dist/components/ResponsiveFrame.d.ts +22 -0
- package/dist/components/ResponsiveMinimapXYFrame.d.ts +6 -0
- package/dist/components/ResponsiveNetworkFrame.d.ts +6 -0
- package/dist/components/ResponsiveOrdinalFrame.d.ts +6 -0
- package/dist/components/ResponsiveXYFrame.d.ts +6 -0
- package/dist/components/SpanOrDiv.d.ts +10 -0
- package/dist/components/SparkFrame.d.ts +14 -0
- package/dist/components/SparkNetworkFrame.d.ts +5 -0
- package/dist/components/SparkOrdinalFrame.d.ts +5 -0
- package/dist/components/SparkXYFrame.d.ts +5 -0
- package/dist/components/TooltipPositioner/index.d.ts +7 -0
- package/dist/components/VisualizationLayer.d.ts +33 -0
- package/dist/components/XYFrame.d.ts +4 -0
- package/dist/components/annotationLayerBehavior/annotationHandling.d.ts +19 -0
- package/dist/components/annotationLayerBehavior/d3labeler.d.ts +9 -0
- package/dist/components/annotationRules/baseRules.d.ts +25 -0
- package/dist/components/annotationRules/networkframeRules.d.ts +48 -0
- package/dist/components/annotationRules/orframeRules.d.ts +105 -0
- package/dist/components/annotationRules/xyframeRules.d.ts +117 -0
- package/dist/components/batchWork.d.ts +6 -0
- package/dist/components/constants/coordinateNames.d.ts +8 -0
- package/dist/components/constants/frame_props.d.ts +4 -0
- package/dist/components/constants/jsx.d.ts +19 -0
- package/dist/components/data/dataFunctions.d.ts +46 -0
- package/dist/components/data/multiAccessorUtils.d.ts +1 -0
- package/dist/components/data/unflowedFunctions.d.ts +1 -0
- package/dist/components/generic_utilities/functions.d.ts +1 -0
- package/dist/components/index.d.ts +125 -0
- package/dist/components/interactionLayerBehavior/InteractionCanvas.d.ts +20 -0
- package/dist/components/processing/InteractionItems.d.ts +12 -0
- package/dist/components/processing/network.d.ts +114 -0
- package/dist/components/processing/ordinal.d.ts +102 -0
- package/dist/components/processing/xyDrawing.d.ts +135 -0
- package/dist/components/semiotic.d.ts +35 -0
- package/dist/components/store/TooltipStore.d.ts +2 -0
- package/dist/components/store/createStore.d.ts +1 -0
- package/dist/components/svg/SvgHelper.d.ts +37 -0
- package/dist/components/svg/areaDrawing.d.ts +31 -0
- package/dist/components/svg/ckmeans.d.ts +69 -0
- package/dist/components/svg/frameFunctions.d.ts +119 -0
- package/dist/components/svg/lineDrawing.d.ts +99 -0
- package/dist/components/svg/networkDrawing.d.ts +134 -0
- package/dist/components/svg/pieceDrawing.d.ts +13 -0
- package/dist/components/svg/pieceLayouts.d.ts +71 -0
- package/dist/components/svg/summaryLayouts.d.ts +74 -0
- package/dist/components/types/annotationTypes.d.ts +140 -0
- package/dist/components/types/canvasTypes.d.ts +9 -0
- package/dist/components/types/generalTypes.d.ts +236 -0
- package/dist/components/types/interactionTypes.d.ts +74 -0
- package/dist/components/types/legendTypes.d.ts +20 -0
- package/dist/components/types/networkTypes.d.ts +165 -0
- package/dist/components/types/ordinalTypes.d.ts +103 -0
- package/dist/components/types/xyTypes.d.ts +118 -0
- package/dist/components/useBoundingRect.d.ts +2 -0
- package/dist/components/useDerivedStateFromProps.d.ts +1 -0
- package/dist/components/useLegacyUnmountCallback.d.ts +1 -0
- package/dist/components/visualizationLayerBehavior/axis.d.ts +38 -0
- package/dist/components/visualizationLayerBehavior/general.d.ts +84 -0
- package/dist/constants/coordinateNames.d.ts +8 -0
- package/dist/constants/frame_props.d.ts +4 -0
- package/dist/constants/jsx.d.ts +19 -0
- package/dist/data/dataFunctions.d.ts +46 -0
- package/dist/data/multiAccessorUtils.d.ts +1 -0
- package/dist/data/unflowedFunctions.d.ts +1 -0
- package/dist/generic_utilities/functions.d.ts +1 -0
- package/dist/index.d.ts +125 -0
- package/dist/interactionLayerBehavior/InteractionCanvas.d.ts +20 -0
- package/dist/processing/InteractionItems.d.ts +12 -0
- package/dist/processing/network.d.ts +114 -0
- package/dist/processing/ordinal.d.ts +102 -0
- package/dist/processing/xyDrawing.d.ts +135 -0
- package/dist/semiotic.d.ts +35 -0
- package/dist/semiotic.js +10 -7
- package/dist/semiotic.module.js +10 -7
- package/dist/setupTests.d.ts +1 -0
- package/dist/store/TooltipStore.d.ts +2 -0
- package/dist/store/createStore.d.ts +1 -0
- package/dist/svg/SvgHelper.d.ts +37 -0
- package/dist/svg/areaDrawing.d.ts +31 -0
- package/dist/svg/ckmeans.d.ts +69 -0
- package/dist/svg/frameFunctions.d.ts +119 -0
- package/dist/svg/lineDrawing.d.ts +99 -0
- package/dist/svg/networkDrawing.d.ts +134 -0
- package/dist/svg/pieceDrawing.d.ts +13 -0
- package/dist/svg/pieceLayouts.d.ts +71 -0
- package/dist/svg/summaryLayouts.d.ts +74 -0
- package/dist/types/annotationTypes.d.ts +140 -0
- package/dist/types/canvasTypes.d.ts +9 -0
- package/dist/types/generalTypes.d.ts +236 -0
- package/dist/types/interactionTypes.d.ts +74 -0
- package/dist/types/legendTypes.d.ts +20 -0
- package/dist/types/networkTypes.d.ts +165 -0
- package/dist/types/ordinalTypes.d.ts +103 -0
- package/dist/types/xyTypes.d.ts +118 -0
- package/dist/useBoundingRect.d.ts +2 -0
- package/dist/useDerivedStateFromProps.d.ts +1 -0
- package/dist/useLegacyUnmountCallback.d.ts +1 -0
- package/dist/visualizationLayerBehavior/axis.d.ts +38 -0
- package/dist/visualizationLayerBehavior/general.d.ts +84 -0
- package/package.json +6 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ScaleLinear } from "d3-scale";
|
|
3
|
+
import { CustomHoverType } from "./annotationTypes";
|
|
4
|
+
import { MarginType } from "./generalTypes";
|
|
5
|
+
export interface AdvancedInteractionSettings {
|
|
6
|
+
voronoiClipping?: boolean | number;
|
|
7
|
+
voronoiFilter?: Function;
|
|
8
|
+
}
|
|
9
|
+
export interface Interactivity {
|
|
10
|
+
start?: Function;
|
|
11
|
+
during?: Function;
|
|
12
|
+
end?: Function;
|
|
13
|
+
brush?: string;
|
|
14
|
+
extent?: Array<number[]> | number[];
|
|
15
|
+
columnsBrush?: boolean;
|
|
16
|
+
projection?: string;
|
|
17
|
+
projectedColumns?: object;
|
|
18
|
+
startEmpty?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare type InteractionLayerProps = {
|
|
21
|
+
name?: string;
|
|
22
|
+
interaction?: Interactivity;
|
|
23
|
+
overlay?: Array<object>;
|
|
24
|
+
oColumns?: object;
|
|
25
|
+
xScale: ScaleLinear<number, number>;
|
|
26
|
+
yScale: ScaleLinear<number, number>;
|
|
27
|
+
rScale?: ScaleLinear<number, number>;
|
|
28
|
+
svgSize: Array<number>;
|
|
29
|
+
hoverAnnotation?: CustomHoverType;
|
|
30
|
+
interactionOverflow?: {
|
|
31
|
+
top?: number;
|
|
32
|
+
bottom?: number;
|
|
33
|
+
left?: number;
|
|
34
|
+
right?: number;
|
|
35
|
+
};
|
|
36
|
+
size: Array<number>;
|
|
37
|
+
projectedYMiddle?: string;
|
|
38
|
+
projectedX: string;
|
|
39
|
+
projectedY: string;
|
|
40
|
+
points?: Array<{
|
|
41
|
+
data: any;
|
|
42
|
+
}>;
|
|
43
|
+
position?: number[];
|
|
44
|
+
enabled?: boolean;
|
|
45
|
+
useSpans?: boolean;
|
|
46
|
+
margin: MarginType;
|
|
47
|
+
projection?: string;
|
|
48
|
+
customDoubleClickBehavior?: Function;
|
|
49
|
+
customClickBehavior?: Function;
|
|
50
|
+
customHoverBehavior?: Function;
|
|
51
|
+
canvasRendering?: boolean;
|
|
52
|
+
disableCanvasInteraction: boolean;
|
|
53
|
+
showLinePoints?: string;
|
|
54
|
+
renderPipeline: object;
|
|
55
|
+
advancedSettings?: AdvancedInteractionSettings;
|
|
56
|
+
};
|
|
57
|
+
export declare type VoronoiEntryType = {
|
|
58
|
+
voronoiX: number;
|
|
59
|
+
voronoiY: number;
|
|
60
|
+
coincidentPoints: object[];
|
|
61
|
+
type?: string;
|
|
62
|
+
data?: object[];
|
|
63
|
+
};
|
|
64
|
+
export declare type BaseColumnType = {
|
|
65
|
+
x: number;
|
|
66
|
+
width: number;
|
|
67
|
+
};
|
|
68
|
+
export declare type InteractionLayerState = {
|
|
69
|
+
overlayRegions: Array<React.ReactElement>;
|
|
70
|
+
props: InteractionLayerProps;
|
|
71
|
+
canvasMap: Map<string, number>;
|
|
72
|
+
interactionCanvas: React.ReactNode;
|
|
73
|
+
SpanOrDiv: Function;
|
|
74
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type SupportedLegendGlyphs = "fill" | "line";
|
|
2
|
+
export declare type ItemType = SupportedLegendGlyphs | Function;
|
|
3
|
+
export interface LegendItem {
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LegendGroup {
|
|
7
|
+
type?: ItemType;
|
|
8
|
+
styleFn: Function;
|
|
9
|
+
items: LegendItem[];
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LegendProps {
|
|
13
|
+
legendGroups?: LegendGroup[];
|
|
14
|
+
customClickBehavior?: Function;
|
|
15
|
+
title?: string;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
orientation?: string;
|
|
19
|
+
position?: "left" | "right";
|
|
20
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GenericObject, RenderPipelineType } from "./generalTypes";
|
|
3
|
+
import { GeneralFrameProps, GeneralFrameState } from "./generalTypes";
|
|
4
|
+
export interface NodeType {
|
|
5
|
+
degree: number;
|
|
6
|
+
inDegree: number;
|
|
7
|
+
outDegree: number;
|
|
8
|
+
id?: string;
|
|
9
|
+
createdByFrame?: boolean;
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
x1: number;
|
|
13
|
+
x0: number;
|
|
14
|
+
y1: number;
|
|
15
|
+
y0: number;
|
|
16
|
+
height: number;
|
|
17
|
+
width: number;
|
|
18
|
+
radius: number;
|
|
19
|
+
direction: string;
|
|
20
|
+
textHeight: number;
|
|
21
|
+
textWidth: number;
|
|
22
|
+
fontSize: number;
|
|
23
|
+
fontWeight?: number;
|
|
24
|
+
rotate?: number;
|
|
25
|
+
scale: number;
|
|
26
|
+
_NWFText?: string;
|
|
27
|
+
text?: string;
|
|
28
|
+
r: number;
|
|
29
|
+
nodeSize: number;
|
|
30
|
+
component: number;
|
|
31
|
+
shapeNode: boolean;
|
|
32
|
+
depth?: number;
|
|
33
|
+
d?: string;
|
|
34
|
+
index?: number;
|
|
35
|
+
zoomedHeight?: number;
|
|
36
|
+
zoomedWidth?: number;
|
|
37
|
+
value?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface EdgeType {
|
|
40
|
+
circular?: boolean;
|
|
41
|
+
circularPathData?: any;
|
|
42
|
+
source?: NodeType;
|
|
43
|
+
target?: NodeType;
|
|
44
|
+
d?: string;
|
|
45
|
+
x?: number;
|
|
46
|
+
y?: number;
|
|
47
|
+
y0?: number;
|
|
48
|
+
y1?: number;
|
|
49
|
+
sankeyWidth?: number;
|
|
50
|
+
direction?: string;
|
|
51
|
+
width?: number;
|
|
52
|
+
points?: Array<{
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
}>;
|
|
56
|
+
showArrows?: boolean;
|
|
57
|
+
ephemeral?: boolean;
|
|
58
|
+
value?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface GraphSettingsType {
|
|
61
|
+
type: string | (({ edges, nodes }: {
|
|
62
|
+
edges: EdgeType[];
|
|
63
|
+
nodes: NodeType[];
|
|
64
|
+
}) => void);
|
|
65
|
+
nodes: object[];
|
|
66
|
+
edges: object[] | object;
|
|
67
|
+
nodeHash: Map<any, NodeType>;
|
|
68
|
+
edgeHash: Map<any, EdgeType>;
|
|
69
|
+
hierarchicalNetwork: boolean;
|
|
70
|
+
filterRenderedNodes?: Function;
|
|
71
|
+
}
|
|
72
|
+
export interface NetworkSettingsType {
|
|
73
|
+
type?: string | (({ edges, nodes }: {
|
|
74
|
+
edges: EdgeType[];
|
|
75
|
+
nodes: NodeType[];
|
|
76
|
+
}) => void);
|
|
77
|
+
hierarchyChildren?: Function;
|
|
78
|
+
hierarchySum?: Function;
|
|
79
|
+
layout?: Function;
|
|
80
|
+
nodeSize?: Function;
|
|
81
|
+
nodes?: NodeType[];
|
|
82
|
+
edges?: EdgeType[];
|
|
83
|
+
iterations?: number;
|
|
84
|
+
width?: number;
|
|
85
|
+
height?: number;
|
|
86
|
+
projection?: "horizontal" | "radial" | "vertical";
|
|
87
|
+
customSankey?: Function;
|
|
88
|
+
groupWidth?: number;
|
|
89
|
+
padAngle?: number;
|
|
90
|
+
padding?: number;
|
|
91
|
+
orient?: string;
|
|
92
|
+
nodePadding?: number;
|
|
93
|
+
nodePaddingRatio?: number;
|
|
94
|
+
nodeWidth?: number;
|
|
95
|
+
direction?: string;
|
|
96
|
+
fontSize?: number;
|
|
97
|
+
rotate?: Function;
|
|
98
|
+
fontWeight?: number;
|
|
99
|
+
textAccessor?: Function;
|
|
100
|
+
edgeStrength?: number;
|
|
101
|
+
distanceMax?: number;
|
|
102
|
+
edgeDistance?: number;
|
|
103
|
+
forceManyBody?: Function | number;
|
|
104
|
+
hierarchicalNetwork: boolean;
|
|
105
|
+
graphSettings: GraphSettingsType;
|
|
106
|
+
sortGroups?: Function;
|
|
107
|
+
simulation?: Function;
|
|
108
|
+
sort?: (a: GenericObject, b: GenericObject) => number;
|
|
109
|
+
zoom?: boolean | "stretch" | ((nodes: NodeType[], edges: EdgeType[], size: number[]) => void);
|
|
110
|
+
fixExistingNodes?: boolean | Function;
|
|
111
|
+
showArrows?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface NetworkFrameState extends GeneralFrameState {
|
|
114
|
+
nodeData: object[];
|
|
115
|
+
edgeData: object[];
|
|
116
|
+
projectedNodes: NodeType[];
|
|
117
|
+
projectedEdges: EdgeType[];
|
|
118
|
+
projectedXYPoints: object[];
|
|
119
|
+
overlay: object[];
|
|
120
|
+
nodeIDAccessor: (args: GenericObject) => string;
|
|
121
|
+
sourceAccessor: (args: GenericObject) => GenericObject | string;
|
|
122
|
+
targetAccessor: (args: GenericObject) => GenericObject | string;
|
|
123
|
+
nodeSizeAccessor: (args: GenericObject) => number;
|
|
124
|
+
edgeWidthAccessor: (args: GenericObject) => number;
|
|
125
|
+
nodeLabelAnnotations: object[];
|
|
126
|
+
graphSettings: GraphSettingsType;
|
|
127
|
+
networkFrameRender: RenderPipelineType;
|
|
128
|
+
props: NetworkFrameProps;
|
|
129
|
+
}
|
|
130
|
+
export interface NetworkFrameProps extends GeneralFrameProps {
|
|
131
|
+
graph?: {
|
|
132
|
+
nodes: NodeType[];
|
|
133
|
+
edges: EdgeType[];
|
|
134
|
+
} | EdgeType[] | {
|
|
135
|
+
(): () => void;
|
|
136
|
+
nodes: Function;
|
|
137
|
+
edges: Function;
|
|
138
|
+
node: Function;
|
|
139
|
+
edge: Function;
|
|
140
|
+
};
|
|
141
|
+
nodes?: object[];
|
|
142
|
+
edges?: object[] | object;
|
|
143
|
+
networkType?: string | object;
|
|
144
|
+
nodeStyle?: GenericObject | ((args: GenericObject) => GenericObject);
|
|
145
|
+
nodeClass?: string | ((args: GenericObject) => string);
|
|
146
|
+
canvasNodes?: boolean | ((args: GenericObject) => boolean);
|
|
147
|
+
edgeStyle?: GenericObject | ((args: GenericObject) => GenericObject);
|
|
148
|
+
edgeClass?: string | ((args: GenericObject) => string);
|
|
149
|
+
canvasEdges?: boolean | ((args: GenericObject) => boolean);
|
|
150
|
+
nodeRenderMode?: string | ((args: GenericObject) => string);
|
|
151
|
+
edgeRenderMode?: string | ((args: GenericObject) => string);
|
|
152
|
+
nodeLabels?: boolean | ((args: GenericObject) => JSX.Element | string | null);
|
|
153
|
+
edgeRenderKey?: (args: GenericObject) => string;
|
|
154
|
+
nodeRenderKey?: (args: GenericObject) => string;
|
|
155
|
+
edgeWidthAccessor?: string | ((args: GenericObject) => number);
|
|
156
|
+
nodeSizeAccessor?: string | ((args: GenericObject) => number);
|
|
157
|
+
targetAccessor?: string | ((args: GenericObject) => string | GenericObject);
|
|
158
|
+
sourceAccessor?: string | ((args: GenericObject) => string | GenericObject);
|
|
159
|
+
nodeIDAccessor?: string | ((args: GenericObject) => string);
|
|
160
|
+
edgeType?: string | Function;
|
|
161
|
+
customNodeIcon?: Function;
|
|
162
|
+
customEdgeIcon?: Function;
|
|
163
|
+
renderOrder?: ReadonlyArray<"edges" | "nodes">;
|
|
164
|
+
filterRenderedNodes?: (value?: NodeType, index?: number, array?: NodeType[]) => any;
|
|
165
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomHoverType } from "./annotationTypes";
|
|
3
|
+
import { CanvasPostProcessTypes, ProjectionTypes, accessorType, GenericObject, GenericAccessor, RenderPipelineType, OrdinalSummaryTypeSettings, GeneralFrameState, GeneralFrameProps } from "./generalTypes";
|
|
4
|
+
import { ScaleLinear, ScaleBand } from "d3-scale";
|
|
5
|
+
import { AxisProps, AxisGeneratingFunction } from "./annotationTypes";
|
|
6
|
+
export declare type OExtentObject = {
|
|
7
|
+
extent?: Array<string>;
|
|
8
|
+
onChange?: Function;
|
|
9
|
+
};
|
|
10
|
+
declare type OExtentSettingsType = Array<string> | OExtentObject;
|
|
11
|
+
interface RExtentObject {
|
|
12
|
+
extent?: Array<number>;
|
|
13
|
+
onChange?: Function;
|
|
14
|
+
includeAnnotations?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare type PieceTypes = "none" | "bar" | "clusterbar" | "point" | "swarm" | "timeline" | "barpercent";
|
|
17
|
+
export interface PieceTypeSettings {
|
|
18
|
+
type: PieceTypes;
|
|
19
|
+
offsetAngle?: number;
|
|
20
|
+
angleRange?: number[];
|
|
21
|
+
}
|
|
22
|
+
export interface ProjectedOrdinalSummary {
|
|
23
|
+
originalData?: {
|
|
24
|
+
x?: number;
|
|
25
|
+
y?: number;
|
|
26
|
+
};
|
|
27
|
+
xyPoints?: object[];
|
|
28
|
+
marks?: object[];
|
|
29
|
+
thresholds?: any;
|
|
30
|
+
}
|
|
31
|
+
export interface OrdinalFrameProps extends GeneralFrameProps {
|
|
32
|
+
type?: PieceTypes | PieceTypeSettings;
|
|
33
|
+
summaryType?: OrdinalSummaryTypeSettings;
|
|
34
|
+
connectorType?: Function;
|
|
35
|
+
rAccessor?: accessorType<number>;
|
|
36
|
+
oAccessor?: accessorType<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 | GenericObject>;
|
|
51
|
+
connectorStyle?: object | accessorType<GenericObject>;
|
|
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: any, index: number, column: any) => string | Element);
|
|
60
|
+
renderMode?: object | string | accessorType<string | object>;
|
|
61
|
+
summaryRenderMode?: object | string | accessorType<string | object>;
|
|
62
|
+
pixelColumnWidth?: number;
|
|
63
|
+
oScaleType?: any;
|
|
64
|
+
rScaleType?: () => ScaleLinear<number, number>;
|
|
65
|
+
data: Array<object | number>;
|
|
66
|
+
oPadding?: number;
|
|
67
|
+
axes?: AxisGeneratingFunction | AxisProps | Array<AxisProps | AxisGeneratingFunction>;
|
|
68
|
+
renderOrder?: ReadonlyArray<"pieces" | "summaries" | "connectors">;
|
|
69
|
+
multiAxis?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface OrdinalFrameState extends GeneralFrameState {
|
|
72
|
+
pieceDataXY: Array<object>;
|
|
73
|
+
axisData?: AxisProps[];
|
|
74
|
+
axes?: React.ReactNode[];
|
|
75
|
+
axesTickLines?: any;
|
|
76
|
+
oLabels: {
|
|
77
|
+
labels: React.ReactNode;
|
|
78
|
+
};
|
|
79
|
+
columnOverlays: Array<object>;
|
|
80
|
+
oAccessor: Array<Function>;
|
|
81
|
+
rAccessor: Array<Function>;
|
|
82
|
+
oScaleType: ScaleBand<string>;
|
|
83
|
+
rScaleType: ScaleLinear<number, number>;
|
|
84
|
+
oExtent: Array<string>;
|
|
85
|
+
rExtent: Array<number>;
|
|
86
|
+
oScale: ScaleBand<string>;
|
|
87
|
+
rScale: ScaleLinear<number, number>;
|
|
88
|
+
calculatedOExtent: Array<string>;
|
|
89
|
+
calculatedRExtent: Array<number>;
|
|
90
|
+
projectedColumns: object;
|
|
91
|
+
orFrameRender: RenderPipelineType;
|
|
92
|
+
pieceIDAccessor: GenericAccessor<string>;
|
|
93
|
+
type: object;
|
|
94
|
+
summaryType: object;
|
|
95
|
+
props: OrdinalFrameProps;
|
|
96
|
+
}
|
|
97
|
+
export interface LabelSettingsType {
|
|
98
|
+
orient?: string;
|
|
99
|
+
padding?: number;
|
|
100
|
+
label?: any;
|
|
101
|
+
labelFormatter?: Function;
|
|
102
|
+
}
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AxisProps, AxisGeneratingFunction } from "./annotationTypes";
|
|
3
|
+
import { TitleType } from "../svg/frameFunctions";
|
|
4
|
+
import { GenericAccessor, RawLine, RawPoint, RawSummary, ExtentType, accessorType, LineTypeSettings, SummaryTypeSettings, ProjectedPoint, ProjectedBin, ProjectedSummary, ProjectedLine, RenderPipelineType, GeneralFrameState, GeneralFrameProps, MarginType } from "./generalTypes";
|
|
5
|
+
import { ScaleLinear } from "d3-scale";
|
|
6
|
+
export interface XYFrameProps extends GeneralFrameProps {
|
|
7
|
+
lines?: RawLine[] | RawLine;
|
|
8
|
+
points?: RawPoint[];
|
|
9
|
+
summaries?: RawSummary[] | RawSummary;
|
|
10
|
+
axes?: Array<AxisProps | AxisGeneratingFunction>;
|
|
11
|
+
xScaleType?: ScaleLinear<number, number>;
|
|
12
|
+
yScaleType?: ScaleLinear<number, number>;
|
|
13
|
+
xExtent?: ExtentType;
|
|
14
|
+
yExtent?: ExtentType;
|
|
15
|
+
invertX?: boolean;
|
|
16
|
+
invertY?: boolean;
|
|
17
|
+
xAccessor?: accessorType<number>;
|
|
18
|
+
yAccessor?: accessorType<number>;
|
|
19
|
+
lineDataAccessor?: accessorType<RawPoint[]>;
|
|
20
|
+
summaryDataAccessor?: accessorType<RawPoint[]>;
|
|
21
|
+
lineType?: LineTypeSettings | string;
|
|
22
|
+
summaryType?: SummaryTypeSettings;
|
|
23
|
+
lineRenderMode?: string | object | Function;
|
|
24
|
+
pointRenderMode?: string | object | Function;
|
|
25
|
+
summaryRenderMode?: string | object | Function;
|
|
26
|
+
showLinePoints?: boolean | string;
|
|
27
|
+
showSummaryPoints?: boolean;
|
|
28
|
+
defined?: Function;
|
|
29
|
+
lineStyle?: GenericAccessor<object> | object;
|
|
30
|
+
pointStyle?: GenericAccessor<object> | object;
|
|
31
|
+
summaryStyle?: GenericAccessor<object> | object;
|
|
32
|
+
lineClass?: GenericAccessor<string> | string;
|
|
33
|
+
pointClass?: GenericAccessor<string> | string;
|
|
34
|
+
summaryClass?: GenericAccessor<string> | string;
|
|
35
|
+
canvasPoints?: GenericAccessor<boolean> | boolean;
|
|
36
|
+
canvasLines?: GenericAccessor<boolean> | boolean;
|
|
37
|
+
canvasSummaries?: GenericAccessor<boolean> | boolean;
|
|
38
|
+
customPointMark?: Function | object;
|
|
39
|
+
customLineMark?: Function;
|
|
40
|
+
customSummaryMark?: Function;
|
|
41
|
+
lineIDAccessor?: GenericAccessor<string> | string;
|
|
42
|
+
minimap?: object;
|
|
43
|
+
fullDataset?: Array<ProjectedPoint | ProjectedBin | ProjectedSummary>;
|
|
44
|
+
projectedLines?: ProjectedLine[];
|
|
45
|
+
projectedSummaries?: Array<ProjectedSummary>;
|
|
46
|
+
projectedPoints?: ProjectedPoint[];
|
|
47
|
+
renderOrder?: ReadonlyArray<"lines" | "points" | "summaries">;
|
|
48
|
+
useSummariesAsInteractionLayer?: boolean;
|
|
49
|
+
filterRenderedLines?: (value: ProjectedLine, index: number, array: ProjectedLine[]) => any;
|
|
50
|
+
filterRenderedSummaries?: (value: ProjectedSummary, index: number, array: ProjectedSummary[]) => any;
|
|
51
|
+
filterRenderedPoints?: (value: ProjectedPoint | ProjectedBin | ProjectedSummary, index: number, array: (ProjectedPoint | ProjectedBin | ProjectedSummary)[]) => any;
|
|
52
|
+
}
|
|
53
|
+
export declare type AnnotatedSettingsProps = {
|
|
54
|
+
xAccessor?: GenericAccessor<number>[];
|
|
55
|
+
yAccessor?: GenericAccessor<number>[];
|
|
56
|
+
summaryDataAccessor?: GenericAccessor<RawPoint[]>[];
|
|
57
|
+
lineDataAccessor?: GenericAccessor<RawPoint[]>[];
|
|
58
|
+
renderKeyFn?: GenericAccessor<string>;
|
|
59
|
+
lineType?: LineTypeSettings;
|
|
60
|
+
summaryType?: SummaryTypeSettings;
|
|
61
|
+
lineIDAccessor?: GenericAccessor<string>;
|
|
62
|
+
summaries?: object[];
|
|
63
|
+
lines?: object[];
|
|
64
|
+
title?: TitleType;
|
|
65
|
+
xExtent?: number[];
|
|
66
|
+
yExtent?: number[];
|
|
67
|
+
};
|
|
68
|
+
export interface XYFrameState extends GeneralFrameState {
|
|
69
|
+
lineData?: RawLine[] | RawLine;
|
|
70
|
+
pointData?: RawPoint[] | RawPoint;
|
|
71
|
+
summaryData?: RawSummary[] | RawSummary;
|
|
72
|
+
projectedLines?: ProjectedLine[];
|
|
73
|
+
projectedPoints?: ProjectedPoint[];
|
|
74
|
+
projectedSummaries?: ProjectedSummary[];
|
|
75
|
+
fullDataset: Array<ProjectedPoint | ProjectedBin | ProjectedSummary>;
|
|
76
|
+
axesData?: AxisProps[];
|
|
77
|
+
axes?: React.ReactNode[];
|
|
78
|
+
axesTickLines?: React.ReactNode;
|
|
79
|
+
calculatedXExtent: number[];
|
|
80
|
+
calculatedYExtent: number[];
|
|
81
|
+
xAccessor: GenericAccessor<number>[];
|
|
82
|
+
yAccessor: GenericAccessor<number>[];
|
|
83
|
+
xScale: ScaleLinear<number, number>;
|
|
84
|
+
yScale: ScaleLinear<number, number>;
|
|
85
|
+
xExtent: number[];
|
|
86
|
+
yExtent: number[];
|
|
87
|
+
areaAnnotations: object[];
|
|
88
|
+
xyFrameRender: RenderPipelineType;
|
|
89
|
+
canvasDrawing: object[];
|
|
90
|
+
size: number[];
|
|
91
|
+
annotatedSettings: AnnotatedSettingsProps;
|
|
92
|
+
overlay?: object[];
|
|
93
|
+
props: XYFrameProps;
|
|
94
|
+
SpanOrDiv: Function;
|
|
95
|
+
}
|
|
96
|
+
export interface SummaryLayoutType {
|
|
97
|
+
preprocess?: boolean;
|
|
98
|
+
processedData?: boolean;
|
|
99
|
+
summaryType: SummaryTypeSettings;
|
|
100
|
+
data: {
|
|
101
|
+
_xyfCoordinates?: [number | Date, number | Date][];
|
|
102
|
+
coordinates: {
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
}[];
|
|
106
|
+
};
|
|
107
|
+
finalXExtent?: number[];
|
|
108
|
+
finalYExtent?: number[];
|
|
109
|
+
size?: number[];
|
|
110
|
+
xScaleType?: ScaleLinear<Number, Number>;
|
|
111
|
+
yScaleType?: ScaleLinear<Number, Number>;
|
|
112
|
+
margin?: MarginType;
|
|
113
|
+
baseMarkProps?: object;
|
|
114
|
+
styleFn?: Function;
|
|
115
|
+
classFn?: Function;
|
|
116
|
+
renderFn?: Function;
|
|
117
|
+
chartSize?: number[];
|
|
118
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDerivedStateFromProps<Props, State>(fn: (nextProps: Props, prevState: State) => Partial<State> | null, props: Props, initialState: State): State;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLegacyUnmountCallback(props: any, state: any): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GenericObject } from "../types/generalTypes";
|
|
3
|
+
import { ScaleLinear } from "d3-scale";
|
|
4
|
+
declare type RenderModeFnType = (d: number, i: number) => string | GenericObject;
|
|
5
|
+
declare type AxisPiecesFnType = {
|
|
6
|
+
renderMode?: RenderModeFnType;
|
|
7
|
+
padding: number;
|
|
8
|
+
scale: ScaleLinear<number, number>;
|
|
9
|
+
ticks: number;
|
|
10
|
+
tickValues: number[] | Function;
|
|
11
|
+
orient: "left" | "right" | "top" | "bottom";
|
|
12
|
+
size: number[];
|
|
13
|
+
footer: boolean;
|
|
14
|
+
tickSize: number;
|
|
15
|
+
baseline?: boolean | "under";
|
|
16
|
+
jaggedBase?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function generateTickValues(tickValues: any, ticks: any, scale: any): any;
|
|
19
|
+
export declare function axisPieces({ renderMode, padding, scale, ticks, tickValues, orient, size, footer, tickSize, jaggedBase }: AxisPiecesFnType): any;
|
|
20
|
+
export declare const axisLabels: ({ axisParts, tickFormat, rotate, center, orient }: {
|
|
21
|
+
axisParts: any;
|
|
22
|
+
tickFormat: any;
|
|
23
|
+
rotate?: number;
|
|
24
|
+
center?: boolean;
|
|
25
|
+
orient: any;
|
|
26
|
+
}) => any;
|
|
27
|
+
export declare const baselineGenerator: (orient: any, size: any, className: any) => React.JSX.Element;
|
|
28
|
+
export declare const axisLines: ({ axisParts, orient, tickLineGenerator, baseMarkProps, className, jaggedBase, scale, showOutboundTickLines }: {
|
|
29
|
+
axisParts: object[];
|
|
30
|
+
orient: string;
|
|
31
|
+
tickLineGenerator: Function;
|
|
32
|
+
baseMarkProps?: GenericObject;
|
|
33
|
+
className: string;
|
|
34
|
+
jaggedBase?: boolean;
|
|
35
|
+
scale: ScaleLinear<number, number>;
|
|
36
|
+
showOutboundTickLines?: boolean;
|
|
37
|
+
}) => React.ReactNode[];
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GenericObject, ProjectedSummary } from "../types/generalTypes";
|
|
3
|
+
import { ScaleLinear } from "d3-scale";
|
|
4
|
+
export declare const curveHash: {
|
|
5
|
+
step: any;
|
|
6
|
+
stepbefore: any;
|
|
7
|
+
stepafter: any;
|
|
8
|
+
cardinal: any;
|
|
9
|
+
basis: any;
|
|
10
|
+
linear: any;
|
|
11
|
+
catmullrom: any;
|
|
12
|
+
monotone: any;
|
|
13
|
+
monotonex: any;
|
|
14
|
+
monotoney: any;
|
|
15
|
+
natural: any;
|
|
16
|
+
};
|
|
17
|
+
export declare function lineGeneratorDecorator({ generator, projectedCoordinateNames, defined, xScale, yScale, interpolator, simpleLine }: {
|
|
18
|
+
generator: any;
|
|
19
|
+
projectedCoordinateNames: any;
|
|
20
|
+
defined: any;
|
|
21
|
+
xScale: any;
|
|
22
|
+
yScale: any;
|
|
23
|
+
interpolator: any;
|
|
24
|
+
simpleLine: any;
|
|
25
|
+
}): void;
|
|
26
|
+
export declare function createPoints({ xScale, yScale, canvasDrawing, data, projectedCoordinateNames, customMark, canvasRender, styleFn, classFn, renderKeyFn, renderMode, baseMarkProps, showLinePoints: baseShowLinePoints }: {
|
|
27
|
+
xScale: any;
|
|
28
|
+
yScale: any;
|
|
29
|
+
canvasDrawing: any;
|
|
30
|
+
data: any;
|
|
31
|
+
projectedCoordinateNames: any;
|
|
32
|
+
customMark: any;
|
|
33
|
+
canvasRender: any;
|
|
34
|
+
styleFn: any;
|
|
35
|
+
classFn: any;
|
|
36
|
+
renderKeyFn: any;
|
|
37
|
+
renderMode: any;
|
|
38
|
+
baseMarkProps: any;
|
|
39
|
+
showLinePoints: any;
|
|
40
|
+
}): any[];
|
|
41
|
+
export declare function createLines({ xScale, yScale, canvasDrawing, data, projectedCoordinateNames, customMark, canvasRender, styleFn, classFn, renderMode, renderKeyFn, type, defined, baseMarkProps, ariaLabel, axesData }: {
|
|
42
|
+
xScale: any;
|
|
43
|
+
yScale: any;
|
|
44
|
+
canvasDrawing: any;
|
|
45
|
+
data: any;
|
|
46
|
+
projectedCoordinateNames: any;
|
|
47
|
+
customMark: any;
|
|
48
|
+
canvasRender: any;
|
|
49
|
+
styleFn: any;
|
|
50
|
+
classFn: any;
|
|
51
|
+
renderMode: any;
|
|
52
|
+
renderKeyFn: any;
|
|
53
|
+
type: any;
|
|
54
|
+
defined: any;
|
|
55
|
+
baseMarkProps: any;
|
|
56
|
+
ariaLabel: any;
|
|
57
|
+
axesData?: any[];
|
|
58
|
+
}): any[];
|
|
59
|
+
export declare function createSummaries({ xScale, yScale, canvasDrawing, data, canvasRender, styleFn, classFn, renderKeyFn, renderMode, baseMarkProps, customMark }: {
|
|
60
|
+
xScale: ScaleLinear<number, number>;
|
|
61
|
+
yScale: ScaleLinear<number, number>;
|
|
62
|
+
canvasDrawing?: object[];
|
|
63
|
+
data: ProjectedSummary[];
|
|
64
|
+
canvasRender?: Function;
|
|
65
|
+
styleFn?: Function;
|
|
66
|
+
classFn?: Function;
|
|
67
|
+
renderKeyFn?: Function;
|
|
68
|
+
renderMode?: Function;
|
|
69
|
+
baseMarkProps?: GenericObject;
|
|
70
|
+
customMark?: Function;
|
|
71
|
+
}): any[];
|
|
72
|
+
export declare function clonedAppliedElement({ tx, ty, d, i, markProps, styleFn, renderFn, classFn, renderKeyFn, baseClass, yi }: {
|
|
73
|
+
tx?: number;
|
|
74
|
+
ty?: number;
|
|
75
|
+
d: GenericObject;
|
|
76
|
+
i: number;
|
|
77
|
+
markProps: GenericObject;
|
|
78
|
+
styleFn: Function;
|
|
79
|
+
renderFn: Function;
|
|
80
|
+
classFn: Function;
|
|
81
|
+
renderKeyFn: Function;
|
|
82
|
+
baseClass: string;
|
|
83
|
+
yi?: number;
|
|
84
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const projectedX = "x";
|
|
2
|
+
export declare const projectedY = "y";
|
|
3
|
+
export declare const projectedYMiddle = "yMiddle";
|
|
4
|
+
export declare const projectedYTop = "yTop";
|
|
5
|
+
export declare const projectedYBottom = "yBottom";
|
|
6
|
+
export declare const projectedXMiddle = "xMiddle";
|
|
7
|
+
export declare const projectedXTop = "xTop";
|
|
8
|
+
export declare const projectedXBottom = "xBottom";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare type FilterDefTypes = {
|
|
3
|
+
matte?: any;
|
|
4
|
+
key: string;
|
|
5
|
+
additionalDefs?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare const filterDefs: ({ matte, key, additionalDefs }: FilterDefTypes) => React.JSX.Element;
|
|
8
|
+
export declare const generateFinalDefs: ({ matte, size, margin, frameKey, additionalDefs, name }: {
|
|
9
|
+
matte: any;
|
|
10
|
+
size: any;
|
|
11
|
+
margin: any;
|
|
12
|
+
frameKey: any;
|
|
13
|
+
additionalDefs: any;
|
|
14
|
+
name: any;
|
|
15
|
+
}) => {
|
|
16
|
+
defs: React.JSX.Element;
|
|
17
|
+
matte: any;
|
|
18
|
+
};
|
|
19
|
+
export {};
|