Closed teddybee closed 3 years ago
Not sure if it's applicable but I have got a strange bug that was only manifesting itself on the production version of my app.
What helped was assigning new id
to the data
. It looks like nivo is using some caching mechanism when not used on http://localhost.
Similar refresh bugs happened with linear gradients as well. So I used a refreshed id
that depended to data to fix the graph:
fill: [{ match: "*", id: `gradient-${id}` }],
defs: [
linearGradientDef(`gradient-${id}`, [
{ offset: 0, color: "hsl(0, 50%, 100%)", opacity: 0.3 },
{ offset: 30, color: "hsl(0, 50%, 100%)", opacity: 0.3 },
{ offset: 90, color: "hsl(0, 50%, 100%)", opacity: 0 },
]),
],
TL;DR Change id
as well to make sure nivo is re-rendering the graph with refreshed data
.
TypeError: r.willAdvance is not a function
could be related to: https://github.com/plouc/nivo/issues/1290
Same error message at me as well: TypeError: r.willAdvance is not a function at 2.e3af67e6.chunk.js:2 at Module.gu (2.e3af67e6.chunk.js:2) at v.advance (2.e3af67e6.chunk.js:2) at n (2.e3af67e6.chunk.js:2)
There is no such error with debug run.
I am seeing exactly the same issue. The issues manifests itself only in production. The versions I am using are:
"@nivo/bar": "^0.67.0",
"@nivo/core": "^0.67.0",
"@nivo/line": "^0.67.0",
"react": "^17.0.1",
Node 14.15.1
I also see the same error on the console:
FrameLoop.ts:110 TypeError: r.willAdvance is not a function at FrameLoop.ts:173 at Module.mc (react-dom.production.min.js:244) at v.advance (FrameLoop.ts:169) at n (FrameLoop.ts:107)
Don't notice this error when running localhost
Downgrading to version 0.62.0 solved the problem for now, hopefully it gets fixed in a release soon. I didn't try the other versions in between 0.62 and 0.67.
Is there any known way to resolve this for ResponsiveLine?
Same happening here:
react-dom.production.min.js:23 Error:
I ran into this issue too, also got the TypeError: r.willAdvance is not a function
error in production only.
I upgraded to 0.69.x
and that resolved this issue for me.
@teddybee Please update to the latest version and let me know if the problem is still present.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
Describe/explain the bug Bar chart's axises usually messed up, when data is updating, or div has been resized. For examle: the dates in the X scale won't update itself or the Y scale labels shows totally wrong numbers, sumetimes overlap the horizontal lines/labels themself. I assume there is something wrong with the animation. The bug is appears only when I compile a release version. In debug mode its slow, but working well.
To Reproduce You can see the strange behaviour on https://coronahu.site For example in the main screen you can see some bar charts, if you click on the "Széles oszlopok" switch, the Bars are updating and behaves wrong. There are some other charts as well on the page that also has bugs at updating or resizing.
Desktop (please complete the following information):
Sw versions that I use:
Screenshots After browser resize. the X labels don't stretch out to its place:
After data update the X labels should show months instead of 3 weeks (not updating at all):
After data update, the Y labels/lines are messed up, wrong place, wrong values, even the order as well: