Graph is the component that renders the chart. It must be used inside a GraphProvider.
Basic usage
Props
All props are optional.Mode
Shortcut prop for setting sensible defaults for the interactivity and behavior of the graph for common use cases.
| Mode | isEditable | showTooltips | showHoverEffects | animateTransitions | isExplorable |
|---|---|---|---|---|---|
readonly | ✗ | ✓ | ✓ | ✓ | ✓ |
editor | ✓ | ✓ | ✓ | ✓ | ✓ |
static | ✗ | ✗ | ✗ | ✗ | ✗ |
Sizing
Controls how the graph responds to its container size.
mode: 'fixed'- graph has a fixed width and height (default)mode: 'responsive'- graph automatically resizes to fit its parent containermode: 'keepAspectRatio'- graph scales to fit container while maintaining aspect ratio (requires either intrinsic dimensions or aspect ratio)
Error handling
Callback invoked when the graph encounters an error. Useful for logging or analytics.Signature:
(info: { error: Error, errorInfo: React.ErrorInfo }) => voidComponent to render when the graph encounters an error. Receives the error as a prop.
Callbacks
Callback invoked when the chart container is resized.Signature:
(entries: ResizeObserverEntry[]) => voidCustom rendering
If
false, no border will be shown around the graph (this overrides the border styling set in the GraphConfig).Custom content to display in the chart footer area.
Custom render function for the chart title area.Signature:
(props: { isEditable: boolean, titleDocument: JSONContent, onChange: (newTitle: JSONContent) => void }) => React.ReactNodeRef to the graph container element.
Advanced props
These props allow fine-grained control over individual behaviors. In most cases, you should use themode prop instead.
Precedence order: explicit props →
mode → GraphConfig settings → defaults.For example, showTooltips={false} will override both the mode setting and appearance.showTooltips in your config.Whether the graph is editable. Changes are handled by the
GraphProvider.onChange handler.Whether to show tooltips on hover. Overrides the
appearance.showTooltips setting in GraphConfig.Whether to show hover effects (line markers, bar highlighting, etc.).
Whether to animate the graph on initial render and when data changes. Overrides the
appearance.animateTransitions setting in GraphConfig.Whether to allow transient, in-memory interactions for exploring the data. These interactions do not modify the
GraphConfig.Currently supports:- Legend toggling — click legend items to temporarily hide/show series
Examples
Responsive dashboard chart
Exportable chart with fixed dimensions
Type definitions
GraphSizing
GraphSizing
GraphTitleRenderProps
GraphTitleRenderProps
Migrating from older versions
isInteractive prop (removed in 0.0.62)
The isInteractive prop has been replaced by the mode prop.
| Before | After |
|---|---|
<Graph /> (no prop) | <Graph /> — no changes needed |
<Graph isInteractive={true} /> | <Graph /> — remove the prop |
<Graph isInteractive={false} /> | <Graph mode="static" /> |
disableAnimation prop (removed in 0.0.62)
The disableAnimation prop has been replaced by the mode prop or animateTransitions.
| Before | After |
|---|---|
<Graph /> (no prop) | <Graph /> — no changes needed |
<Graph disableAnimation={false} /> | <Graph /> — remove the prop |
<Graph disableAnimation={true} /> | <Graph mode="static" /> or <Graph animateTransitions={false} /> |
isEditable prop
The isEditable prop is still supported but we recommend using mode instead for clarity.
| Before | After |
|---|---|
<Graph isEditable={false} /> | <Graph mode="readonly" /> |
<Graph isEditable={true} /> | <Graph mode="editor" /> |
Related
- GraphProvider - State management and configuration
- Error Handling - Error handling patterns

