Description:
The LegendProps in @nivo/legends are missing the required label prop, hence you can't use a custom legend. Found in line chart, but I assume it's in all charts.
To Reproduce
Check the data prop in LegendProps.
export interface LegendProps {
data?: Array<{
id: string | number
value: number
color?: string
fill?: string
}>
To create a custom legend in a line chart, you can simply add this to the LegendProps:
Description: The LegendProps in @nivo/legends are missing the required label prop, hence you can't use a custom legend. Found in line chart, but I assume it's in all charts.
To Reproduce Check the data prop in LegendProps.
To create a custom legend in a line chart, you can simply add this to the LegendProps:
It will throw an error, since the label is missing and required in SVGLegends.
Additional context Using nivo: "@nivo/core": "^0.61.0", "@nivo/line": "^0.61.1",