How to use the @nivo/calendar.CalendarDefaultProps.yearLegendPosition 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
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,
    },
    {
        key: 'yearLegendPosition',
        help: 'defines year legends position.',
        type: `'before' | 'after'`,
        required: false,
        defaultValue: defaults.yearLegendPosition,
        controlType: 'radio',
        group: 'Years',
        controlOptions: {
            choices: [
                { label: 'before', value: 'before' },
                { label: 'after', value: 'after' },
            ],
        },
    },
    {
        key: 'yearLegendOffset',
        help: 'define offset from year edge to its label.',
        type: 'number',
        required: false,
        defaultValue: defaults.yearLegendOffset,
        controlType: 'range',