Scatter Chart 3D

Points in a box, colored by series.

-1001020304050-1001020304050-1001020304050-100102030405001020304050010203040500102030405001020304050010203040010203040010203040010203040
Cluster A
Cluster B
Cluster C

Installation

npx shadcn@latest add niekes/chart3dcn/scatter-chart-3d#v1.2.0

Update

Press Update: the points glide to their new positions over the animationDuration of the container, and the axes scale along.

-100102030405060-100102030405060-100102030405060-10010203040506010203040506010203040506010203040506010203040506001020304050010203040500102030405001020304050
Cluster A
Cluster B
Cluster C

Enter and leave

With an id field, a point follows its name through updates: a new one grows out of nothing at its place as it fades in, a gone one shrinks and fades away where it stands - the mirror of its entering - and one that moves glides (see Enter in the glossary). Without an id, points are named by their position in data, which animates appending and removing at the end. An entry whose x, y or z is missing or not a number has no point, as if it were not in data.

05101520051015200510152005101520101214161820221012141618202210121416182022101214161820221015202530101520253010152025301015202530
Cluster A
Cluster B

Renderers

The same chart on every renderer, side by side. The marks are data the chart hands to the container, and "svg" and "canvas" draw them all - where the browser has no canvas, as SVG.

-1001020304050-1001020304050-1001020304050-100102030405001020304050010203040500102030405001020304050010203040010203040010203040010203040
SVG
-1001020304050-1001020304050-1001020304050-100102030405001020304050010203040500102030405001020304050010203040010203040010203040010203040
Canvas

Many marks

Five thousand points - and the chart stays interactive. The scene is one list of marks, so the demo starts on "canvas", the renderer for many marks, and the select shows the same scene on SVG.

020406080100020406080100020406080100020406080100304050607080304050607080304050607080304050607080020406080100020406080100020406080100020406080100

API Reference

Prop

Type

Edit on GitHub

On this page