The Pie Chart component for Retool Apps
A content area to display pie charts.
The Pie Chart component renders data in a circle, with percentage-based slices. Pie Chart is useful for visualizing how different parts make up a whole.
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.
barGap
The gap between bars relative to the size of the bars. This can be a number between 0 and 1.
Type | number | ||||
Format | Float | ||||
Mutability |
| ||||
Default |
|
Examples
barGroupGap
The gap between bars in a group relative to the size of the bars. This can be any number between 0
and 1
.
Type | number | ||||
Format | Float | ||||
Mutability |
| ||||
Default |
|
Examples
barMode
The list of bar modes.
Type | string | |||||||||||||||
Format | Plain Text | |||||||||||||||
Mutability |
| |||||||||||||||
Allowed Values |
| |||||||||||||||
Default |
|
Examples
barOrientation
The orientation of the bars.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
chartType
The type of chart to display.
Type | string | ||||||||||||||||||||||||||||||||||||||||||
Format | Plain Text | ||||||||||||||||||||||||||||||||||||||||||
Mutability |
| ||||||||||||||||||||||||||||||||||||||||||
Allowed Values |
| ||||||||||||||||||||||||||||||||||||||||||
Default |
|
Examples
clearOnEmptyData
Whether to clear the chart when the data is empty.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
colorArray
A list of colors to use when colorInputMode
is colorArray
.
Type | array | ||||
Format | Color | ||||
Array values | string | ||||
Mutability |
|
Examples
colorArrayDropDown
A list of colors to use when colorInputMode
is colorArrayDropDown
.
Type | array | ||||
Format | Color | ||||
Array values | string | ||||
Mutability |
|
Examples
colorInputMode
The mode for the color input.
Type | string | ||||||||||||
Format | Plain Text | ||||||||||||
Mutability |
| ||||||||||||
Allowed Values |
| ||||||||||||
Default |
|
Examples
gradientColorArray
A list of colors to use when colorInputMode
is gradientColorArray
.
Type | array | ||||
Format | Color | ||||
Array values | string | ||||
Mutability |
|
heatmapShowScale
Whether to display the color scale legend.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
hoverTemplate
The tooltip template for displaying information when you hover over a point.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
labelData
A list of labels for each node.
Type | array | ||||
Array values | string | ||||
Mutability |
| ||||
Default |
|
Examples
legendPosition
The position of the legend.
Type | string | ||||||||||||||||||
Mutability |
| ||||||||||||||||||
Allowed Values |
|
parentData
The parent to which a given node is associated.
Type | array | ||||
Array values | string | ||||
Mutability |
|
pieDataHole
Specifies hole depth, between 0 and 1.
Type | number | ||||
Mutability |
|
plotlyDataJson
The data to be displayed, in Plotly JSON format.
Type | array | ||||
Array values | object | ||||
Mutability |
|
plotlyLayoutJson
The layout, in Plotly JSON format.
Type | object | ||||
Mutability |
|
rangeSlider
Whether to display a range slider.
Type | boolean | ||||
Mutability |
|
sankeyAllowDuplicateNodesAtDifferentSteps
Whether to allow duplicate nodes at different steps.
Type | boolean | ||||
Mutability |
|
sankeyDatasource
The data source for the Sankey Chart.
Type | object | ||||
Mutability |
|
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 |
|
stackedBarTotalsDataLabelPosition
The position of the stack data labels on a stacked bar chart.
Type | string | ||||||||
Mutability |
| ||||||||
Allowed Values |
|
sunburstDataBranchValues
The branch values for the Sunburst Chart.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
sunburstDataLeafOpacity
The opacity of the leaf nodes in the Sunburst Chart.
Type | number | ||||
Mutability |
|
textTemplate
The format to use for data labels, constructed in Plotly template format.
Type | string | ||||
Mutability |
|
textTemplatePosition
The orientation of the data labels.
Type | string | ||||||||
Mutability |
| ||||||||
Allowed Values |
|
toolbar
The toolbar configuration.
Type | object | ||||
Mutability |
|
Object Properties
valueData
The value for a specific node.
Type | array | ||||
Array values | number | ||||
Mutability |
|
Object Properties
Object Properties
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
pieChart.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
pieChart.scrollIntoView(options)
Parameters
Examples
pieChart.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
pieChart.setHidden(hidden)
Parameters
Examples
Events
Events triggered by user interactions. Use event handlers to trigger queries or other actions in response to events.
legendClick
A legend item is clicked or pressed.
legendDoubleClick
A legend item is double-clicked or pressed.