How to use @nivo/chord - 10 common examples

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
group: 'Style',
    },
    {
        key: 'arcBorderWidth',
        help: 'Arcs border width.',
        required: false,
        defaultValue: defaults.arcBorderWidth,
        type: 'number',
        controlType: 'lineWidth',
        group: 'Style',
    },
    {
        key: 'arcBorderColor',
        help: 'Arcs border color.',
        required: false,
        defaultValue: defaults.arcBorderColor,
        type: 'string | object | Function',
        controlType: 'inheritedColor',
        group: 'Style',
    },
    {
        key: 'ribbonOpacity',
        help: 'Ribbons opacity.',
        required: false,
        defaultValue: defaults.ribbonOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Style',
    },
    {
        key: 'ribbonBorderWidth',
        help: 'Ribbons border width.',
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
group: 'Style',
    },
    {
        key: 'arcOpacity',
        help: 'Arcs opacity.',
        required: false,
        defaultValue: defaults.arcOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Style',
    },
    {
        key: 'arcBorderWidth',
        help: 'Arcs border width.',
        required: false,
        defaultValue: defaults.arcBorderWidth,
        type: 'number',
        controlType: 'lineWidth',
        group: 'Style',
    },
    {
        key: 'arcBorderColor',
        help: 'Arcs border color.',
        required: false,
        defaultValue: defaults.arcBorderColor,
        type: 'string | object | Function',
        controlType: 'inheritedColor',
        group: 'Style',
    },
    {
        key: 'ribbonOpacity',
        help: 'Ribbons opacity.',
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
{
        key: 'isInteractive',
        flavors: ['svg', 'canvas'],
        help: 'Enable/disable interactivity.',
        type: 'boolean',
        required: false,
        defaultValue: defaults.isInteractive,
        controlType: 'switch',
        group: 'Interactivity',
    },
    {
        key: 'arcHoverOpacity',
        flavors: ['svg', 'canvas'],
        help: 'Arc opacity when hover (0~1).',
        required: false,
        defaultValue: defaults.arcHoverOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Interactivity',
    },
    {
        key: 'arcHoverOthersOpacity',
        flavors: ['svg', 'canvas'],
        help: 'Arc opacity when not hover (0~1).',
        required: false,
        defaultValue: defaults.arcHoverOthersOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Interactivity',
    },
    {
        key: 'ribbonHoverOpacity',
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
{
        key: 'arcHoverOpacity',
        flavors: ['svg', 'canvas'],
        help: 'Arc opacity when hover (0~1).',
        required: false,
        defaultValue: defaults.arcHoverOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Interactivity',
    },
    {
        key: 'arcHoverOthersOpacity',
        flavors: ['svg', 'canvas'],
        help: 'Arc opacity when not hover (0~1).',
        required: false,
        defaultValue: defaults.arcHoverOthersOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Interactivity',
    },
    {
        key: 'ribbonHoverOpacity',
        flavors: ['svg', 'canvas'],
        help: 'Ribbon opacity when hover (0~1).',
        required: false,
        defaultValue: defaults.ribbonHoverOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Interactivity',
    },
    {
        key: 'ribbonHoverOthersOpacity',
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
},
    },
    {
        key: 'colors',
        help: 'Defines how to compute arc/ribbon color.',
        type: 'string | Function | string[]',
        required: false,
        defaultValue: defaults.colors,
        controlType: 'ordinalColors',
        group: 'Style',
    },
    {
        key: 'arcOpacity',
        help: 'Arcs opacity.',
        required: false,
        defaultValue: defaults.arcOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Style',
    },
    {
        key: 'arcBorderWidth',
        help: 'Arcs border width.',
        required: false,
        defaultValue: defaults.arcBorderWidth,
        type: 'number',
        controlType: 'lineWidth',
        group: 'Style',
    },
    {
        key: 'arcBorderColor',
        help: 'Arcs border color.',
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
defaultValue: defaults.innerRadiusOffset,
        type: 'number',
        controlType: 'range',
        group: 'Base',
        controlOptions: {
            min: 0,
            max: 1,
            step: 0.01,
        },
    },
    {
        key: 'colors',
        help: 'Defines how to compute arc/ribbon color.',
        type: 'string | Function | string[]',
        required: false,
        defaultValue: defaults.colors,
        controlType: 'ordinalColors',
        group: 'Style',
    },
    {
        key: 'arcOpacity',
        help: 'Arcs opacity.',
        required: false,
        defaultValue: defaults.arcOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Style',
    },
    {
        key: 'arcBorderWidth',
        help: 'Arcs border width.',
        required: false,
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
},
    {
        key: 'ribbonBorderColor',
        help: 'Ribbons border color.',
        required: false,
        defaultValue: defaults.ribbonBorderColor,
        type: 'string | object | Function',
        controlType: 'inheritedColor',
        group: 'Style',
    },
    {
        key: 'enableLabel',
        help: 'Enable/disable labels.',
        type: 'boolean',
        required: false,
        defaultValue: defaults.enableLabel,
        controlType: 'switch',
        group: 'Labels',
    },
    {
        key: 'label',
        help:
            'Defines how to get label text, can be a string (used to access current arc data property) or a function which will receive the actual arc data.',
        type: 'string | Function',
        required: false,
        defaultValue: defaults.label,
        controlType: 'choices',
        group: 'Labels',
        controlOptions: {
            choices: ['id', 'value', `d => \`\${d.id} [\${d.value}]\``].map(choice => ({
                label: choice,
                value: choice,
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
required: false,
        defaultValue: defaults.innerRadiusRatio,
        type: 'number',
        controlType: 'range',
        group: 'Base',
        controlOptions: {
            min: 0,
            max: 1,
            step: 0.01,
        },
    },
    {
        key: 'innerRadiusOffset',
        help: 'Inner radius offset (minus innerRadiusRatio).',
        required: false,
        defaultValue: defaults.innerRadiusOffset,
        type: 'number',
        controlType: 'range',
        group: 'Base',
        controlOptions: {
            min: 0,
            max: 1,
            step: 0.01,
        },
    },
    {
        key: 'colors',
        help: 'Defines how to compute arc/ribbon color.',
        type: 'string | Function | string[]',
        required: false,
        defaultValue: defaults.colors,
        controlType: 'ordinalColors',
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
required: false,
        defaultValue: defaults.padAngle,
        type: 'number',
        controlType: 'range',
        group: 'Base',
        controlOptions: {
            min: 0,
            max: 1,
            step: 0.01,
        },
    },
    {
        key: 'innerRadiusRatio',
        help: 'Inner radius ratio.',
        required: false,
        defaultValue: defaults.innerRadiusRatio,
        type: 'number',
        controlType: 'range',
        group: 'Base',
        controlOptions: {
            min: 0,
            max: 1,
            step: 0.01,
        },
    },
    {
        key: 'innerRadiusOffset',
        help: 'Inner radius offset (minus innerRadiusRatio).',
        required: false,
        defaultValue: defaults.innerRadiusOffset,
        type: 'number',
        controlType: 'range',
github plouc / nivo / website / src / data / components / chord / props.js View on Github external
Please make sure to use \`context.save()\` and
            \`context.restore()\` if you make some global
            modifications to the 2d context inside this function
            to avoid side effects.
        `,
        required: false,
        type: 'Array',
        defaultValue: defaults.layers,
    },
    {
        key: 'isInteractive',
        flavors: ['svg', 'canvas'],
        help: 'Enable/disable interactivity.',
        type: 'boolean',
        required: false,
        defaultValue: defaults.isInteractive,
        controlType: 'switch',
        group: 'Interactivity',
    },
    {
        key: 'arcHoverOpacity',
        flavors: ['svg', 'canvas'],
        help: 'Arc opacity when hover (0~1).',
        required: false,
        defaultValue: defaults.arcHoverOpacity,
        type: 'number',
        controlType: 'opacity',
        group: 'Interactivity',
    },
    {
        key: 'arcHoverOthersOpacity',
        flavors: ['svg', 'canvas'],