data | array | Yes | — | Array of data objects. Each object should contain numeric fields for plotting and optionally a categorical field for coloring. |
fields | string[] | Yes | — | Array of field names (keys in each data object) to include in the matrix. Determines which numeric dimensions are plotted. |
fieldLabels | Record<string, string> | — | {} | Optional mapping from field names to display labels. Used in diagonal cells and axis labels. |
colorBy | string | function | — | — | Field name or accessor function to determine point color. When set, each unique value gets a distinct color. |
colorScheme | string | string[] | — | "category10" | Color scheme name (e.g. "category10", "tableau10") or array of color strings. |
cellSize | number | — | 150 | Size of each cell in the matrix (width and height in pixels). |
cellGap | number | — | 4 | Gap between cells in pixels. |
pointRadius | number | — | 2 | Radius of each point in pixels. |
pointOpacity | number | — | 0.5 | Default opacity for data points. |
diagonal | "histogram" | "density" | "label" | — | "histogram" | What to display on the diagonal cells. "histogram" shows a distribution histogram, "density" shows a density curve, "label" shows just the field name. |
histogramBins | number | — | 20 | Number of bins for diagonal histograms. |
brushMode | "crossfilter" | "intersect" | false | — | "crossfilter" | Brush interaction mode. "crossfilter" excludes the brushed cell from its own filter. "intersect" requires matching all brushed regions. false disables brushing. |
hoverMode | boolean | — | true | When true, hovering a point in one cell cross-highlights the same datum in every other cell. |
unselectedOpacity | number | — | 0.1 | Opacity applied to points that do not match the current brush or hover selection. |
showGrid | boolean | — | false | Show grid lines inside each scatterplot cell. |
tooltip | object | function | — | — | Tooltip configuration or render function passed to each cell. |
showLegend | boolean | — | true (when colorBy) | Show a color legend above the matrix. Defaults to true when colorBy is set. |
idAccessor | string | function | — | — | Field name or accessor to identify each row in tooltips. Defaults to "Row {index}". |
onClick | function | — | — | Called when a point in any cell is clicked. Receives the clicked row datum and its grid-relative pixel position { x, y }. Fires in hover mode (the default); in brush mode the drag-select overlay captures pointer events, so clicks are not delivered. |
onObservation | function | — | — | Called with { type, datum, x, y, ... } on hover, hover-end, and click. x/y are grid-relative pixels (the same space as onClick) so a coordinated-view handler can position UI consistently across event types. Use to drive coordinated views from matrix interactions. |
width | number | — | — | Overall width constraint. If not specified, the matrix sizes itself based on cellSize and field count. |
height | number | — | — | Overall height constraint. If not specified, the matrix sizes itself based on cellSize and field count. |
className | string | — | — | CSS class name applied to the outermost container. |