Skip to main content
EditorProvider is the context provider for editor components. It manages editor-specific state and must wrap all editor panels, sections and other controls. It should be placed inside a GraphProvider.

Basic usage

Props

children
React.ReactNode
required
Child components to be wrapped by the provider.
components
EditorComponentRegistry
List of overrides for internal components. See EditorComponentRegistry
customColorInputs
CustomColorInputConfig[]
Custom color configuration for series styling in the editor.By default, the editor automatically generates color inputs based on the data series. Use this prop to override that behavior with custom configurations.Type: Array<{ text: string, seriesConfigKey: string, symbol?: LegendSymbolType, color?: string }>
themeOptions
GraphThemeOption[]
Available theme options to display in the editor theme selector.Each option has a label (string or function receiving a translate function), a value (GraphTheme), and an optional renderIcon callback.You can use the pre-built defaultThemeOptions which provides light and dark options with icons.
Or use the built-in defaults:
onThemeChange
(value: GraphTheme) => void
Callback invoked when the user changes the graph theme in the editor.
theme
EditorTheme
Customize the editor UI theme (typography, colors, font weights, etc.). Defaults to editorLightTheme. You can use the pre-built editorLightTheme or editorDarkTheme, or create a custom theme.See EditorTheme for the full type definition and available font tokens.

Complete example

Type definitions