When using the API Client and try to generate bar charts https://nivo.rocks/bar/api the result is a following error:
{
"errors": [
"\"legendPosition\" must be one of [start, center, end] (axisBottom.legendPosition)",
"\"legendPosition\" must be one of [start, center, end] (axisLeft.legendPosition)"
]
}
if we disable the axisBottom and axisLeft from the Grid & Axes tab, then the chart is generated without any errors. I see no options to set the position to [start, center, end] from the API Client am I missing something?
@indvstry the http API isn't up to date with the latest version of nivo packages, that's why it's rejected for now.
@plouc The types are also incompatible, for example into the BarProps "legenPostion" property accepts these type of values "start" | "center" | "end" | undefined;
export type Axis = Partial<{
format: string | LabelFormatter
legend: string
legendOffset: number
legendPosition: 'start' | 'center' | 'end'
orient: 'top' | 'right' | 'bottom' | 'left'
tickPadding: number
tickRotation: number
tickSize: number
tickValues: number | string[] | number[]
}>
but when you render it with center value it throws and exception saying that middle is the correct value to use:

Update: already covered on https://github.com/plouc/nivo/issues/197
I'm closing this in favor of https://github.com/plouc/nivo/issues/263, as both issues are about mismatch between the deployed demo packages versions and the ones used for the website.
Most helpful comment
@plouc The types are also incompatible, for example into the
BarProps"legenPostion" property accepts these type of values"start" | "center" | "end" | undefined;but when you render it with
centervalue it throws and exception saying thatmiddleis the correct value to use:Update: already covered on https://github.com/plouc/nivo/issues/197