The Sankey Chart component for Retool Apps
A content area to display sankey charts.
The Sankey Chart component renders data as links between nodes. Sankey Chart is useful for visualizing how data moves between different stages or categories.
For more information about using the Sankey Chart component, refer to the charts guide.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
chartType
The type of chart to display.
Type | string | ||||||||||||||||||||||||||||||||||||||||||
Format | Plain Text | ||||||||||||||||||||||||||||||||||||||||||
Mutability |
| ||||||||||||||||||||||||||||||||||||||||||
Allowed Values |
|
Examples
"bar"
clearOnEmptyData
Whether to clear the chart when the data is empty.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
colorArray
A list of colors to use when colorInputMode
is colorArray
.
Type | array | ||||
Format | Color | ||||
Array values | string | ||||
Mutability |
|
Examples
["#ff0000", "#00ff00", "#0000ff"]
colorArrayDropDown
A list of colors to use when colorInputMode
is colorArrayDropDown
.
Type | array | ||||
Format | Color | ||||
Array values | string | ||||
Mutability |
|
Examples
["#ff0000", "#00ff00", "#0000ff"]
colorInputMode
The mode for the color input.
Type | string | ||||||||||||
Format | Plain Text | ||||||||||||
Mutability |
| ||||||||||||
Allowed Values |
| ||||||||||||
Default |
|
Examples
"colorArray"
gradientColorArray
A list of colors to use when colorInputMode
is gradientColorArray
.
Type | array | ||||
Format | Color | ||||
Array values | string | ||||
Mutability |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
query1
button1
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
maintainSpaceWhenHidden
Whether to take up space on the canvas if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
margin
The amount of margin to render outside.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
4px 8px
sankeyAllowDuplicateNodesAtDifferentSteps
Whether to allow duplicate nodes at different steps.
Type | boolean | ||||
Mutability |
|
sankeyDatasource
The data source for the Sankey Chart.
Type | object | ||||
Mutability |
|
sankeyDatasourceMode
The data mode for the Sankey Chart.
Type | string | ||||||
Mutability | Read-only | ||||||
Allowed Values |
|
sankeyLinkColorArray
The link color scale, input as an array of colors.
Type | array |
Array values | string |
Mutability | Read-only |
sankeyLinkColorArrayDropDown
The link color scale, manually selected.
Type | string |
Mutability | Read-only |
sankeyLinkColorInputMode
The input mode for the link color scale.
Type | string | ||||||||
Mutability |
| ||||||||
Allowed Values |
|
sankeyLinkHoverTemplate
The template for the hover information.
Type | string | ||||
Mutability |
|
sankeyNodeHoverTemplate
The template for the hover information.
Type | string | ||||
Mutability |
|
sankeyNodeHoverTemplateMode
The mode of the hover information editor.
Type | string | ||||||
Mutability | Read-only | ||||||
Allowed Values |
|
showInEditor
Whether the component remains visible in the editor if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
style
Custom style options.
Type | object | ||||
Mutability |
|
toolbar
The toolbar configuration.
Type | object | ||||
Mutability |
|
Object Properties
showAutoscale
Whether to show the Autoscale button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showBoxSelect
Whether to show the Box select button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showLassoSelect
Whether to show the Lasso select button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showPan
Whether to show the Pan button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showResetViews
Whether to show the Reset view button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showToImage
Whether to show the Download as PNG button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showZoomIn
Whether to show the Zoom in button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showZoomOut
Whether to show the Zoom out button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
showZoomSelect
Whether to show the Zoom select button.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
true
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
sankeyChart.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
sankeyChart.scrollIntoView(options)
Parameters
Object Properties
behavior
The scroll behavior.
Type | string | ||||||
Allowed Values |
|
block
The scroll position relative to the component.
Type | string | ||||||||||
Allowed Values |
|
Examples
Scroll the minimum amount to immediately bring sankeyChart
into view.
sankeyChart.scrollIntoView({behavior: 'auto', block: 'nearest'});
sankeyChart.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
sankeyChart.setHidden(hidden)
Parameters
Examples
true
Examples
Hide sankeyChart
.
sankeyChart.setHidden(true);
Unhide sankeyChart
.
sankeyChart.setHidden(false);
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Clear | A value is cleared. |
Hover | An item is hovered over. |
Legend Click | A legend item is clicked or pressed. |
Legend Double Click | A legend item is double-clicked or pressed. |
Select | A value is selected. |
Unhover | An item is no longer hovered over. |