PointChart
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.
Usage Example
Props
marks: Array<object> (required)
Defines the set of points to render. Each point must include:
-
x: numberThe X-axis coordinate. -
y: numberThe 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.
Full Example
The above example plots five points on a chart, creating a simple scatter plot.
Use Cases
PointChart is suitable for:
- Plotting relationships between two continuous variables
- Displaying experimental measurements, coordinates, or trends
- Creating simple scatter plots with optional visual annotations
