Skip to main content

Scatter Chart

Rocket 2.0

The Scatter Chart component plots each row as a point by two numbers, to show how they relate, such as marketing spend against revenue per account. With a size field it becomes a bubble chart.

Properties​

Property
Description
Expected Value
DataRows to plot, one point per row. Rows without both numbers are left out.Array
X fieldField that sets each point's position across.Text. Default: spend
Y fieldField that sets each point's position up and down.Text. Default: revenue
Size field (bubbles)Field that sets the size of each point, turning the chart into a bubble chart. Leave empty for points of equal size.Text. Default: seats
Group field (one colour each)Field that splits the points into groups, each with its own color and legend entry.Text. Default: segment
Name field (tooltip title)Field shown as the title of a point's tooltip.Text. Default: account
X axis titleTitle shown under the horizontal axis.Text. Default: Marketing spend ($k)
Y axis titleTitle shown beside the vertical axis.Text. Default: Revenue ($k)
X formatHow numbers on the horizontal axis are written.number, currency, percent, compact. Default: number
Y formatHow numbers on the vertical axis are written.number, currency, percent, compact. Default: number
Currency codeCurrency code used when an axis format is currency, such as USD or EUR.Text. Default: USD
LocaleLocale used to format numbers and currency, such as en-US. Leave empty to follow the currency.Text
Vertical line at xDraws a dashed vertical line at this x value, such as a target or an average.Text
Horizontal line at yDraws a dashed horizontal line at this y value, such as a target or an average.Text
Point size (px)Size of the points in pixels. With Size field set, it scales the range of bubble sizes.Number. Default: 6
Fill opacity (0 to 1)How solid the points are, from 0 to 1. Leave empty for 0.6 on bubbles and 0.85 on points.Text
Value prefixText shown before y values, such as $.Text
Value suffixText shown after y values, such as %.Text
Empty messageMessage shown when there is no data to plot.Text. Default: No data
AnimateAnimates the points when the chart first draws or its data changes.On or off. Default: On
GridShows background grid lines.On or off. Default: On
LegendShows a legend that names each group and its color.On or off. Default: On
Series colors (in order)Colors for the groups, used in order. Leave empty to use the theme's chart colors.Array
Highlight clicked pointKeeps the clicked point highlighted and dims the others until another is clicked or Clear clicked point runs.On or off. Default: Off
Loading lookWhat shows while the chart is loading: a spinner or a skeleton block.Spinner, Skeleton. Default: Spinner

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On clickTriggers when the user clicks a point.
On double clickTriggers when the user double-clicks the chart.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Clear clicked pointClears the clicked point and its highlight.components.scatterchart1.clearClickedPoint()
Set visibilityShows the component when true, hides it when false.components.scatterchart1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.scatterchart1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.scatterchart1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
dataRows to plot, one point per row. Rows without both numbers are left out.{{components.scatterchart1.data}}
xFieldField that sets each point's position across.{{components.scatterchart1.xField}}
yFieldField that sets each point's position up and down.{{components.scatterchart1.yField}}
sizeFieldField that sets the size of each point, turning the chart into a bubble chart. Leave empty for points of equal size.{{components.scatterchart1.sizeField}}
groupFieldField that splits the points into groups, each with its own color and legend entry.{{components.scatterchart1.groupField}}
nameFieldField shown as the title of a point's tooltip.{{components.scatterchart1.nameField}}
xLabelTitle shown under the horizontal axis.{{components.scatterchart1.xLabel}}
yLabelTitle shown beside the vertical axis.{{components.scatterchart1.yLabel}}
xAxisFormatHow numbers on the horizontal axis are written.{{components.scatterchart1.xAxisFormat}}
yAxisFormatHow numbers on the vertical axis are written.{{components.scatterchart1.yAxisFormat}}
currencyCurrency code used when an axis format is currency, such as USD or EUR.{{components.scatterchart1.currency}}
localeLocale used to format numbers and currency, such as en-US. Leave empty to follow the currency.{{components.scatterchart1.locale}}
referenceXDraws a dashed vertical line at this x value, such as a target or an average.{{components.scatterchart1.referenceX}}
referenceYDraws a dashed horizontal line at this y value, such as a target or an average.{{components.scatterchart1.referenceY}}
pointSizeSize of the points in pixels. With Size field set, it scales the range of bubble sizes.{{components.scatterchart1.pointSize}}
fillOpacityHow solid the points are, from 0 to 1. Leave empty for 0.6 on bubbles and 0.85 on points.{{components.scatterchart1.fillOpacity}}
valuePrefixText shown before y values, such as $.{{components.scatterchart1.valuePrefix}}
valueSuffixText shown after y values, such as %.{{components.scatterchart1.valueSuffix}}
emptyTextMessage shown when there is no data to plot.{{components.scatterchart1.emptyText}}
animateAnimates the points when the chart first draws or its data changes.{{components.scatterchart1.animate}}
showGridShows background grid lines.{{components.scatterchart1.showGrid}}
showLegendShows a legend that names each group and its color.{{components.scatterchart1.showLegend}}
colorsColors for the groups, used in order. Leave empty to use the theme's chart colors.{{components.scatterchart1.colors}}
highlightClickedKeeps the clicked point highlighted and dims the others until another is clicked or Clear clicked point runs.{{components.scatterchart1.highlightClicked}}
loadingIndicatorWhat shows while the chart is loading: a spinner or a skeleton block.{{components.scatterchart1.loadingIndicator}}
clickedDataPointThe data row of the point the user clicked last.{{components.scatterchart1.clickedDataPoint}}
isVisibleWhether the component is visible.{{components.scatterchart1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.scatterchart1.isLoading}}
isDisabledWhether the component is disabled.{{components.scatterchart1.isDisabled}}

Styles​

Style
Default
Chart color (series palette from it)Theme: Brand primary
Grid line colorTheme: Default border
Axis label colorTheme: Placeholder text
Legend text colorTheme: Placeholder text
Reference line colorTheme: Placeholder text
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.