Skip to content

Correlation Matrix

Every pair of variables as a cell on a diverging scale: cool grey for negative, near-black at zero and bone for positive, with only the strongest pair in the accent (the heat ramp for positives is opt-in).

$149 once · every Pro piece

Customize

The diagonal is hatched, since a variable against itself says nothing. Hover a cell, or Tab in and walk it with the arrow keys: the cell lifts on a spring, its row and column stay lit while everything else steps back, the names brighten and a caret marks its value on the gradient scale. Switch to clustered order (average linkage on 1 − r) and the cells spring into blocks of related variables. Optional values inside the cells and a lower-triangle layout with names on the diagonal.

Install

npx shadcn@latest add @obsyde/correlation-matrix

Needs your licence key · Get Pro

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { CorrelationMatrix } from '@/components/obsyde/ember/correlation-matrix/CorrelationMatrix';

export function Example() {
  return (
    <CorrelationMatrix variables={10} order="original" />
  );
}

Files

What you get with Pro: plain React, TypeScript and CSS, with no dependencies.

  • ember/correlation-matrix/CorrelationMatrix.tsxcomponent
  • ember/correlation-matrix/correlation-matrix.cssstyles
  • ember/correlation-matrix/CorrelationMatrixDemo.tsxdemo
  • ember/viz-kit/viz-kit.cssshared
  • ember/viz-kit/Tooltip.tsxshared
  • ember/viz-kit/focus.tsshared
  • ember/viz-kit/patterns.tsxshared
  • ember/viz-kit/roll.tsshared
  • ember/shared/rolling-number.cssshared
  • ember/shared/spring.tsshared
  • ember/shared/accent.tsshared
  • ember/viz-kit/scale.tsshared
  • ember/viz-kit/motion.tsshared
  • ember/viz-kit/chart.tsxshared
  • ember/shared/ember.cssshared
  • ember/viz-kit/touch.tsshared
  • ember/viz-kit/keyboard.tsshared
  • ember/viz-kit/size.tsshared
  • ember/viz-kit/state-messages.tsxshared
  • ember/viz-kit/stage.tsxshared
  • ember/viz-kit/stage.cssshared
  • ember/viz-kit/Legend.tsxshared
  • ember/viz-kit/demo.tsxshared
  • ember/viz-kit/demo.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
variablesVariablesnumber10
orderOrder'original' | 'clustered''original'
triangleTriangle'full' | 'lower''full'
cellMaxMax cellnumber46
palettePalette'mono' | 'heat''mono'
legendLegend'gradient' | 'none''gradient'
tooltipTooltip'panel' | 'none''panel'
statusStatus'ready' | 'loading' | 'empty''ready'
valueLabelsValue labelsbooleanfalse
seedSeednumber9