Scatter Chart

A scatter chart is a chart that displays the relationship between two variables. By representing each data point as a point on the chart, a scatter chart can show the correlation or distribution trend between two variables (typically numeric variables). The horizontal and vertical position of each point is determined by the two numeric variables of the data point, with the X-axis and Y-axis representing the two variables respectively.

Use Cases

  • Discover relationships or trends between two variables, such as correlation strength.
  • Display data distribution patterns and detect outliers.
  • When the number of data points is large, scatter charts can effectively present the overall distribution.

Visual Examples

Height-Weight Relationship Analysis: Distribution of Height vs Weight Correlation

Age-Income Relationship Analysis: Positive Correlation between Age and Income

Car Horsepower vs Fuel Consumption by Origin, Custom Colors

Options

Configuration Options

PropertyTypeRequiredDescription
typestringrequiredValue must be "scatter".
dataObject[]requiredChart data.
data.xnumberrequiredNumeric variable on the X-axis.
data.ynumberrequiredNumeric variable on the Y-axis.
data.groupstringoptionalGroup name.
titlestringoptionalChart title.
axisXTitlestringoptionalX-axis title.
axisYTitlestringoptionalY-axis title.
theme'default' | 'dark' | 'academy'optionalChart theme, default is "default".
styleObjectoptionalChart style.
style.backgroundColorstringoptionalMust be a valid color value.
style.palettestring[]optionalMust be an array of valid color values.