How to use the @nivo/generators.generateCountriesData 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 / components / guides / gradients / GradientsIllustrations.js View on Github external
]),
                        ]}
                        fill={[{ match: '*', id: 'example2' }]}
                        borderWidth={1}
                        borderColor="inherit:darker(0.2)"
                        isInteractive={false}
                        animate={false}
                        theme={theme.nivo}
                    />
                
                <div>
                    </div>
github plouc / nivo / website / src / components / guides / patterns / PatternsIllustrations.js View on Github external
{ match: d =&gt; d.data.index % 3 === 1, id: 'example2.dots' },
                            { match: d =&gt; d.data.index % 3 === 2, id: 'example2.squares' },
                        ]}
                        borderWidth={2}
                        borderColor="inherit"
                        isInteractive={false}
                        animate={false}
                        theme={theme.nivo}
                    /&gt;
                
                <div>
                    </div>
github plouc / nivo / packages / bar / stories / bar.stories.js View on Github external
import React from 'react'
import { storiesOf } from '@storybook/react'
import { action } from '@storybook/addon-actions'
import { generateCountriesData, sets } from '@nivo/generators'
import range from 'lodash/range'
import random from 'lodash/random'
import { useTheme } from '@nivo/core'
import { Bar } from '../src'

const keys = ['hot dogs', 'burgers', 'sandwich', 'kebab', 'fries', 'donut']
const commonProps = {
    width: 900,
    height: 500,
    margin: { top: 60, right: 80, bottom: 60, left: 80 },
    data: generateCountriesData(keys, { size: 7 }),
    indexBy: 'country',
    keys,
    padding: 0.2,
    labelTextColor: 'inherit:darker(1.4)',
    labelSkipWidth: 16,
    labelSkipHeight: 16,
}

const stories = storiesOf('Bar', module)

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

stories.add('stacked horizontal', () =&gt; (
    
))
github plouc / nivo / website / src / data / components / heatmap / generator.js View on Github external
export const generateHeavyDataSet = () => ({
    data: generateCountriesData(dishes, { size: 22, min: 0, max: 100 }),
    keys: dishes,
})
github plouc / nivo / website / src / data / components / bar / generator.js View on Github external
export const generateHeavyDataSet = () => ({
    data: generateCountriesData(dishes, { size: 21, max: 200 }),
    keys: dishes,
})
github plouc / nivo / website / src / data / components / bar / generator.js View on Github external
export const generateLightDataSet = () => ({
    data: generateCountriesData(dishes.slice(0, 6), { size: 7, max: 200 }),
    keys: dishes.slice(0, 6),
})
github plouc / nivo / examples / retro / src / components / charts / TreeMap.js View on Github external
const TreeMap = () =&gt; (
    <div>
        
        <div>TREEMAP</div>
    </div>
)
github plouc / nivo / website / src / components / guides / colors / ColorsIllustrations.js View on Github external
enableGridY={false}
                        enableLabel={false}
                        colors={{ scheme: 'spectral' }}
                        borderWidth={0}
                        borderColor="#333"
                        isInteractive={false}
                        animate={false}
                        theme={theme.nivo}
                    /&gt;
                
                <div>
                    
                </div>
github plouc / nivo / packages / bar / stories / barCanvas.stories.js View on Github external
import React from 'react'
import { storiesOf } from '@storybook/react'
import { generateCountriesData } from '@nivo/generators'
import { BarCanvas } from '../src'

const keys = ['hot dogs', 'burgers', 'sandwich', 'kebab', 'fries', 'donut']
const commonProps = {
    width: 900,
    height: 500,
    margin: { top: 60, right: 80, bottom: 60, left: 80 },
    data: generateCountriesData(keys, { size: 7 }),
    indexBy: 'country',
    keys,
    padding: 0.2,
    labelTextColor: 'inherit:darker(1.4)',
    labelSkipWidth: 16,
    labelSkipHeight: 16,
}

const stories = storiesOf('BarCanvas', module)

stories.add('custom tooltip', () =&gt; (
     (
            <strong color="" style="{{">
                {id}: {value}</strong>
github plouc / nivo / website / src / components / pages / Home.js View on Github external
colors={colors}
                            theme={homeTheme}
                            enableLabel={false}
                            animate={false}
                            isInteractive={false}
                            {...commonAxes}
                        /&gt;
                        <span>
                            <span>Bar documentation</span>
                        </span>