RechartsStatistical

Scatter with Regression

Scatterplot with OLS regression line and confidence bands. Includes R-squared display.

Preview placeholder

scatter-regression-v1

Installation

Terminal
npx @ontopic/viz add recharts/generic/scatter-regression-v1

Props

PropTypeDescription
dataScatterData[]X-Y coordinate pairs
showRegressionbooleanShow regression line
showCIbooleanShow confidence bands

See full TypeScript interface on GitHub for all props.

Usage Example

TypeScript
import { ScatterRegression } from '@/viz/components/recharts/generic/scatter-regression-v1';