Skip to main content

1. Install the Graphy SDK

Because @graphysdk/core is a private package, you’ll need to configure your npm auth token. Create an .npmrc in your repository root (or user-level) with:
.npmrc

2. Create your first graph

There are two main components required to render a Graphy chart: GraphProvider is the state manager for Graphy charts and can be placed anywhere in the React tree. It provides state to the charting components as well as any components used to edit these charts. Graph is the component used to render the graph itself.
Graphy will automatically select sensible defaults for any properties that are not provided. See the graph types reference for all available chart types.

3. Customize your graph

You have fine-grained control over every aspect of your chart. Here are some common customizations:

4. Make it editable

By default, graphs are read-only. Use mode="editor" on the Graph component to allow users to edit titles, add annotations and make other modifications. Use the onChange handler on GraphProvider to persist these changes:
The mode prop has three options:
  • readonly (default) - Full interactivity with tooltips and hover effects, but no editing
  • editor - Same as readonly, plus the ability to edit the graph
  • static - No interactivity, useful for image exports

Next steps