Skip to main content

The Chart component for Retool Mobile

A chart to visualize datasets.

A chart to visualize data in different layouts using Plotly. Refer to Plotly's JavaScript reference to learn more about available options.

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.

aspectRatio

The ratio of width-to-height (e.g., 1.3 to use 4:3 ratio).

Type number
Format Float
Mutability
ControlUsage
Retool UI Inspector
Examples
1.3

data

The data.

Type string | number | boolean | object | array
Format Custom data
Mutability
ControlUsage
Retool UI Inspector
MethodcopyToClipboard()

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Hidden
MethodsetHidden()
Default
false
Examples
true

layout

The layout of content.

Type string
Mutability
ControlUsage
Retool UI Inspector
Allowed Values
ValueDescription
row

Horizontal row layout.

column

Vertical column layout.


Methods

JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

chart.setHidden()

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
chart.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide chart.

chart.setHidden(true);

Unhide chart.

chart.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.

EventDescription