How to use the @nivo/calendar.CalendarDefaultProps.yearSpacing function in @nivo/calendar

To help you get started, we’ve selected a few @nivo/calendar 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 / calendar / props.js View on Github external
defaultValue: 'Depends on device',
        type: `number`,
        controlType: 'range',
        group: 'Base',
        controlOptions: {
            min: 1,
            max: 2,
        },
    },
    // Years
    {
        key: 'yearSpacing',
        help: 'define spacing between each year row/column depending on the direction.',
        type: 'number',
        required: false,
        defaultValue: defaults.yearSpacing,
        controlType: 'range',
        group: 'Years',
        controlOptions: {
            unit: 'px',
            min: 0,
            max: 160,
            step: 5,
        },
    },
    {
        key: 'yearLegend',
        group: 'Years',
        help: `can be used to customize years label, returns 'YYYY' by default.`,
        type: '(year: number) => string | number',
        required: false,
    },