How to use the @nivo/legends.LegendAnchor.BottomRight function in @nivo/legends

To help you get started, we’ve selected a few @nivo/legends 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 / examples / typescript / src / components / Bar.tsx View on Github external
tickValues: 5,
                    }}
                    axisBottom={{
                        legend: 'THINGS',
                        legendPosition: AxisLegendPosition.Middle,
                        legendOffset: 36 
                    }}
                    markers={[
                        {
                            crap: true
                        }
                    ]}
                    legends={[
                        {
                            dataFrom: 'keys',
                            anchor: LegendAnchor.BottomRight,
                            direction: LegendDirection.Column,
                            itemWidth: 100,
                            itemHeight: 32,
                            translateX: 120,
                        }
                    ]}
                    onClick={(d: any) => {
                        console.log(d)
                    }}
                />
            
        )
    }
}

@nivo/legends

legend components for nivo dataviz library

MIT
Latest version published 1 month ago

Package Health Score

91 / 100
Full package analysis

Similar packages