How to use the @nivo/colors.interpolateColor function in @nivo/colors

To help you get started, we’ve selected a few @nivo/colors 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 / packages / treemap / src / TreeMapHtml.js View on Github external
styles={nodes.map(node => ({
                                key: node.path,
                                data: node,
                                style: {
                                    x: spring(node.x, springConfig),
                                    y: spring(node.y, springConfig),
                                    width: spring(node.width, springConfig),
                                    height: spring(node.height, springConfig),
                                    ...interpolateColor(node.color, springConfig),
                                },
                            }))}
                        >
github plouc / nivo / packages / circle-packing / src / motion.js View on Github external
export const nodeWillEnter = ({ data }) => ({
    scale: 0,
    r: 0,
    x: data.x,
    y: data.y,
    ...interpolateColor(data.color),
})
github plouc / nivo / packages / chord / src / ChordRibbons.js View on Github external
const ribbonWillEnter = ({ data: ribbon }) => ({
    ...getRibbonAngles(ribbon, true),
    opacity: 0,
    ...interpolateColor(ribbon.source.color),
})
github plouc / nivo / packages / circle-packing / src / BubbleHtml.js View on Github external
styles={nodes.map(node => ({
                                key: node.path,
                                data: node,
                                style: {
                                    scale: spring(1, springConfig),
                                    r: spring(node.r, springConfig),
                                    x: spring(node.x, springConfig),
                                    y: spring(node.y, springConfig),
                                    opacity: spring(1, springConfig),
                                    ...interpolateColor(node.color, springConfig),
                                },
                            }))}
                        >
github plouc / nivo / packages / chord / src / ChordArcs.js View on Github external
styles={arcs.map(arc => {
                    return {
                        key: arc.id,
                        data: arc,
                        style: {
                            startAngle: spring(arc.startAngle, springConfig),
                            endAngle: spring(arc.endAngle, springConfig),
                            opacity: spring(getOpacity(arc), springConfig),
                            ...interpolateColor(arc.color, springConfig),
                        },
                    }
                })}
            >
github plouc / nivo / packages / circle-packing / src / motion.js View on Github external
export const nodeWillLeave = springConfig => ({ data }) => ({
    scale: spring(0, springConfig),
    r: spring(0, springConfig),
    x: spring(data.x, springConfig),
    y: spring(data.y, springConfig),
    ...interpolateColor(data.color, springConfig),
})
github plouc / nivo / packages / chord / src / ChordRibbons.js View on Github external
const ribbonWillLeave = springConfig => ({ data: ribbon }) => ({
    ...getRibbonAngles(ribbon, true, springConfig),
    opacity: 0,
    ...interpolateColor(ribbon.source.color, springConfig),
})
github plouc / nivo / packages / swarmplot / src / AnimatedSwarmPlotNodes.js View on Github external
styles={nodes.map(node => ({
                    key: node.id,
                    data: node,
                    style: {
                        x: spring(node.x, springConfig),
                        y: spring(node.y, springConfig),
                        size: spring(node.size, springConfig),
                        ...interpolateColor(node.color, springConfig),
                        scale: spring(1, springConfig),
                    },
                }))}
            >
github plouc / nivo / packages / sankey / src / SankeyNodes.js View on Github external
styles={nodes.map(node => {
                return {
                    key: node.id,
                    data: node,
                    style: {
                        x: spring(node.x, springProps),
                        y: spring(node.y, springProps),
                        width: spring(node.width, springProps),
                        height: spring(node.height, springProps),
                        opacity: spring(getOpacity(node), springProps),
                        ...interpolateColor(node.color, springProps),
                    },
                }
            })}
        >
github plouc / nivo / packages / treemap / src / motion.js View on Github external
export const nodeWillEnter = ({ data: node }) => ({
    x: node.x,
    y: node.y,
    width: node.width,
    height: node.height,
    ...interpolateColor(node.color),
})