The PointChart component renders a basic 2D scatter plot, plotting individual points on an X-Y coordinate system. Each point is defined by a pair of numeric values and can be customized using standard mark styling properties.
This chart is ideal for visualizing correlations, distributions, or individual measurements across two continuous dimensions.
marks: Array<object> (required)Defines the set of points to render. Each point must include:
x: number
The X-axis coordinate.
y: number
The Y-axis coordinate.
You may also use additional ChartMarkProps to customize the appearance of each point:
symbol – the shape of the plotted point (e.g., circle, square)foregroundStyle – sets the color of the pointsymbolSize – adjusts the size of each pointopacity, annotation, offset, zIndex, etc.The above example plots five points on a chart, creating a simple scatter plot.
PointChart is suitable for: