Skip to main content

The Chart component for Retool Apps

A content area to display charts.

Chart renders Plotly-powered bar, line, pie, and scatter charts. It supports dataset grouping and styles, layout customization, and aggregation methods like sum, average, and standard deviation.

Refer to the charts guide for more information on building charts.

Settings

Chart includes the following configurable options when building apps in the IDE.

Chart typeDataData sourceShow on desktopShow on mobileMaintain space when hiddenMarginAlways show in edit modeStylesX-axis tickX-axis titleY-axis tickY-axis title

Properties

All properties for Chart with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

The type of chart to display.

Values
bar

Bar chart.

line

Line chart.

pie

Pie chart.

scatter

Scatter chart.

data

object[]

The source data when using Plotly JSON.

The source data when using UI Form.

boolean

Whether the component is visible.

id

string

The unique identifier.

Whether the component is visible in the desktop layout.

Whether the component is visible in the mobile layout.

Whether the component takes up space on the canvas if hidden is true.

The amount of margin to render outside.

Values
4px 8px

Normal margin.

0

No margin.

pluginType

string

The plugin type.

Whether to remain visible in the editor if hidden is true.

style

object

Custom style options in use. Not all style options may be available for all components.

title

string

The text to display as a title.

The x-axis tick labels.

The x-axis title.

The y-axis tick labels.

The y-axis title.

Events

Events are triggered by user interactions, such as clicking a button or entering a value. Use event handlers to trigger queries or other actions in response to events.

clear

The value is cleared.

select

A value is selected.