"extend" routes label hits to the parent node/edge event.
"separate" makes labels standalone targets that fire their own events.
The Record form lets each interaction (click, hover, …) pick its own mode, with an optional default fallback.
See Label events for the full description and an example.
Camera
Setting
Type
Default
Description
enableCameraZooming
boolean
true
Allow zooming with the mouse wheel
enableCameraPanning
boolean
true
Allow panning by dragging the background
enableCameraRotation
boolean
true
Allow camera rotation
enableCameraMouseRotation
boolean
true
Allow mouse-based camera rotation
minCameraRatio
number | null
null
Minimum zoom level (smaller = more zoomed in). null means no limit
maxCameraRatio
number | null
null
Maximum zoom level (larger = more zoomed out). null means no limit
cameraPanBoundaries
see below
null
Constrain the camera panning area
gestureTarget
"graph" | "shared" | "page"
"graph"
Where wheel and touch gestures are routed (see below)
sharedGestureWheelMessage
string
"Use Ctrl + scroll to zoom the graph"
Hint shown on plain wheel when gestureTarget is "shared". "" disables it
sharedGestureAppleWheelMessage
string
"Use ⌘ + scroll to zoom the graph"
Same, on Apple devices
sharedGestureTouchMessage
string
"Use two fingers to move the graph"
Hint shown on one-finger drag when gestureTarget is "shared". "" disables it
Gesture target
The gestureTarget setting solves the conflict between interacting with the graph and scrolling the page:
"graph" (default): all gestures go to the graph. The page never scrolls over the stage.
"shared": plain gestures go to the page (wheel scrolls, one-finger touch pans). The graph is reached with Ctrl/⌘ + wheel (trackpad pinches work too) and two-finger touch. A hint overlay tells users how.
"page": wheel and touch gestures all go to the page. Clicks, taps and mouse drag-panning still reach the graph.
In "shared" mode, the hint overlay is a single <div class="sigma-gesture-hint"> appended to the sigma container,
shown while plain gestures hit the stage. Its texts come from the sharedGestureWheelMessage (or
sharedGestureAppleWheelMessage on Apple devices, where the modifier is ⌘) and sharedGestureTouchMessage
settings. Its default look comes from a small <style> element injected in the container,
scoped (CSS @scope) so its rules cannot affect anything outside of it, and layered (CSS @layer) so any unlayered
CSS rule of yours overrides it, no !important needed. Each at-rule is only used when the browser supports it; on
older browsers the bare rules are injected instead, and custom CSS competes on normal specificity. For instance:
.sigma-gesture-hint {
background: rgba(255, 255, 255, 0.7);
color: #333;
font-style: italic;
}
Camera pan boundaries
The cameraPanBoundaries setting accepts:
null: no boundaries (default)
true: automatically constrain to the graph extent
An object with tolerance and/or boundaries:
{
tolerance: 0.1,
boundaries: { x: [-100, 100], y: [-100, 100] }
}
Sizing and scaling
Setting
Type
Default
Description
itemSizesReference
"screen" | "positions"
"positions"
Reference space for node/edge sizes. "positions": sizes live in graph space and scale with zoom. "screen": sizes stay constant in screen pixels regardless of zoom. In both modes zoomToSizeRatioFunction still applies
zoomToSizeRatioFunction
(ratio: number) => number
Math.sqrt
Maps camera zoom ratio to a size scaling factor. Applied in both "screen" and "positions" modes
autoRescale
boolean | "once"
true
Automatically rescale the graph to fit the viewport. "once" captures the initial extent and freezes it, useful for drag-and-drop scenarios
autoRescaleContent
"positions" | "nodes" | "labels"
"positions"
What the auto-rescale fit encloses. "positions": node centers only (default). "nodes": centers and node sizes. "labels": centers, sizes, and labels. Each level contains the previous one. Ignored when autoRescale is false or a custom bounding box is set. "labels" is expensive (only use it on small-ish graphs)
Label optimization
Setting
Type
Default
Description
labelRenderedSizeThreshold
number
6
Minimum rendered node size (in pixels) for its label to be displayed
labelDensity
number
1
Controls how many labels are shown. Higher values show more labels (must be positive)
labelGridCellSize
number
100
Size of the label grid cells used for density-based culling
labelPixelSnapping
boolean
true
Snap label positions to whole pixels for sharper text rendering