How to use the @nivo/heatmap.HeatMapDefaultProps.cellShape function in @nivo/heatmap

To help you get started, we’ve selected a few @nivo/heatmap 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 / heatmap / props.js View on Github external
width:       {number},
                            height:      {number},
                            color:       {string},
                            opacity:     {number},
                            borderWidth: {number},
                            borderColor: {string},
                            textColor:   {string},
                        }
                    `}
                
            
        ),
        help: `Cell shape, can be one of: 'rect', 'circle', if a function is provided, it must return a valid SVG element.`,
        type: '{string|Function}',
        required: false,
        default: defaults.cellShape,
        controlType: 'choices',
        controlGroup: 'Style',
        controlOptions: {
            choices: ['rect', 'circle', 'Custom(props) => (…)'].map(key => ({
                label: key,
                value: key,
            })),
        },
    },
    {
        key: 'colors',
        scopes: '*',
        description: 'Defines color range.',
        type: '{string|Function|Array}',
        required: false,
        default: 'nivo',
github plouc / nivo / website / src / data / components / heatmap / props.js View on Github external
value:       number,
                x:           number,
                y:           number,
                width:       number,
                height:      number,
                color:       string,
                opacity:     number,
                borderWidth: number,
                borderColor: string,
                textColor:   string,
            }
            \`\`\`
        `,
        type: 'string | Function',
        required: false,
        defaultValue: defaults.cellShape,
        controlType: 'choices',
        group: 'Style',
        controlOptions: {
            choices: ['rect', 'circle', 'Custom(props) => (…)'].map(key => ({
                label: key,
                value: key,
            })),
        },
    },
    {
        key: 'colors',
        help: 'Defines color range.',
        type: 'string | Function | string[]',
        required: false,
        defaultValue: 'nivo',
        controlType: 'quantizeColors',