Skip to main content

Scatter chart

Point clouds.

Scatter chart in the example app

Screenshot from the example app. Run it to try every option live.

Usage​

import { ScatterChart } from 'react-native-skia-chart';

<ScatterChart width={w} height={220} data={points} radius={3} />

Props​

PropTypeDefaultNotes
data{ x, y }[]—
colorstring'#0984E3'
radiusnumber4
opacitynumber0.85
showGridbooleantrue
formatY(v) => string—

All charts also accept the shared props: width, height, padding, style, backgroundColor, animation, font, effects and gradient.

Gradient​

<ScatterChart {...props} gradient={{ type: 'radial', colors: ['#00D2D3', '#7C5CFF'], center: [0.5, 0.5], radius: 1 }} />

GPU notes​

Points are batched into a single path, so thousands of dots stay at 60/120 fps.