@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.
Files changed (60) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +256 -256
  3. package/dist/index.es6.js +3 -3
  4. package/dist/index.es6.js.map +1 -1
  5. package/dist/index.js +3 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.js +1 -1
  8. package/dist/index.min.js.map +1 -1
  9. package/package.json +8 -8
  10. package/src/AdjacencyGraph.ts +224 -224
  11. package/src/Edge.css +23 -23
  12. package/src/Edge.ts +257 -257
  13. package/src/Graph.css +18 -18
  14. package/src/Graph.ts +1075 -1075
  15. package/src/GraphData.ts +187 -187
  16. package/src/GraphLayouts.ts +173 -173
  17. package/src/Sankey.css +46 -46
  18. package/src/Sankey.ts +291 -291
  19. package/src/Subgraph.css +10 -10
  20. package/src/Subgraph.ts +165 -165
  21. package/src/Vertex.css +3 -3
  22. package/src/Vertex.ts +282 -282
  23. package/src/__package__.ts +3 -3
  24. package/src/__tests__/data.ts +444 -444
  25. package/src/__tests__/index.ts +1 -1
  26. package/src/__tests__/test1.ts +18 -18
  27. package/src/__tests__/test2.ts +80 -80
  28. package/src/__tests__/test3.ts +46 -46
  29. package/src/__tests__/test4.ts +66 -66
  30. package/src/__tests__/test5.ts +85 -85
  31. package/src/graph2/dataGraph.ts +305 -305
  32. package/src/graph2/graph.css +34 -34
  33. package/src/graph2/graph.ts +135 -135
  34. package/src/graph2/graphReactT.ts +44 -44
  35. package/src/graph2/graphT.ts +1330 -1330
  36. package/src/graph2/index.ts +7 -7
  37. package/src/graph2/layouts/circle.ts +37 -37
  38. package/src/graph2/layouts/dagre.ts +132 -132
  39. package/src/graph2/layouts/dagreWorker.ts +35 -35
  40. package/src/graph2/layouts/forceDirected.ts +117 -117
  41. package/src/graph2/layouts/forceDirectedWorker.ts +30 -30
  42. package/src/graph2/layouts/geoForceDirected.ts +112 -112
  43. package/src/graph2/layouts/graphviz.ts +124 -124
  44. package/src/graph2/layouts/graphvizWorker.ts +71 -71
  45. package/src/graph2/layouts/index.ts +7 -7
  46. package/src/graph2/layouts/layout.ts +105 -105
  47. package/src/graph2/layouts/null.ts +35 -35
  48. package/src/graph2/layouts/placeholders.ts +103 -103
  49. package/src/graph2/layouts/tree.ts +328 -328
  50. package/src/graph2/liteMap.ts +72 -72
  51. package/src/graph2/liteSVGZooom.ts +61 -61
  52. package/src/graph2/sankeyGraph.css +45 -45
  53. package/src/graph2/sankeyGraph.ts +316 -316
  54. package/src/graph2/subgraph.tsx +30 -30
  55. package/src/graph2/vertex.tsx +31 -31
  56. package/src/index.ts +8 -8
  57. package/src/test.ts +649 -649
  58. package/types/__package__.d.ts +2 -2
  59. package/types/__package__.d.ts.map +1 -1
  60. package/types-3.4/__package__.d.ts +2 -2
@@ -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
+ };
@@ -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";