Docs
๐Ÿ“Š โ Charts
Scatter Plot

Scatter Plot

A Scatter Plot in REAVIZ is a type of mathematical diagram using Cartesian coordinates to display values for two variables in a dataset. Each data point is represented as a dot, where the horizontal axis represents one variable and the vertical axis represents another.

Types supported by reaviz:

  • Scatter - Displays individual data points in a Cartesian coordinate system.
  • Bubble - Similar to scatter, but with points sized according to a third data dimension.

Where to use:

  • Show Relationships: Ideal for visualizing relationships between two variables.
  • Identify Patterns: Useful for identifying patterns, trends, and correlations in data.
  • Highlight Outliers: Great for spotting outliers and anomalies in data.

Quick Start

To create a Bar chart, use import the ScatterPlot and give it data. The chart will automatically configure itself with the default options exposed via props.

Examples

Scatter

Bubble

API

ScatterPlot (opens in a new tab)

PropDescriptionDefault
dataData the chart will receive to render.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>[]
[]
seriesThe series component that renders the scatter components.
ReactElement<ScatterSeriesProps, FC<Partial<ScatterSeriesProps>>>
<ScatterSeries />
yAxisThe linear axis component for the Y Axis of the chart.
ReactElement<LinearAxisProps, FC<Partial<LinearAxisProps>>>
<LinearYAxis type="value" />
xAxisThe linear axis component for the X Axis of the chart.
ReactElement<LinearAxisProps, FC<Partial<LinearAxisProps>>>
<LinearXAxis type="time" />
gridlinesThe chart's background gridlines component.
ReactElement<GridlineSeriesProps, FC<Partial<GridlineSeriesProps>>>
<GridlineSeries />
brushThe chart's brush component.
ReactElement<ChartBrushProps, FC<Partial<ChartBrushProps>>>
null
zoomPanThe chart's zoom pan component.
ReactElement<ChartZoomPanProps, FC<Partial<ChartZoomPanProps>>>
null
secondaryAxisAny secondary axis components. Useful for multi-axis charts.
ReactElement<LinearAxisProps, FC<Partial<LinearAxisProps>>>[]
idId of the chart.
string
widthWidth of the chart. If not provided will autosize.
number
heightHeight of the chart. If not provided will autosize.
number
marginsMargins for the chart.
Margins
classNameClassnames for the chart.
string
containerClassNameClassnames for the chart.
string
styleAdditional css styles.
StyleHTMLAttributes<SVGSVGElement>
centerCenter the chart. Used mainly internally.
boolean
centerXCenter chart on X Axis only. Used mainly internally.
boolean
centerYCenter chart on Y Axis only. Used mainly internally.
boolean

ScatterSeries (opens in a new tab)

PropDescriptionDefault
pointPoint that is rendered.
ReactElement<ScatterPointProps, FC<Partial<ScatterPointProps>>>
<ScatterPoint />
xScaleD3 scale for X Axis. Set internally by `ScatterPlot`.
any
yScaleD3 scale for Y Axis. Set internally by `ScatterPlot`.
any
dataParsed data shape. Set internally by `ScatterPlot`.
ChartInternalShallowDataShape[]
idId set internally by `ScatterPlot`.
string
heightHeight of the chart. Set internally by `ScatterPlot`.
number
widthWidth of the chart. Set internally by `ScatterPlot`.
number
isZoomedWhether the chart has been zoomed or not. Set internally by `ScatterPlot`.
boolean
animatedWhether to animate the enter/update/exit.
boolean
activeIdsActive element ids to highlight.
string[]
valueMarkersValue markers line for the chart.
ReactElement<LinearValueMarkerProps, FC<LinearValueMarkerProps>>[]

ScatterPoint (opens in a new tab)

PropDescriptionDefault
activeWhether the element is active or not. Set internally by `ScatterSeries`.
boolean
true
sizeSize of the circle element.
number | ((data: ChartInternalShallowDataShape) => number)
4
colorColor of the circle.
ColorSchemeType
schemes.cybertron[0]
cursorCursor for the element.
string
pointer
xScaleD3 scale for X Axis. Set internally by `ScatterPlot`.
any
yScaleD3 scale for Y Axis. Set internally by `ScatterPlot`.
any
heightHeight of the chart. Set internally by `ScatterPlot`.
number
animatedWhether to animate the enter/update/exit. Set internally by `ScatterSeries`.
boolean
true
indexIndex of the element in the series. Set internally by `ScatterSeries`.
number
tooltipTooltip element.
ReactElement<ChartTooltipProps, FC<Partial<ChartTooltipProps>>>
<ChartTooltip />
dataParsed data shape. Set internally by `ScatterPlot`.
ChartInternalShallowDataShape
idId set internally by `ScatterPlot`.
string
glowGlow styling for the point.
Glow
symbolSymbol element to render.
(data: ChartInternalShallowDataShape) => ReactNode
visibleWhether the elment is visiblbe or not.
(data: ChartInternalShallowDataShape, index: number) => boolean
onClickEvent for when a symbol is clicked.
(data: ChartInternalShallowDataShape) => void
() => undefined
onMouseEnterEvent for when the symbol has mouse enter.
(data: ChartInternalShallowDataShape) => void
() => undefined
onMouseLeaveEvent for when the symbol has mouse leave.
(data: ChartInternalShallowDataShape) => void
() => undefined
classNameClassnames to apply to the element.
any
styleCSS styles to apply to the element.
any