GraphML Viewer is a simple library to render graphml files (for example from yed or draw.io) in your browser using SVG!
Install with npm:
npm i graphml-viewer
To use just import the script and create a graphml-viewer node with the src attribute pointing to the graphml file. That's all!
<html>
<head>
<script type="module" src="node_modules/prebuilt/esnext/graphml-viewer.js"></script>
</head>
<body>
<graphml-viewer style="width:600px;" src="./testdata/test.graphml"></graphml-viewer>
</body>
</html>
In case you are using webpack simply add
import 'graphml-viewer';
inside the entry point file.
This project only supports modern browsers such as Edge, Chrome, Firefox and Safari.
This project is dependency free!
GraphML documents can load external content when opened. Only open GraphML documents you trust.
You can view this library in action here: https://cyberphoenix90.github.io/graphml-viewer/