Getting Started
Installing from NPM
PCUI Graph is available as a package on NPM. You can install it as follows:
npm install @playcanvas/pcui-graph --save-dev
note
It is assumed you already have the @playcanvas/pcui
package installed in your project.
Importing the Graph Component
You can import the Graph
component as follows:
import { Graph } from '@playcanvas/pcui-graph';
Creating a Graph
Options can be passed to the Graph
constructor as a JSON object which change the default behavior of the graph. You can do so as follows:
const graph = new Graph(schema, {
readOnly: true,
initialData: { ... }
});
You can see a full list of options here.
Examples
Examples of PCUI Graph usage can be found in this Storybook.