Skip to main content
SankeyOptions
Options for Sankey diagram
NameTypeDescription
colorGenerator?ColorGeneratorOptional function to call in order to establish the color to be used for each series
csvData?stringOptional CSV data to load. Each line should be in the format source,target,value.
dataSource?DataSourceOptional data source (of type DataSource, meaning both VisuallyJsModel and Selection are supported) from which to retrieve data to load into the chart.
dataSourceFilter?ChartModelFilterWhen you provide dataSource, you can also provide a filter which accepts or rejects specific nodes/groups in the data source.
defaultColor?stringOptional color to use for every series. Overrides any colorGenerator.
emptyMessage?stringMessage to display when the chart has no data. Defaults to "No data".
height?numberHeight for the chart. If omitted, height is computed from the width of the chart's container
interactive?booleanDefaults to true - the charts responds to mouse hover events and highlights edges, nodes and paths.
jsonData?VisuallyJsDefaultJSONOptional dataset to load.
labelProperty?stringWhen using a data source, this property tells the chart which field contains node labels. It defaults to labels. If there is no value provided for the property with this key, the node's ID is used as the label.
labels?{
  backgroundColor:string,
  font:FontSpec,
  padding:number
}
Options for the node labels.
legend?boolean | LegendSpecEither a boolean true/false, indicating the legend should be shown/hidden, or a spec for a legend.
linkColor?stringLink color to use when linkColorStrategy is 'static'. Defaults to "#444444"
linkColorStrategy?"source" | "target" | "static" | "source-target"Strategy for link color: static uses a single color, source-target paints a gradient from source to target, target uses the target node color, source uses the source node color.
nodePadding?numberSpacing, in pixels, between nodes. Defaults to 10.
nodeWidth?numberWidth, in pixels, of nodes. Defaults to 15.
padding?numberPadding to leave around the chart. Defaults to 20 pixels.
resizeObserver?booleanDefaults to true, meaning the chart will redraw when its container element resizes.
style?ChartStyleOptionsStyles for legend and grid.
subtitle?SubtitleSpecSubtitle for the chart.
title?ChartTitleSpecTitle for the chart.
titlePadding?numberPadding to leave underneath the title
tooltip?TooltipOptionsOptions for a tooltip for the chart.
tooltipSuffix?stringOptional suffix to append to tooltip labels.
url?stringOptional URL from which to retrieve data to load into the chart
valueProperty?stringWhen using a data source, this property tells the chart which field contains edge values. It defaults to value.
width?numberWidth for the chart. If omitted, width is computed from the width of the chart's container
zoom?{
  enabled:boolean,
  initialValue:number,
  range:[number, number]
}
Optional zoom configuration.