JavaScript 3D Confidence Ellipsoid Chart

Example showcasing the 3D variant of a common statistical data visualization method: confidence ellipses.

Confidence ellipses are used especially with statistic chart applications. A common usage, for example, is the 95% confidence ellipse, which visualizes the area that contains 95% of samples, which makes it easier for the user to understand which points are outliers.

The same can be done in more complex 3D scatter data set visualizations, in which case the ellipse becomes an ellipsoid.

Programmatically, this can be implemented by drawing the ellipsoid as a sphere with different sizes along the X, Y and Z axes.

const ellipsoidSeries = chart3D
    .addPointSeries()
    // Specify ellipsoid center coordinate.
    .add({ x: 0, y: 0, z: 0 })
    .setPointStyle(
        new PointStyle3D.Triangulated({
            // Specify ellipsoid dimensions.
            size: { x: 1, y: 2, z: 1.5 },
        }),
    )