Skip to main content
The DataTable component provides a spreadsheet-like interface for viewing and editing the data in your graph. It automatically connects to GraphProvider and syncs all changes with your graph configuration.

Basic usage

Simply render the DataTable component inside a GraphProvider:

Props

The DataTable component accepts optional configuration props:

Features

  • Responsive – the table resizes to fit the container
  • Cell editing – click, press Enter or start typing to edit
  • Range selection – select multiple cells with mouse or Shift + arrows
  • Keyboard navigation – arrow keys, Tab, Enter, Escape
  • Clipboard – copy (Cmd/Ctrl+C), paste (Cmd/Ctrl+V), cut (Cmd/Ctrl+X)
  • Undo/redo – Cmd/Ctrl+Z to undo, Cmd/Ctrl+Shift+Z to redo
  • Delete – Backspace or Delete to clear cell values
  • State sync – changes automatically update the graph config

Integration with editor components

The DataTable works seamlessly with other editor components. You can combine it with editor panels and other controls:

Low-level primitive

For more control, you can use DataTablePrimitive which doesn’t connect to GraphProvider and requires manual state management. This is useful when you need a standalone table outside of the chart editing context.