Skip to main content

The Chart web component

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 modeStyles

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 or Stacked Bar Chart.

bubble

Bubble Chart.

funnel

Funnel Chart.

heatmap

Heat Map.

line

Line Chart or Sparkline.

mixed

Mixed Chart.

pie

Pie Chart.

plotlyJson

Plotly JSON Chart.

sankey

Sankey Chart.

scatter

Scatter Chart.

line

Sparkline.

sunburst

Sunburst Chart.

treemap

Treemap.

waterfall

Waterfall Chart.


data

object[]

The source data when using Plotly JSON.


The data source.


global

boolean

Whether the object is globally scoped for use in all app pages.


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.


xAxisTickFormat


xAxisTitle


yAxisTickFormat


yAxisTitle


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.