@hpcc-js/graph 2.87.3 → 2.87.4
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/LICENSE +43 -43
- package/README.md +256 -256
- package/dist/index.es6.js +3 -3
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +8 -8
- package/src/AdjacencyGraph.ts +224 -224
- package/src/Edge.css +23 -23
- package/src/Edge.ts +257 -257
- package/src/Graph.css +18 -18
- package/src/Graph.ts +1075 -1075
- package/src/GraphData.ts +187 -187
- package/src/GraphLayouts.ts +173 -173
- package/src/Sankey.css +46 -46
- package/src/Sankey.ts +291 -291
- package/src/Subgraph.css +10 -10
- package/src/Subgraph.ts +165 -165
- package/src/Vertex.css +3 -3
- package/src/Vertex.ts +282 -282
- package/src/__package__.ts +3 -3
- package/src/__tests__/data.ts +444 -444
- package/src/__tests__/index.ts +1 -1
- package/src/__tests__/test1.ts +18 -18
- package/src/__tests__/test2.ts +80 -80
- package/src/__tests__/test3.ts +46 -46
- package/src/__tests__/test4.ts +66 -66
- package/src/__tests__/test5.ts +85 -85
- package/src/graph2/dataGraph.ts +305 -305
- package/src/graph2/graph.css +34 -34
- package/src/graph2/graph.ts +135 -135
- package/src/graph2/graphReactT.ts +44 -44
- package/src/graph2/graphT.ts +1330 -1330
- package/src/graph2/index.ts +7 -7
- package/src/graph2/layouts/circle.ts +37 -37
- package/src/graph2/layouts/dagre.ts +132 -132
- package/src/graph2/layouts/dagreWorker.ts +35 -35
- package/src/graph2/layouts/forceDirected.ts +117 -117
- package/src/graph2/layouts/forceDirectedWorker.ts +30 -30
- package/src/graph2/layouts/geoForceDirected.ts +112 -112
- package/src/graph2/layouts/graphviz.ts +124 -124
- package/src/graph2/layouts/graphvizWorker.ts +71 -71
- package/src/graph2/layouts/index.ts +7 -7
- package/src/graph2/layouts/layout.ts +105 -105
- package/src/graph2/layouts/null.ts +35 -35
- package/src/graph2/layouts/placeholders.ts +103 -103
- package/src/graph2/layouts/tree.ts +328 -328
- package/src/graph2/liteMap.ts +72 -72
- package/src/graph2/liteSVGZooom.ts +61 -61
- package/src/graph2/sankeyGraph.css +45 -45
- package/src/graph2/sankeyGraph.ts +316 -316
- package/src/graph2/subgraph.tsx +30 -30
- package/src/graph2/vertex.tsx +31 -31
- package/src/index.ts +8 -8
- package/src/test.ts +649 -649
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/src/graph2/subgraph.tsx
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
// , Shape, Text,
|
|
2
|
-
import { React, Text } from "@hpcc-js/react";
|
|
3
|
-
import { SubgraphBaseProps } from "./layouts/placeholders";
|
|
4
|
-
|
|
5
|
-
export interface BasicSubgraphProps extends SubgraphBaseProps {
|
|
6
|
-
label?: string;
|
|
7
|
-
labelFill?: string;
|
|
8
|
-
labelHeight?: number,
|
|
9
|
-
rectFill?: string;
|
|
10
|
-
rectStroke?: string;
|
|
11
|
-
rectStrokeWidth?: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const BasicSubgraph: React.FunctionComponent<BasicSubgraphProps> = ({
|
|
15
|
-
label = "",
|
|
16
|
-
labelFill = "black",
|
|
17
|
-
labelHeight = 12,
|
|
18
|
-
width = 0,
|
|
19
|
-
height = 0,
|
|
20
|
-
rectFill: fill,
|
|
21
|
-
rectStroke: stroke = "#627ae7",
|
|
22
|
-
rectStrokeWidth: strokeWidth = 2
|
|
23
|
-
}) => {
|
|
24
|
-
return <g transform={`translate(${-width / 2} ${-height / 2})`}>
|
|
25
|
-
<rect width={width} height={height} fill={fill} stroke={stroke} style={{ strokeWidth }} />
|
|
26
|
-
<g transform={`translate(8 ${8 + labelHeight})`}>
|
|
27
|
-
<Text text={label} fill={labelFill} height={labelHeight} />
|
|
28
|
-
</g>
|
|
29
|
-
</g>;
|
|
30
|
-
};
|
|
1
|
+
// , Shape, Text,
|
|
2
|
+
import { React, Text } from "@hpcc-js/react";
|
|
3
|
+
import { SubgraphBaseProps } from "./layouts/placeholders";
|
|
4
|
+
|
|
5
|
+
export interface BasicSubgraphProps extends SubgraphBaseProps {
|
|
6
|
+
label?: string;
|
|
7
|
+
labelFill?: string;
|
|
8
|
+
labelHeight?: number,
|
|
9
|
+
rectFill?: string;
|
|
10
|
+
rectStroke?: string;
|
|
11
|
+
rectStrokeWidth?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const BasicSubgraph: React.FunctionComponent<BasicSubgraphProps> = ({
|
|
15
|
+
label = "",
|
|
16
|
+
labelFill = "black",
|
|
17
|
+
labelHeight = 12,
|
|
18
|
+
width = 0,
|
|
19
|
+
height = 0,
|
|
20
|
+
rectFill: fill,
|
|
21
|
+
rectStroke: stroke = "#627ae7",
|
|
22
|
+
rectStrokeWidth: strokeWidth = 2
|
|
23
|
+
}) => {
|
|
24
|
+
return <g transform={`translate(${-width / 2} ${-height / 2})`}>
|
|
25
|
+
<rect width={width} height={height} fill={fill} stroke={stroke} style={{ strokeWidth }} />
|
|
26
|
+
<g transform={`translate(8 ${8 + labelHeight})`}>
|
|
27
|
+
<Text text={label} fill={labelFill} height={labelHeight} />
|
|
28
|
+
</g>
|
|
29
|
+
</g>;
|
|
30
|
+
};
|
package/src/graph2/vertex.tsx
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
// , Shape, Text,
|
|
2
|
-
import { React, Text } from "@hpcc-js/react";
|
|
3
|
-
import { VertexBaseProps } from "./layouts/placeholders";
|
|
4
|
-
|
|
5
|
-
export interface BasicVertexProps extends VertexBaseProps {
|
|
6
|
-
textFill?: string;
|
|
7
|
-
textHeight?: number,
|
|
8
|
-
scale?: number,
|
|
9
|
-
circleRadius?: number,
|
|
10
|
-
circleFill?: string,
|
|
11
|
-
circleStroke?: string,
|
|
12
|
-
circleStrokeWidth?: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const BasicVertex: React.FunctionComponent<BasicVertexProps> = ({
|
|
16
|
-
text,
|
|
17
|
-
textFill = "black",
|
|
18
|
-
textHeight = 12,
|
|
19
|
-
scale = 1,
|
|
20
|
-
circleRadius = 16,
|
|
21
|
-
circleFill = "#a2bcf9",
|
|
22
|
-
circleStroke = "#627ae7",
|
|
23
|
-
circleStrokeWidth = 2
|
|
24
|
-
}) => {
|
|
25
|
-
return <g transform={`scale(${scale})`}>
|
|
26
|
-
<circle cx="0" cy="0" r={circleRadius} fill={circleFill} stroke={circleStroke} style={{ strokeWidth: circleStrokeWidth }} />
|
|
27
|
-
<g transform={`translate(0 ${circleRadius + textHeight})`}>
|
|
28
|
-
<Text text={text} fill={textFill} height={textHeight}></Text>
|
|
29
|
-
</g>
|
|
30
|
-
</g>;
|
|
31
|
-
};
|
|
1
|
+
// , Shape, Text,
|
|
2
|
+
import { React, Text } from "@hpcc-js/react";
|
|
3
|
+
import { VertexBaseProps } from "./layouts/placeholders";
|
|
4
|
+
|
|
5
|
+
export interface BasicVertexProps extends VertexBaseProps {
|
|
6
|
+
textFill?: string;
|
|
7
|
+
textHeight?: number,
|
|
8
|
+
scale?: number,
|
|
9
|
+
circleRadius?: number,
|
|
10
|
+
circleFill?: string,
|
|
11
|
+
circleStroke?: string,
|
|
12
|
+
circleStrokeWidth?: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const BasicVertex: React.FunctionComponent<BasicVertexProps> = ({
|
|
16
|
+
text,
|
|
17
|
+
textFill = "black",
|
|
18
|
+
textHeight = 12,
|
|
19
|
+
scale = 1,
|
|
20
|
+
circleRadius = 16,
|
|
21
|
+
circleFill = "#a2bcf9",
|
|
22
|
+
circleStroke = "#627ae7",
|
|
23
|
+
circleStrokeWidth = 2
|
|
24
|
+
}) => {
|
|
25
|
+
return <g transform={`scale(${scale})`}>
|
|
26
|
+
<circle cx="0" cy="0" r={circleRadius} fill={circleFill} stroke={circleStroke} style={{ strokeWidth: circleStrokeWidth }} />
|
|
27
|
+
<g transform={`translate(0 ${circleRadius + textHeight})`}>
|
|
28
|
+
<Text text={text} fill={textFill} height={textHeight}></Text>
|
|
29
|
+
</g>
|
|
30
|
+
</g>;
|
|
31
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./__package__";
|
|
2
|
-
export * from "./AdjacencyGraph";
|
|
3
|
-
export * from "./Edge";
|
|
4
|
-
export * from "./Graph";
|
|
5
|
-
export * from "./Sankey";
|
|
6
|
-
export * from "./Subgraph";
|
|
7
|
-
export * from "./Vertex";
|
|
8
|
-
export * from "./graph2/index";
|
|
1
|
+
export * from "./__package__";
|
|
2
|
+
export * from "./AdjacencyGraph";
|
|
3
|
+
export * from "./Edge";
|
|
4
|
+
export * from "./Graph";
|
|
5
|
+
export * from "./Sankey";
|
|
6
|
+
export * from "./Subgraph";
|
|
7
|
+
export * from "./Vertex";
|
|
8
|
+
export * from "./graph2/index";
|