How to use the @nivo/colors.getInterpolatedColor 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 / sankey / src / SankeyLabels.js View on Github external
{interpolatedStyles.map(({ key, style, data }) => {
                        const color = getInterpolatedColor(style)

                        return (
                            
                        )
github plouc / nivo / packages / sankey / src / SankeyNodes.js View on Github external
{interpolatedStyles.map(({ key, style, data: node }) => {
                        const color = getInterpolatedColor(style)

                        return (
github plouc / nivo / packages / bullet / src / BulletMarkers.js View on Github external
{interpolatedStyles.map(({ key, style, data: marker }) => {
                            const color = getInterpolatedColor(style)

                            return React.createElement(component, {
                                key,
                                ...marker,
                                ...style,
                                color,
                                data: marker,
                                onMouseEnter: partial(this.handleMouseEnter, marker),
                                onMouseMove: partial(this.handleMouseEnter, marker),
                                onMouseLeave: partial(this.handleMouseLeave, marker),
                                onClick: partial(this.handleClick, marker),
                            })
                        })}
github plouc / nivo / packages / treemap / src / TreeMapHtml.js View on Github external
{interpolatedStyles.map(({ style, data: node }) => {
                                        style.color = getInterpolatedColor(style)

                                        return React.createElement(nodeComponent, {
                                            key: node.path,
                                            node,
                                            style: {
                                                ...style,
                                                fill: node.fill,
                                                borderWidth,
                                                borderColor: getBorderColor(style),
                                                labelTextColor: getLabelTextColor(style),
                                                orientLabel,
                                            },
                                            handlers: getHandlers(node, showTooltip, hideTooltip),
                                        })
                                    })}
github plouc / nivo / packages / chord / src / ChordArcs.js View on Github external
{interpolatedStyles.map(({ key, style, data: arc }) => {
                            const color = getInterpolatedColor(style)

                            return (
github plouc / nivo / packages / treemap / src / TreeMap.js View on Github external
{interpolatedStyles.map(({ style, data: node }) => {
                                        style.color = getInterpolatedColor(style)

                                        return React.createElement(nodeComponent, {
                                            key: node.path,
                                            node,
                                            style: {
                                                ...style,
                                                fill: node.fill,
                                                borderWidth,
                                                borderColor: getBorderColor(style),
                                                labelTextColor: getLabelTextColor(style),
                                                orientLabel,
                                            },
                                            handlers: getHandlers(node, showTooltip, hideTooltip),
                                            theme,
                                        })
                                    })}
github plouc / nivo / packages / circle-packing / src / Bubble.js View on Github external
{interpolatedStyles.map(({ style, data: node }) => {
                                        style.color = getInterpolatedColor(style)

                                        return React.createElement(nodeComponent, {
                                            key: node.path,
                                            node,
                                            style: {
                                                ...style,
                                                fill: node.fill,
                                                borderWidth,
                                                borderColor: getBorderColor(style),
                                                labelTextColor: getLabelTextColor(style),
                                            },
                                            handlers: getHandlers(node, showTooltip, hideTooltip),
                                            theme,
                                        })
                                    })}
github plouc / nivo / packages / heatmap / src / HeatMap.js View on Github external
({ key, style, data: node }) => {
                                                        const color = getInterpolatedColor(style)

                                                        return React.createElement(Cell, {
                                                            key,
                                                            data: node,
                                                            value: node.value,
                                                            x: style.x,
                                                            y: style.y,
                                                            width: Math.max(style.width, 0),
                                                            height: Math.max(style.height, 0),
                                                            color,
                                                            opacity: style.opacity,
                                                            borderWidth: cellBorderWidth,
                                                            borderColor: getCellBorderColor({
                                                                ...node,
                                                                color,
                                                            }),
github plouc / nivo / packages / chord / src / ChordRibbons.js View on Github external
{interpolatedStyles.map(({ key, style, data: ribbon }) => {
                            const color = getInterpolatedColor(style)

                            return (
github plouc / nivo / packages / bullet / src / BulletRects.js View on Github external
{interpolatedStyles.map(({ key, style, data }) => {
                                const color = getInterpolatedColor(style)

                                return React.createElement(component, {
                                    key,
                                    index: Number(key),
                                    data,
                                    x: style.x,
                                    y: style.y,
                                    width: Math.max(style.width, 0),
                                    height: Math.max(style.height, 0),
                                    color,
                                    onMouseEnter: partial(this.handleMouseEnter, data),
                                    onMouseMove: partial(this.handleMouseEnter, data),
                                    onMouseLeave: partial(this.handleMouseLeave, data),
                                    onClick: partial(this.handleClick, data),
                                })
                            })}