How to use the @nivo/sankey.SankeyDefaultProps.layout function in @nivo/sankey

To help you get started, we’ve selected a few @nivo/sankey 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 / sankey / props.js View on Github external
source: string | number, // ref to node id
                    target: string | number, // ref to node id
                    value:  number
                }}>
            }
            \`\`\`
        `,
        type: '{ nodes: object[], links: object[] }',
        required: true,
    },
    {
        key: 'layout',
        help: `Control sankey layout direction.`,
        type: 'string',
        required: false,
        defaultValue: defaults.layout,
        controlType: 'radio',
        group: 'Base',
        controlOptions: {
            choices: [
                { label: 'horizontal', value: 'horizontal' },
                { label: 'vertical', value: 'vertical' },
            ],
        },
    },
    {
        key: 'align',
        group: 'Base',
        help: 'Node alignment method.',
        description: `
            Defines node alignment method.
            Please have a look at the