Skip to content

Documentation / @ripl/charts / createChordChart

Function: createChordChart() ​

createChordChart(target, options): ChordChart

Defined in: charts/src/charts/chord.ts:599

Factory function that creates a new ChordChart instance.

Parameters ​

ParameterType
targetstring | HTMLElement | Context<Element, Record<string, unknown>>
optionsChordChartOptions

Returns ​

ChordChart

Example ​

ts
createChordChart(target, {
    labels: ['A', 'B', 'C'],
    matrix: [
        [0, 5, 2],
        [5, 0, 3],
        [2, 3, 0],
    ],
});