How to use the @nivo/core.withContainer function in @nivo/core

To help you get started, we’ve selected a few @nivo/core 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 / swarmplot / src / SwarmPlot.js View on Github external
return null
                })}
            
        )
    }
)

SwarmPlot.displayName = 'SwarmPlot'
SwarmPlot.propTypes = SwarmPlotPropTypes
SwarmPlot.defaultProps = {
    ...SwarmPlotDefaultProps,
    renderNode: props => , // eslint-disable-line react/display-name
}

export default withContainer(SwarmPlot)
github plouc / nivo / packages / bump / src / area-bump / AreaBump.js View on Github external
areaGenerator,
                            })}
                        
                    )
                }

                return layerById[layer]
            })}
        
    )
}

AreaBump.propTypes = AreaBumpPropTypes
AreaBump.defaultProps = AreaBumpDefaultProps

export default memo(withContainer(AreaBump))
github plouc / nivo / packages / chord / src / ChordCanvas.js View on Github external
height: outerHeight,
                    cursor: isInteractive ? 'auto' : 'normal',
                }}
                onMouseEnter={isInteractive ? handleMouseHover : undefined}
                onMouseMove={isInteractive ? handleMouseHover : undefined}
                onMouseLeave={isInteractive ? handleMouseLeave : undefined}
                onClick={isInteractive ? handleClick : undefined}
            />
        )
    }
)

ChordCanvas.propTypes = ChordCanvasPropTypes
ChordCanvas.defaultProps = ChordCanvasDefaultProps

export default withContainer(ChordCanvas)
github plouc / nivo / packages / radar / src / Radar.js View on Github external
containerWidth={width}
                        containerHeight={height}
                        data={legendData}
                        theme={theme}
                    />
                ))}
            
        )
    }
)

Radar.displayName = 'Radar'
Radar.propTypes = RadarPropTypes
Radar.defaultProps = RadarDefaultProps

export default withContainer(Radar)
github plouc / nivo / packages / line / src / Line.js View on Github external
areaGenerator,
                            })}
                        
                    )
                }

                return layerById[layer]
            })}
        
    )
}

Line.propTypes = LinePropTypes
Line.defaultProps = LineDefaultProps

export default withContainer(Line)
github plouc / nivo / packages / scatterplot / src / ScatterPlot.js View on Github external
if (typeof layer === 'function') {
                    return (
                        {React.createElement(layer, customLayerProps)}
                    )
                }

                throw new Error(`Unknown layer (${layer})`)
            })}
        
    )
}

ScatterPlot.propTypes = ScatterPlotPropTypes
ScatterPlot.defaultProps = ScatterPlotDefaultProps

export default memo(withContainer(ScatterPlot))
github plouc / nivo / packages / chord / src / Chord.js View on Github external
return layerById[layer]
                }
                if (typeof layer === 'function') {
                    return {layer(layerContext)}
                }

                return null
            })}
        
    )
}

Chord.propTypes = ChordPropTypes
Chord.defaultProps = ChordDefaultProps

export default withContainer(Chord)
github plouc / nivo / packages / swarmplot / src / SwarmPlotCanvas.js View on Github external
onMouseMove={isInteractive ? handleMouseHover : undefined}
                onMouseLeave={isInteractive ? handleMouseLeave : undefined}
                onClick={isInteractive ? handleClick : undefined}
            />
        )
    }
)

SwarmPlotCanvas.displayName = 'SwarmPlotCanvas'
SwarmPlotCanvas.propTypes = SwarmPlotCanvasPropTypes
SwarmPlotCanvas.defaultProps = {
    ...SwarmPlotCanvasDefaultProps,
    renderNode: renderCanvasNode,
}

export default withContainer(SwarmPlotCanvas)
github plouc / nivo / packages / geo / src / Choropleth.js View on Github external
)
                        })
                    }

                    return {layer({})}
                })}
            
        )
    }
)

Choropleth.displayName = 'Choropleth'
Choropleth.propTypes = ChoroplethPropTypes
Choropleth.defaultProps = ChoroplethDefaultProps

export default withContainer(Choropleth)