JavaScript 3D Scatter Chart - Editor

Also known as a Scatter Graph, Scatter Series, Point Graph, Scatter diagram or Scattergram

This example shows a simple 3D Point Graph with points drawn using 3D PointSeries for a visual representation of the data points 'markers'. The point graph is a type of chart or mathematical diagram drawn on a Cartesian coordinate system and represents the relationship between two variables.

This type of series does not contain the visual representation of lines for the connection of data points but only data 'markers'.

The chart can be created with few simple lines of code:

// Create a new ChartXY.
const chart3D = lightningChart().Chart3D()

// Add a line series using default X, Y and Z axes.
const series = chart3D.addPointSeries()

The series accepts points in format { x: number, y: number, z:number }. Any number of points can be added with a single call.

// Single point.
series.add({ x: 50, y: 60, z: 40 })

// Multiple points at once.
series.add([
    { x: 55, y: 60, z: 40 },
    { x: 60, y: 62, z: 40 },
    { x: 65, y: 65, z: 50 },
])