Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions modules/graph-layers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,20 @@ TBD
<p align="center">
<img src="https://i.imgur.com/BF9aOEu.png" height="400" />
</p>

## GraphML loader

`@deck.gl-community/graph-layers` ships a utility for loading GraphML documents into the
`TabularGraph` runtime via `loadGraphML`. The loader is designed for GraphML 1.0 documents and
supports the following constructs:

- `<graph>` elements with `edgedefault` set to either `directed` or `undirected`.
- `<node>` and `<edge>` elements with required identifiers and edge endpoints.
- `<key>` declarations scoped to `node`, `edge`, or `all` domains, including `<default>` values.
- `<data>` entries attached to nodes or edges that reference GraphML keys. Values are converted to
numbers or booleans when a key declares `attr.type` of `int`, `long`, `float`, `double`, or
`boolean`. Unrecognized types fall back to strings.

The loader intentionally ignores unsupported GraphML features such as hyperedges, ports, or nested
graphs. Data blocks that contain nested XML are preserved as serialized JSON strings inside the
resulting attribute map so applications can continue to access vendor-specific payloads.
1 change: 1 addition & 0 deletions modules/graph-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"d3-force": "^3.0.0",
"d3-format": "^3.1.0",
"d3-scale": "^4.0.2",
"fast-xml-parser": "^4.2.5",
"global": "^4.4.0",
"lodash.isequal": "^4.5.0",
"lodash.pick": "^4.4.0",
Expand Down
1 change: 1 addition & 0 deletions modules/graph-layers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export {
type DotGraphLoaderMetadata,
type DotGraphLoaderResult
} from './loaders/dot-graph-loader';
export {loadGraphML, parseGraphML} from './loaders/graphml-loader';

// utils
export {mixedGetPosition} from './utils/layer-utils';
Expand Down
Loading