How to use the @nivo/generators.generateSankeyData function in @nivo/generators

To help you get started, we’ve selected a few @nivo/generators 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 / pages / sankey / api.js View on Github external
* This file is part of the nivo project.
 *
 * Copyright 2016-present, Raphaël Benitte.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
import React from 'react'
import { generateSankeyData } from '@nivo/generators'
import SEO from '../../components/seo'
import ApiClient from '../../components/components/api-client/ApiClient'
import { groups } from '../../data/components/sankey/props'
import mapper from '../../data/components/sankey/mapper'
import meta from '../../data/components/sankey/meta.yml'

const data = generateSankeyData({ nodeCount: 6, maxIterations: 8 })

const SankeyApi = () => {
    return (
        <>
github plouc / nivo / packages / nivo-sankey / stories / sankey.stories.js View on Github external
import React from 'react'
import { storiesOf } from '@storybook/react'
import { generateSankeyData } from '@nivo/generators'
import { Sankey } from '../index'

const commonProperties = {
    width: 1100,
    height: 700,
    margin: { top: 0, right: 80, bottom: 0, left: 80 },
    data: generateSankeyData({ nodeCount: 11, maxIterations: 2 }),
    colors: 'd320b',
}

const stories = storiesOf('Sankey', module).addDecorator(story => (
    <div>{story()}</div>
))

stories.add('default', () =&gt; )

stories.add('custom align (right)', () =&gt; )

stories.add('outside labels', () =&gt; )

stories.add('vertical labels', () =&gt; (
    
))
github plouc / nivo / packages / sankey / stories / sankey.stories.js View on Github external
import React from 'react'
import { storiesOf } from '@storybook/react'
import { generateSankeyData, randColor } from '@nivo/generators'
import { Sankey } from '../src'

const sankeyData = generateSankeyData({ nodeCount: 11, maxIterations: 2 })
const commonProperties = {
    width: 900,
    height: 400,
    margin: { top: 0, right: 80, bottom: 0, left: 80 },
    data: sankeyData,
    colors: { scheme: 'category10' },
}

const stories = storiesOf('Sankey', module)

stories.add('default', () =&gt; )

stories.add('custom align (end)', () =&gt; )

stories.add('outside labels', () =&gt; )
github plouc / nivo / website / src / components / pages / Home.js View on Github external
value="loc"
                            animate={false}
                            isInteractive={false}
                            colors={colors}
                            borderColor="#e25d47"
                        /&gt;
                        <span>
                            <span>Sunburst documentation</span>
                        </span>
                    
                
                
                    
                        
                        <span>
                            <span>Sankey documentation</span>
                        </span>