Skip to content

Interface: GraphOptions ​

Experimental

Options of graph.

Extends ​

Properties ​

PropertyModifierTypeDescriptionInherited from
arc?readonlyReadonly<Record<string, unknown>>Experimental Options of arrangement: 'arc' (the trace's arc container).-
arrangement?readonly| "preset" | "force" | "layered" | "tree" | "radial" | "dendrogram" | "circular" | "grid" | "arc" | "hive" | "custom"Experimental The layout that places the nodes (the trace's arrangement). Default: the trace's, 'preset' when every node has an x and a y, else 'force'.-
categoryOrders?readonlyReadonly<Record<string, readonly unknown[]>>Value orders per column: { day: ['Thu', 'Fri', 'Sat', 'Sun'] }. They order the traces and legend (for grouping columns), facets, frames and category axes. Values not listed follow in order of first appearance; listed values without rows still take a color and a facet (as px).GraphDataOptions.categoryOrders
color?readonlyColumnRefColumn to color by.GraphDataOptions.color
colorContinuousMidpoint?readonlynumbercmid: the value at the middle of a diverging colorscale.ContinuousColorOptions.colorContinuousMidpoint
colorContinuousScale?readonlyContinuousScaleColorscale of a numeric color. Default: the template's sequential colorscale.ContinuousColorOptions.colorContinuousScale
colorDiscreteMap?readonlyReadonly<Record<string, string>> | "identity"Fixed colors per value of color ({ Asia: 'red' }); other values continue with the sequence. 'identity': the values are colors themselves (no legend entries for them).GraphDataOptions.colorDiscreteMap
colorDiscreteSequence?readonlyreadonly string[]Colors for the values of color, in order. Default: the template's colorway.GraphDataOptions.colorDiscreteSequence
custom?readonlyReadonly<Record<string, unknown>>Experimental The layout of arrangement: 'custom': { name, options } (the trace's custom).-
customData?readonlyreadonly ColumnRef[]Columns put in customdata (first, before hoverData's), e.g. for click handlers.GraphDataOptions.customData
directed?readonlybooleanExperimental Whether links have a direction. graph: arrowheads at the target end (default false). chord: the trace's directed (its default is true). adjacencyMatrix: rows are sources and columns targets; otherwise (the default) a link fills both cells.GraphDataOptions.directed
force?readonlyReadonly<Record<string, unknown>>Experimental Options of arrangement: 'force' (the trace's force container, as it is).-
height?readonlynumberFigure height in px (layout.height).GraphDataOptions.height
hive?readonlyReadonly<Record<string, unknown>>Experimental Options of arrangement: 'hive' (the trace's hive container).-
hoverData?readonly| readonly ColumnRef[] | Readonly<Record<string, string | boolean>>More columns for the hover label, through customdata: a list of columns, or an object that adds columns (true), removes lines (false, e.g. { x: false }) or formats them (':.2f', `'%Y'`).
hoverName?readonlyColumnRefColumn shown in bold at the top of the hover label (hovertext).GraphDataOptions.hoverName
id?readonlyColumnRefExperimental Node column of the ids that source and target refer to. Default 'id'.GraphDataOptions.id
label?readonlyColumnRefExperimental Node column of labels (node.label). Default: the ids.GraphDataOptions.label
labels?readonlyReadonly<Record<string, string>>Display names of columns: { gdpPercap: 'GDP per capita' }. Used for axis titles, hover lines, the legend title, facet labels, the colorbar title and the animation slider.GraphDataOptions.labels
layered?readonlyReadonly<Record<string, unknown>>Experimental Options of arrangement: 'layered' (the trace's layered container).-
linkColor?readonlyColumnRefExperimental Edge column to color the links by: one color per value, from linkColorMap and then the color sequence. Links have no legend; the value is a line of the hover label.GraphDataOptions.linkColor
linkColorMap?readonlyReadonly<Record<string, string>> | "identity"Experimental Fixed link colors per value of linkColor; 'identity': the values are colors.GraphDataOptions.linkColorMap
linkHoverData?readonly| readonly ColumnRef[] | Readonly<Record<string, string | boolean>>Experimental More edge columns for the link hover label, like hoverData.GraphDataOptions.linkHoverData
linkLabel?readonlyColumnRefExperimental Edge column of link labels, for the hover label (link.label).GraphDataOptions.linkLabel
nodes?readonlyDataInputExperimental The node table: one row per node. It gives the nodes labels, colors and hover text, sets their order (nodes that only the edges name follow, in order of first appearance) and adds nodes without links. color, hoverName, hoverData, customData and the other node options name its columns. Without it, they can only be arrays with one value per node, in order of first appearance in the edges.GraphDataOptions.nodes
rangeColor?readonlyreadonly [number, number][cmin, cmax] of the colorscale.ContinuousColorOptions.rangeColor
size?readonlyColumnRefExperimental Node column of sizes, or 'degree', 'indegree' or 'outdegree' to size the nodes by their links (node.sizeby). Diameters run from 6 px to sizeMax, as node.sizerange does.-
sizeMax?readonlynumberExperimental Diameter of the largest node with size, in px. Default 30.-
source?readonlyColumnRefExperimental Edge column of the id of the node a link starts at. Default 'source'.GraphDataOptions.source
symbol?readonlyColumnRefColumn whose values get different marker symbols (one trace per value).SymbolOptions.symbol
symbolMap?readonlyReadonly<Record<string, string>> | "identity"Fixed symbols per value; 'identity': the values are symbols.SymbolOptions.symbolMap
symbolSequence?readonlyreadonly string[]Symbols in order. Default: the template's scatter symbols, else circle, diamond, square, x, cross.SymbolOptions.symbolSequence
target?readonlyColumnRefExperimental Edge column of the id of the node a link ends at. Default 'target'.GraphDataOptions.target
template?readonlystring | Templatelayout.template: a registered name ('plotly-classic') or a template object. Default: unset, so the chart's default template applies (Holochart's holochart look); its colorway, symbol and dash cycles and sequential colorscale are what the figure's colors are taken from.GraphDataOptions.template
title?readonlystringFigure title (layout.title.text).GraphDataOptions.title
tree?readonlyReadonly<Record<string, unknown>>Experimental Options of 'tree', 'radial' and 'dendrogram' (the trace's tree container).-
value?readonlyColumnRefExperimental Node column of a number per node (node.value): dendrogram heights, tree and hive order.-
weight?readonlyColumnRefExperimental Edge column of link weights (link.value).GraphDataOptions.weight
width?readonlynumberFigure width in px (layout.width).GraphDataOptions.width
x?readonlyColumnRefExperimental Node column of x positions (node.x). With y for every node, the nodes stay there.-
y?readonlyColumnRefExperimental Node column of y positions (node.y).-

Released under the MIT License.