I have been using Nivo bump on a project and I seem to have bumped into an issue. I've been following the sample on the website for Bump and the api crashes when I reduce the number of data sets, i.e the 'serie' of data, in default there are 12, but i reduced the samples to 8 and the api instantly crashed.
The graph renders with un-connected lines, and recursively throws 1000's of errors.
Failed prop type: The prop points[12].y is marked as required in Points, but its value is undefined.
and this error too
react-dom.development.js:3147 Error: <path> attribute d: Expected number, "M0,NaNL61.650000000…".
this one as well
Received NaN for theyattribute. If this is expected, cast the value to a string.
Question
* Note *
There isn''t any difference in the code, but the dataset is passed as a state, so the sample code should work fine maybe to test.
Has anyone else had this issue? or is it just me?
The problem doesn't seem to be related to the data length, this chart doesn't support unconnected lines (hence the warning about missing y value).
This issue occurs when there are fewer than 12 objects in the data array. If there are fewer than 12 objects in the array then the bump chart does not display properly and gives 10000+ error messages in the console. However, if you have 12 or more objects in the data array then it works.
@plouc I also concur this is an issue, I have the exact symptoms/errors. Using the example on https://nivo.rocks/bump/ if you remove series 12, then it will break. Nothing is documented that there must be a minimum of 12 data series.
I believe @ziyadmutawy you're observation is correct. I see the issue, is there any way around with this?
I think the issue is that the bump graph cannot have y values greater than the number of series. In other words, if I have [{x: 2020, y: 3}], this breaks, but I can have [{x: 2020, y: 1}]. I don't know why this is the case, as it seems like it would be useful without this constraint.
I am having the same issue, I want to display 2 objects however I am getting the errors listed above. Will this be resolved or is this intended to be this way?
Same here creating a new ticket with sample code. This is a issue of any number less than 12 which is super weird:
Most helpful comment
This issue occurs when there are fewer than 12 objects in the data array. If there are fewer than 12 objects in the array then the bump chart does not display properly and gives 10000+ error messages in the console. However, if you have 12 or more objects in the data array then it works.