Installation
#
MotivationWe want to build a collaborative Knowledge Graph Editor. To achive that goal we need a Graph Visualizer on a web browser and it needs to have a declarative rendering. Because in imperative style we need to call appropriate api functions respect to the data changes like addNode, deleteNode etc. But we just want to change JSON data (node and edge information) and render elements respectively to the changes.
First, install Nodejs and Yarn to your working environment. Then
Then,
After you can write this command to the terminal in your project directory
So let's start coding
To use GraphEditor you need to install material-ui packages. We use the latest version:
To support material-ui v5 with @rjsf/material-ui, we need to add some special configuration until they have fully support for v5. Also add some packages.
Start development server again:
To have json editor:
To use rdf based operation please install the required dependencies:
To use layouts, please install the required dependencies:
If the PIXI.js renderer takes a lot time to render all elements and blocks the UI then consider on:
Decreasing the view resolution and settings quality In example when a huge data chunk imported to perfect-graph, if the view quality is very high ; then PIXI.js will block (to render the elements with high view quality) the UI thread and cause strange issues. Set low view quality settings before importing the data chunk and let Adaptive Performance Optimizer do the rest of the optimization.
If there is an error: Can not set readonly 'x' of '#Object' That could be related with position ; If you use cy.$(id).position() in somewhere and store it that can cause an issue. Use cy.$(id).position().x , cy.$(id).position().y
Furthermore please refer to the Components Section.