Skip to main content

The Chart component for Retool Mobile

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
Configurability Inspector
Defaultnull
Examples
false1.3

data​

The data.

Type string | number | boolean | object | array
Format Custom data
Configurability Inspector
Defaultnull

hidden​

Whether this object is hidden from view.

Type boolean
Format True/False
Configurability Inspector > Appearance > Hidden
Defaultfalse
Examples
falsetrue

layout​

The layout of content.

Type string
Configurability Inspector
Allowed Values
ValueDescription
row

Horizontal row layout.

column

Vertical column layout.

Defaultnull

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