Skip to content

Commit cfa1721

Browse files
author
Manfred Cheung
committed
feat: add documentation associated with relative points
1 parent b92e6ab commit cfa1721

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

docs/api/grafer-points-data.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ An array of point objects to be loaded into Grafer. The PointData property list
1414
| Property | Type | Description |
1515
| :--- | :--- | :--- |
1616
| id | string - *optional* | Name of the point. Will be used as an ID when referencing point in node, edge, and label data. Will default to its index in the PointData array if left out. |
17+
| parentId | string - *optional* | ID of the point which this point is the child of. Used to enable relative positioning of points and relative radius. Will default to *No Parent* if left out.
1718
| x | number | X-Coordinate of the point. |
1819
| y | number | Y-Coordinate of the point. |
1920
| z | number - *optional* | Z-Coordinate of the point. Will default to 0 if left out. |
@@ -27,7 +28,19 @@ Data [mappings](../guides/mappings.md) are used to compute properties at runtime
2728
| Property | Type | Description |
2829
| :--- | :--- | :--- |
2930
| id | (datum: PointData) => string - *optional* | |
31+
| parentId | (datum: PointData) => string - *optional* | |
3032
| x | (datum: PointData) => number - *optional* | |
3133
| y | (datum: PointData) => number - *optional* | |
3234
| z | (datum: PointData) => number - *optional* | |
3335
| radius | (datum: PointData) => number - *optional* | |
36+
37+
### `options`
38+
###### { [key: string]: any } - *optional*
39+
40+
An object containing configuration options for the points.
41+
42+
| Property | Type | Description |
43+
| :--- | :--- | :--- |
44+
| positionHierarchyType | HierarchyTypes | Changes how point hierarchies changes the point positions. See [HierarchyTypes](./hierarchy-types.md) for more information. |
45+
| radiusHierarchyType | HierarchyTypes | Changes how point hierarchies changes the point radius. See [HierarchyTypes](./hierarchy-types.md) for more information. |
46+
| maxHierarchyDepth | number | Sets the maximum hierarchy depth that any point will have. Defaults to 100. |

src/data/GraphPoints.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export enum HierarchyTypes {
1212
}
1313

1414
export interface PointOptions {
15-
positionClassMode?: HierarchyTypes
16-
radiusClassMode?: HierarchyTypes
15+
positionHierarchyType?: HierarchyTypes
16+
radiusHierarchyType?: HierarchyTypes
1717
maxHierarchyDepth?: number
1818
}
1919

0 commit comments

Comments
 (0)