Skip to main content

The Chart component for Retool Apps

A content area to display charts.

This component is considered legacy and will be deprecated in the future. Use the newer Chart components, which have more features available.

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.

autoSkipTicks

Whether to skip ticks that are not evenly spaced.

Type boolean
Configurability Inspector
Defaultnull

cutoutPercentage

The percentage of the chart that is cut out of the middle.

Type number
Configurability Inspector
Defaultnull

datasets

A list of datasets.

Type array
Array values object
Configurability Inspector
Defaultnull

events

A list of configured event handlers that trigger actions or queries.

Type array
Array values object
Configurability Inspector > Interaction > Event handlers
Defaultnull
Array Object Properties

event

The event that triggers the action. Refer to the events section for details of available events for this object.

Type string
Configurability Inspector > Interaction > Event handlers > Event
Defaultnull

method

The JavaScript method to perform when type is datasource, widget, state, or localStorage.

Type string
Configurability Inspector > Interaction > Event handlers > Edit event handler > Run script actions
Defaultnull

type

The type of action to perform.

Type string
Configurability Inspector > Interaction > Event handlers > Edit event handler > Action
Allowed Values
ValueDescription
datasource

Control query.

widget

Control component.

script

Run script.

state

Set variable.

localStorage

Set localStorage.

util

Perform utility action (e.g., Open URL or Confetti).

Defaultnull


hidden

Whether this object is hidden from view.

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

id

The unique identifier (name).

Type string
Format Plain Text
Configurability Inspector
DefaultlegacyChart1
Examples
query1
button1

isHiddenOnDesktop

Whether to show or hide this object in the desktop layout.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Show on desktop
Defaultfalse
Examples
true

isHiddenOnMobile

Whether to show or hide this object in the mobile layout.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Show on mobile
Defaulttrue
Examples
true

maintainSpaceWhenHidden

Whether to take up space on the canvas if hidden is true.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Maintain space when hidden
Defaultfalse
Examples
true

margin

The amount of margin to render outside.

Type string
Format Plain Text
Configurability Inspector > Spacing > Margin
Allowed Values
ValueUI OptionDescription
4px 8pxNormal

Normal margin.

0None

No margin.

Default4px 8px
Examples
4px 8px

showInEditor

Whether the component remains visible in the editor if hidden is true.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Always show in edit mode
Defaultfalse
Examples
true

style

Custom style options.

Type object
Configurability Inspector > Appearance > style
Defaultnull

xAxisLabel

The label for the x-axis.

Type string
Configurability Inspector
Defaultnull

xValues

A list of x-axis values.

Type array
Array values string
Configurability Inspector
Defaultnull

xValuesType

The type of x-axis values.

Type string
Configurability Inspector
Allowed Values
ValueDescription
number

Number

string

String

Defaultnull

yAxisLabel

The label for the y-axis.

Type string
Configurability Inspector
Defaultnull

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
ClearA value is cleared.
SelectA value is selected.