How to use the @nivo/voronoi.VoronoiDefaultProps.layers function in @nivo/voronoi

To help you get started, we’ve selected a few @nivo/voronoi 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 / voronoi / props.js View on Github external
{
        key: 'layers',
        flavors: ['svg'],
        group: 'Base',
        help: 'Defines the order of layers.',
        description: `
            Defines the order of layers, available layers are:
            \`links\`, \`cells\`, \`points\`, \`bounds\`.

            You can also use this to insert extra layers
            to the chart, this extra layer must be
            a function which will receive the chart computed
            data and must return a valid SVG element.
        `,
        required: false,
        defaultValue: defaults.layers,
    },
    {
        key: 'enableLinks',
        help: 'Enable/disable links.',
        type: 'boolean',
        required: false,
        defaultValue: defaults.enableLinks,
        controlType: 'switch',
        group: 'Links',
    },
    {
        key: 'linkLineWidth',
        help: 'Links line width.',
        type: 'number',
        required: false,
        defaultValue: defaults.linkLineWidth,
github plouc / nivo / website / src / components / charts / voronoi / props.js View on Github external
},
    {
        key: 'layers',
        scopes: ['Voronoi'],
        description: (
            <div>
                Defines the order of layers, available layers are:
                <code>links</code>, <code>cells</code>, <code>points</code>, <code>bounds</code>.
                <br>
                You can also use this to insert extra layers to the chart, this extra layer must be
                a function which will receive the chart computed data and must return a valid SVG
                element.
            </div>
        ),
        required: false,
        default: defaults.layers,
    },
    {
        key: 'enableLinks',
        scopes: '*',
        description: 'Enable/disable links.',
        type: '{boolean}',
        required: false,
        default: defaults.enableLinks,
        controlType: 'switch',
        controlGroup: 'Links',
    },
    {
        key: 'linkLineWidth',
        description: 'Links line width (px).',
        type: '{number}',
        required: false,