Skip to content

Chord Diagram

Flows between groups around a circle. Each group is an arc sized by what it sends, ringed by a fine instrument scale of ticks; chords join every pair, shaded along the grey ladder from the source's tone to the target's.

$149 once · every Pro piece

Customize

On mount the ring sweeps in clockwise and the chords rise after it. Hover a group and only its chords stay while the rest fall to a tenth; hover a chord and that one flow runs hot, with both directions in the panel. The legend is linked both ways: a click folds a group away and the whole layout re-flows from a tweened matrix. Tab in and use the arrow keys to step through the groups.

Install

npx shadcn@latest add @obsyde/chord-diagram

Needs your licence key · Get Pro

Usage

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

import { ChordDiagram } from '@/components/obsyde/ember/chord-diagram/ChordDiagram';

export function Example() {
  return (
    <ChordDiagram groups={5} />
  );
}

Files

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

  • ember/chord-diagram/ChordDiagram.tsxcomponent
  • ember/chord-diagram/chord-diagram.cssstyles
  • ember/chord-diagram/ChordDiagramDemo.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/shape.tsshared
  • ember/viz-kit/Legend.tsxshared
  • ember/viz-kit/demo.tsxshared
  • ember/viz-kit/demo.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
groupsGroupsnumber5
gapGapnumber6
ticksTick ringbooleantrue
chordsChord fill'gradient' | 'source''gradient'
selfFlowFlow within groupsbooleanfalse
legendLegend'row' | 'none''row'
tooltipTooltip'panel' | 'none''panel'
statusStatus'ready' | 'loading' | 'empty''ready'
seedSeednumber8