How to use the @nivo/chord.ChordDefaultProps.labelOffset function in @nivo/chord

To help you get started, we’ve selected a few @nivo/chord examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plouc / nivo / website / src / data / components / chord / props.js View on Github external
required: false,
        defaultValue: defaults.label,
        controlType: 'choices',
        group: 'Labels',
        controlOptions: {
            choices: ['id', 'value', `d => \`\${d.id} [\${d.value}]\``].map(choice => ({
                label: choice,
                value: choice,
            })),
        },
    },
    {
        key: 'labelOffset',
        help: 'Label offset from arc.',
        required: false,
        defaultValue: defaults.labelOffset,
        type: 'number',
        controlType: 'range',
        group: 'Labels',
        controlOptions: {
            unit: 'px',
            min: -80,
            max: 80,
        },
    },
    {
        key: 'labelRotation',
        help: 'Label rotation.',
        required: false,
        defaultValue: defaults.labelRotation,
        type: 'number',
        controlType: 'angle',