HelixOverviewComponentsMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingCortexDocsEngramActiveTraceActiveRecallActiveServicesInsightsGet in touchSource on GitHub
Loading the reference
Spatial Scatter ChartView sourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA chart that plots each row as a point in three dimensions, for data with three measures.Also called 3D scatter chart, 3D scatter plot, Point cloud, and Three-dimensional scatter.ExperimentalSince 0.190.0ChartsImportimport'@fusion.dev/helix/spatial-scatter-chart'import'@fusion.dev/helix-headless/spatial-scatter-chart'Preview
GuidelinesWhen to use
Three measures for each row, such as customers by age, spend, and visits.Spatial Scatter ChartThis page
1::part(grid)The box's edges and its grid at the ticks, in the chart's own drawing.
2::part(point)One point of the chart's own drawing.
3::part(tick)A number at a tick, along its edge of the box, in the chart's own drawing.
4::part(axis-name)A measure's name, along its edge of the box, in the chart's own drawing.
API referenceRoothelix-spatial-scatter-chartA chart that plots each row as a point in three dimensions, for data with three measures.
PropTypeDescriptiondataChartDataThe readings as data, in the shape of a table, where the page has no
table to point for at. for wins where both are set.dropLinesbooleanDefaultfalseDraws a line from each point straight down to the floor of the box, in
its group's color, so where a point stands across and in depth reads off
the floor's grid. A renderer draws them too.emphasis"outlined"|"solid"|"subtle"How strongly the points are drawn, as on every chart.emptyTextstringDefault"No readings"The words shown in place of the drawing when the table has no readings,
and the fallback of the empty slot.errorTextstringDefault""The words shown in place of the drawing when the readings did not load,
such as "The visits did not load". Empty, the default, shows nothing.forstringDefault""The id of the table to read.groupBystringDefault""The column of text that puts each point in a group, by its heading. None by default.growbooleanDefaultfalseGrows the points in from the floor the first time the chart comes
into view with readings, one after another in the order of the table, so the drawing arrives the way a
page's own picture does. The growth is fast at first, slows to rest,
and never passes a reading.growAgainbooleanDefaultfalseGrows the points in again each time the chart comes back into view
after it left it, as a pane does when it is opened again, where grow
alone grows them the first time only. Only a chart that grows takes it.labelstringDefault""The chart's name, which starts the chart's text summary.loadingbooleanDefaultfalseWhether the readings are still on their way. The chart shows
loading-text in place of an empty drawing until it has readings.loadingTextstringDefault"Loading readings"The words shown in place of the drawing while loading is set and
there are no readings yet, and the fallback of the loading slot.localestringDefault""The locale the chart's own numbers are written in: its axis, its
percentages and its totals, such as de for 1.240 and 32 %.material"frosted"|"glass"How much of each mark comes through, as on every chart: glass admits the
most of what is behind it, frosted less, and absent is opaque. The
strength is the theme's, scaled by --helix-material-opacity.nextReadingsLabelstringDefault"Next readings"The name of the button that shows the next page of readings in the
table drawn from data, which holds a page at a time past
READINGS_PAGE.noBoxbooleanDefaultfalseDraws no box: no edges, grid, numbers, or names, so the readings stand
alone and fill the plot, as a picture on a product's own page does. The
table, the summary, the tooltip, and the keys still carry every value,
and a renderer draws no box either.plotLabelstringDefault"3D scatter chart"The plot's name where the chart has none: no aria-label, label, or table caption.positionLabelstringDefault"{position} of {count}"Where a reading the keys moved to stands among the readings, said after
it. {position} and {count} are replaced with the numbers, written in
locale.previousReadingsLabelstringDefault"Previous readings"The name of the button that shows the previous page of readings in the
table drawn from data.readingsLabelstringDefault"Readings {first} to {last} of {count}"Which readings the page of the table drawn from data holds, said
beside its buttons and as each page arrives. {first}, {last} and
{count} are replaced with the numbers, written in locale.separation"filled"|"plain"What the plot stands on. plain, the default, draws nothing behind it, as a
flat chart does, so a Card or the page is its ground. filled draws the
surface-filled ground every family takes. no-box is a separate choice:
it removes the box, grid, numbers, and names.sonifybooleanDefaultfalseDraws a Listen button that plays the chart as sound: each series in
turn, its readings from left to right and from the left ear to the
right, the value as pitch over two octaves, a soft tick at each
gridline, and one timbre a series. With it, each reading the arrow keys
step to plays its tone beside what the readout says, and L plays the
whole chart while it has focus. Escape stops it. Nothing plays without a
press, and the sound is made only then.sonifyDurationnumberDefault3000How long each series takes to play, in milliseconds or as 3s.sonifyLabelstringDefault"Listen"The Listen button's words.sonifyStopLabelstringDefault"Stop"The Listen button's words while the chart plays.summary"hidden"|"visible"visible draws the chart's text summary under it, as one line.
hidden, or absent, says the summary to a screen reader and draws it
for no one else. Reflected, because the stylesheet draws it by the
attribute, and a page that sets the property, as React does, writes none.summaryLabelstringDefault"{count, plural, one {# point} other {# points}}: {x} across, {y} up, and {z} in depth."The summary part's sentence. {count} is the number of points, written
in the locale, and {x}, {y}, and {z} are the three measures' names.
ReadTypeDescriptionactivenumberThe point the keys or the pointer rest on, as its place in field.points, or -1.fieldPlotFieldThe table read as points, axes, and groups. The first three numeric
columns are across, up, and in depth, and a row lacking any of them is
left out. A renderer reads it.namedstringThe chart's name: an aria-label written on the chart, then label,
then the table's caption.plottedColumnsnumber[]The positions of the cells in a row that hold numbers, in table order.readingsnumberThe number of readings, which the pointer position maps onto.seriesSeries[]The table's columns, one series each. Empty when there is no table.shownPlotFieldThe points as drawn this frame, which a renderer draws: field at rest,
and while the readings move, every point between its last place and its
new one, in field's order, then each point the last table had and the
new one does not, sinking to the floor.soundingbooleanWhether the chart is playing as sound now.whenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The renderer's box, which the 3D drawing is made in.emptyContent shown when the table has no points. Falls back to empty-text.errorContent shown after error-text while it is set and there are no readings, such as a button that tries again.loadingContent shown while loading is set and there are no points yet. Falls back to loading-text.
EventTypeDescriptionhelix-plot-changeHelixPlotChangeEventThe points or the point the keys rest on changed, or a frame of a move drew the points on their way, which the renderer is told. It stays on the chart.helix-plot-turnHelixPlotTurnEventShift with an arrow asked the view to turn, by a step across or up.helix-reading-changeHelixReadingChangeEventThe reading moved, or was put away: index is the row, or -1 for none, with its label and the pointerType that moved it.helix-reading-pressHelixReadingPressEventA point was clicked, tapped, or pressed with Enter or Space, with the same detail as helix-reading-change.
MethodTypeDescriptioncolumnName(cell: number) => stringThe heading of the column at this place in a row: a cell's name is its
column's heading, read from the first row that has a cell there, so a
short first row does not lose the heading. '' where no row has one.placeReading(at: { x: number; y: number } | undefined) => voidSays where the renderer draws the reading, as fractions of the plot from
its top left, or undefined while it draws none. The tooltip points
there. Called by the connector.playReadings() => Promise<void>Plays every shown series as sound, one after another, and resolves when it ends or is stopped.rendererDrawn(on: unknown) => voidSays whether a renderer has drawn the points, which hides the chart's
own drawing or shows it again. Called by the connector.requestActive(at: number, kind: "mouse" | "pen" | "touch") => voidPuts the reading on the point at index, or lets it go with -1, as a
pointer resting on it in the renderer's drawing or a press there does.
A touch keeps it until a tap lands elsewhere, and a mouse leaving a
reading the keys moved to leaves it. Called by the connector.seriesOf(cell: number) => number | undefinedThe palette slot for the cell at this position in a row.showsColumn(cell: number) => booleanWhether the series read from the cell at this place in a row is drawn,
by its column's heading. The keys and the readout pass over one a
legend hid.showsSeries(name: string) => booleanWhether the series of this name is drawn, which it is unless a legend
reading the same table hid it.stopReadings() => voidStops the sound.
PartDescriptionaxis-nameA measure's name, along its edge of the box, in the chart's own drawing.drawingThe chart's own drawing in SVG: the box, its grid and numbers, and the points.drop-lineThe line from a point straight down to the floor of the box, drawn under drop-lines, in its group's color.emptyThe words when the table has no points: the empty slot, falling back to empty-text.errorThe words while error-text is set and there are no readings, followed by the error slot. Announced as it appears.fallbackThe box the chart's own drawing fills, shown until a renderer has drawn and where none is connected. Hidden from screen readers.gridThe box's edges and its grid at the ticks, in the chart's own drawing.liveThe readout: a polite live region that says the point the keys moved to. Hide it visually.loadingThe words while loading is set and there are no points.markThe invisible point the tooltip is anchored to, where the renderer draws the reading.plotThe box the drawing fills, which takes focus to be read by key. It is named by the host's aria-labelledby or aria-label, then by label, then by the caption of the table.pointOne point of the chart's own drawing.point-activeThe point the pointer or the keys rest on, in the chart's own drawing. Set alongside point.ringThe ring around the point the pointer or the keys rest on, drawn over every point.sonifyThe button that plays the chart as sound, under sonify.summaryThe three measures and the number of points, written as a sentence for screen readers, which describes the plot. Hide it visually.tableThe readings as a table, for a screen reader, rendered only where they were drawn from data, a page of them at a time past a few hundred. Hide it visually.table-pagesWhich readings a page of the table holds, and the buttons that show the previous and the next page, rendered only while it holds a page. Hide it visually.tickA number at a tick, along its edge of the box, in the chart's own drawing.tooltip-anchorThe Tooltip element itself.tooltip-arrowThe bubble's point, forwarded from Tooltip.tooltip-arrow-bottomThe point while the bubble is below the reading, on its top edge. Set alongside tooltip-arrow.tooltip-arrow-leftThe point while the bubble is left of the reading, on its right edge. Set alongside tooltip-arrow.tooltip-arrow-rightThe point while the bubble is right of the reading, on its left edge. Set alongside tooltip-arrow.tooltip-arrow-topThe point while the bubble is above the reading, on its bottom edge. Set alongside tooltip-arrow.tooltip-cellOne column's name and value inside the tooltip.tooltip-cell-currentThe cell a chart's series keys rest on, which every chart's tooltip can mark. This chart marks none, since its readout says the measure. Set alongside tooltip-cell.tooltip-labelThe row's own name inside the tooltip.tooltip-nameA column's name inside the tooltip.tooltip-surfaceThe bubble, forwarded from Tooltip.tooltip-surface-bottomThe bubble while it is below the reading. Set alongside tooltip-surface.tooltip-surface-leftThe bubble while it is left of the reading. Set alongside tooltip-surface.tooltip-surface-rightThe bubble while it is right of the reading. Set alongside tooltip-surface.tooltip-surface-topThe bubble while it is above the reading. Set alongside tooltip-surface.tooltip-valueA column's value inside the tooltip.
CSS PropertyDescription--spatial-scatter-chart-block-sizeHow tall the plot is. By default, as tall as it is wide and 26em at most.--spatial-scatter-chart-move-durationHow long the points take to move to a new table's readings. Defaults to --helix-duration-normal. 0ms draws a new table at once.--spatial-scatter-chart-move-easingThe curve the points move to new readings along. Defaults to --helix-easing-decelerate, so a point slows as it arrives and never passes its reading.
Custom stateDescriptionactiveWhile a point is shown, under the pointer or the keys.drawnWhile a renderer has drawn the points, and the chart's own drawing is hidden.emptyWhile the empty part stands in place of the points.errorWhile the error part stands in place of the points.loadingWhile the loading part stands in place of the points.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Roothelix-headless-spatial-scatter-chartA chart that plots each row as a point in three dimensions, for data with three measures.
PropTypeDescriptiondataChartDataThe readings as data, in the shape of a table, where the page has no
table to point for at. for wins where both are set.dropLinesbooleanDefaultfalseDraws a line from each point straight down to the floor of the box, in
its group's color, so where a point stands across and in depth reads off
the floor's grid. A renderer draws them too.emptyTextstringDefault"No readings"The words shown in place of the drawing when the table has no readings,
and the fallback of the empty slot.errorTextstringDefault""The words shown in place of the drawing when the readings did not load,
such as "The visits did not load". Empty, the default, shows nothing.forstringDefault""The id of the table to read.groupBystringDefault""The column of text that puts each point in a group, by its heading. None by default.growbooleanDefaultfalseGrows the points in from the floor the first time the chart comes
into view with readings, one after another in the order of the table, so the drawing arrives the way a
page's own picture does. The growth is fast at first, slows to rest,
and never passes a reading.growAgainbooleanDefaultfalseGrows the points in again each time the chart comes back into view
after it left it, as a pane does when it is opened again, where grow
alone grows them the first time only. Only a chart that grows takes it.labelstringDefault""The chart's name, which starts the chart's text summary.loadingbooleanDefaultfalseWhether the readings are still on their way. The chart shows
loading-text in place of an empty drawing until it has readings.loadingTextstringDefault"Loading readings"The words shown in place of the drawing while loading is set and
there are no readings yet, and the fallback of the loading slot.localestringDefault""The locale the chart's own numbers are written in: its axis, its
percentages and its totals, such as de for 1.240 and 32 %.nextReadingsLabelstringDefault"Next readings"The name of the button that shows the next page of readings in the
table drawn from data, which holds a page at a time past
READINGS_PAGE.noBoxbooleanDefaultfalseDraws no box: no edges, grid, numbers, or names, so the readings stand
alone and fill the plot, as a picture on a product's own page does. The
table, the summary, the tooltip, and the keys still carry every value,
and a renderer draws no box either.plotLabelstringDefault"3D scatter chart"The plot's name where the chart has none: no aria-label, label, or table caption.positionLabelstringDefault"{position} of {count}"Where a reading the keys moved to stands among the readings, said after
it. {position} and {count} are replaced with the numbers, written in
locale.previousReadingsLabelstringDefault"Previous readings"The name of the button that shows the previous page of readings in the
table drawn from data.readingsLabelstringDefault"Readings {first} to {last} of {count}"Which readings the page of the table drawn from data holds, said
beside its buttons and as each page arrives. {first}, {last} and
{count} are replaced with the numbers, written in locale.sonifybooleanDefaultfalseDraws a Listen button that plays the chart as sound: each series in
turn, its readings from left to right and from the left ear to the
right, the value as pitch over two octaves, a soft tick at each
gridline, and one timbre a series. With it, each reading the arrow keys
step to plays its tone beside what the readout says, and L plays the
whole chart while it has focus. Escape stops it. Nothing plays without a
press, and the sound is made only then.sonifyDurationnumberDefault3000How long each series takes to play, in milliseconds or as 3s.sonifyLabelstringDefault"Listen"The Listen button's words.sonifyStopLabelstringDefault"Stop"The Listen button's words while the chart plays.summary"hidden"|"visible"visible draws the chart's text summary under it, as one line.
hidden, or absent, says the summary to a screen reader and draws it
for no one else. Reflected, because the stylesheet draws it by the
attribute, and a page that sets the property, as React does, writes none.summaryLabelstringDefault"{count, plural, one {# point} other {# points}}: {x} across, {y} up, and {z} in depth."The summary part's sentence. {count} is the number of points, written
in the locale, and {x}, {y}, and {z} are the three measures' names.
ReadTypeDescriptionactivenumberThe point the keys or the pointer rest on, as its place in field.points, or -1.fieldPlotFieldThe table read as points, axes, and groups. The first three numeric
columns are across, up, and in depth, and a row lacking any of them is
left out. A renderer reads it.namedstringThe chart's name: an aria-label written on the chart, then label,
then the table's caption.plottedColumnsnumber[]The positions of the cells in a row that hold numbers, in table order.readingsnumberThe number of points, which the keys walk.seriesSeries[]The table's columns, one series each. Empty when there is no table.shownPlotFieldThe points as drawn this frame, which a renderer draws: field at rest,
and while the readings move, every point between its last place and its
new one, in field's order, then each point the last table had and the
new one does not, sinking to the floor.soundingbooleanWhether the chart is playing as sound now.whenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The renderer's box, which the 3D drawing is made in.emptyContent shown when the table has no points. Falls back to empty-text.errorContent shown after error-text while it is set and there are no readings, such as a button that tries again.loadingContent shown while loading is set and there are no points yet. Falls back to loading-text.
EventTypeDescriptionhelix-plot-changeHelixPlotChangeEventThe points or the point the keys rest on changed, or a frame of a move drew the points on their way, which the renderer is told. It stays on the chart.helix-plot-turnHelixPlotTurnEventShift with an arrow asked the view to turn, by a step across or up.helix-reading-changeHelixReadingChangeEventThe reading moved, or was put away: index is the row, or -1 for none, with its label and the pointerType that moved it.helix-reading-pressHelixReadingPressEventA point was clicked, tapped, or pressed with Enter or Space, with the same detail as helix-reading-change.
MethodTypeDescriptioncolumnName(cell: number) => stringThe heading of the column at this place in a row: a cell's name is its
column's heading, read from the first row that has a cell there, so a
short first row does not lose the heading. '' where no row has one.placeReading(at: { x: number; y: number } | undefined) => voidSays where the renderer draws the reading, as fractions of the plot from
its top left, or undefined while it draws none. The tooltip points
there. Called by the connector.playReadings() => Promise<void>Plays every shown series as sound, one after another, and resolves when it ends or is stopped.rendererDrawn(on: unknown) => voidSays whether a renderer has drawn the points, which hides the chart's
own drawing or shows it again. Called by the connector.requestActive(at: number, kind: "mouse" | "pen" | "touch") => voidPuts the reading on the point at index, or lets it go with -1, as a
pointer resting on it in the renderer's drawing or a press there does.
A touch keeps it until a tap lands elsewhere, and a mouse leaving a
reading the keys moved to leaves it. Called by the connector.seriesOf(cell: number) => number | undefinedThe palette slot for the cell at this position in a row.showsColumn(cell: number) => booleanWhether the series read from the cell at this place in a row is drawn,
by its column's heading. The keys and the readout pass over one a
legend hid.showsSeries(name: string) => booleanWhether the series of this name is drawn, which it is unless a legend
reading the same table hid it.stopReadings() => voidStops the sound.
PartDescriptionaxis-nameA measure's name, along its edge of the box, in the chart's own drawing.drawingThe chart's own drawing in SVG: the box, its grid and numbers, and the points.drop-lineThe line from a point straight down to the floor of the box, drawn under drop-lines, in its group's color.emptyThe words when the table has no points: the empty slot, falling back to empty-text.errorThe words while error-text is set and there are no readings, followed by the error slot. Announced as it appears.fallbackThe box the chart's own drawing fills, shown until a renderer has drawn and where none is connected. Hidden from screen readers.gridThe box's edges and its grid at the ticks, in the chart's own drawing.liveThe readout: a polite live region that says the point the keys moved to. Hide it visually.loadingThe words while loading is set and there are no points.markThe invisible point the tooltip is anchored to, where the renderer draws the reading.plotThe box the drawing fills, which takes focus to be read by key. It is named by the host's aria-labelledby or aria-label, then by label, then by the caption of the table.pointOne point of the chart's own drawing.point-activeThe point the pointer or the keys rest on, in the chart's own drawing. Set alongside point.ringThe ring around the point the pointer or the keys rest on, drawn over every point.sonifyThe button that plays the chart as sound, under sonify.summaryThe three measures and the number of points, written as a sentence for screen readers, which describes the plot. Hide it visually.tableThe readings as a table, for a screen reader, rendered only where they were drawn from data, a page of them at a time past a few hundred. Hide it visually.table-pagesWhich readings a page of the table holds, and the buttons that show the previous and the next page, rendered only while it holds a page. Hide it visually.tickA number at a tick, along its edge of the box, in the chart's own drawing.tooltip-anchorThe Tooltip element itself.tooltip-arrowThe bubble's point, forwarded from Tooltip.tooltip-arrow-bottomThe point while the bubble is below the reading, on its top edge. Set alongside tooltip-arrow.tooltip-arrow-leftThe point while the bubble is left of the reading, on its right edge. Set alongside tooltip-arrow.tooltip-arrow-rightThe point while the bubble is right of the reading, on its left edge. Set alongside tooltip-arrow.tooltip-arrow-topThe point while the bubble is above the reading, on its bottom edge. Set alongside tooltip-arrow.tooltip-cellOne column's name and value inside the tooltip.tooltip-cell-currentThe cell a chart's series keys rest on, which every chart's tooltip can mark. This chart marks none, since its readout says the measure. Set alongside tooltip-cell.tooltip-labelThe row's own name inside the tooltip.tooltip-nameA column's name inside the tooltip.tooltip-surfaceThe bubble, forwarded from Tooltip.tooltip-surface-bottomThe bubble while it is below the reading. Set alongside tooltip-surface.tooltip-surface-leftThe bubble while it is left of the reading. Set alongside tooltip-surface.tooltip-surface-rightThe bubble while it is right of the reading. Set alongside tooltip-surface.tooltip-surface-topThe bubble while it is above the reading. Set alongside tooltip-surface.tooltip-valueA column's value inside the tooltip.
CSS PropertyDescription--spatial-scatter-chart-move-durationHow long the points take to move to a new table's readings: a point the table keeps moves to its new place, a point it adds rises from the floor, and a point it drops sinks to the floor. Unset, a new table is drawn at once. The growth under grow keeps its own timing.--spatial-scatter-chart-move-easingThe curve the points move to new readings along.
Custom stateDescriptionactiveWhile a point is shown, under the pointer or the keys.drawnWhile a renderer has drawn the points, and the chart's own drawing is hidden.emptyWhile the empty part stands in place of the points.errorWhile the error part stands in place of the points.loadingWhile the loading part stands in place of the points.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Examples
NameDescriptionEmphasisNine customers in three segments at each emphasis: solid dots, rings over faded dots, and rings over faint dots.MaterialNine customers in three segments at each material: opaque, frosted, and glass, over a panel.PreviewForty-five customers by age, yearly spend, and visits a month, drawn in 3D in SVG. Press Shift with an arrow to turn the box.PreviewForty-five customers by age, yearly spend, and visits a month, drawn in 3D in SVG. Press Shift with an arrow to turn the box.SeparationNine customers in three segments with the plain separation and on the filled ground.StatesA chart while its table loads, and a chart whose table has no readings.Taking new dataPoints that rise in from the floor the first time they are seen, and move to their new places when the table changes.ThreeThe same customers drawn in 3D by three.js. Drag to turn the box, or press Shift with an arrow.With drop linesThe same customers with a line from each point down to the floor, so where each stands across and in depth reads off the grid.Without a boxCustomers as three soft clusters with no box, grid, or names around them, for a landing page. The tooltip and the table still carry every value.