How to use the @nivo/geo.ChoroplethDefaultProps.label function in @nivo/geo

To help you get started, we’ve selected a few @nivo/geo 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 / charts / geo / props.js View on Github external
),
        default: GeoMapDefaultProps.layers,
    },
    {
        key: 'label',
        scopes: ['Choropleth', 'ChoroplethCanvas'],
        type: '{string|Function}',
        required: false,
        description: (
            <div>
                Accessor to label, if a string is provided, the value will be retrieved using it as
                a key, if it's a function, it's its responsibility to return the label.
            </div>
        ),
        default: ChoroplethDefaultProps.label,
    },
    {
        key: 'value',
        scopes: ['Choropleth', 'ChoroplethCanvas'],
        type: '{string|Function}',
        required: false,
        description: (
            <div>
                Accessor to data value, if a string is provided, the value will be retrieved using
                it as a key, if it's a function, it's its responsibility to return the value.
            </div>
        ),
        default: ChoroplethDefaultProps.value,
    },
    {
        key: 'valueFormat',
github plouc / nivo / website / src / data / components / choropleth / props.js View on Github external
const props = [
    ...geoProps,
    {
        key: 'label',
        group: 'Base',
        type: 'string | Function',
        required: false,
        help: 'Label accessor.',
        description: `
            Accessor to label, if a string is provided,
            the value will be retrieved using it as
            a key, if it's a function, it's its responsibility
            to return the label.
        `,
        defaultValue: ChoroplethDefaultProps.label,
    },
    {
        key: 'value',
        group: 'Base',
        type: 'string | Function',
        required: false,
        help: 'Value accessor.',
        description: `
            Accessor to data value, if a string is provided,
            the value will be retrieved using
            it as a key, if it's a function, it's its responsibility
            to return the value.
        `,
        defaultValue: ChoroplethDefaultProps.value,
    },
    {