Skip to content

Documentation / @ripl/charts / createChordChart

Function: createChordChart()

createChordChart(target, options): ChordChart

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

Factory function that creates a new ChordChart instance.

Parameters

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

Returns

ChordChart

Example

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