Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* 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 (
<>
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', () => )
stories.add('custom align (right)', () => )
stories.add('outside labels', () => )
stories.add('vertical labels', () => (
))
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', () => )
stories.add('custom align (end)', () => )
stories.add('outside labels', () => )
value="loc"
animate={false}
isInteractive={false}
colors={colors}
borderColor="#e25d47"
/>
<span>
<span>Sunburst documentation</span>
</span>
<span>
<span>Sankey documentation</span>
</span>