-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest update broke canvas mouse interaction #2162
Comments
+1 Yes, I just started to have the same problem after upgrading to React 18. Is this related to #2122 ? |
This also breaks tooltips - the tooltips do not render on the canvas charts on version 0.80.o either. |
I think this is the problematic code (from
And it seems to be fixed by #2125: nivo/packages/core/src/lib/interactivity/index.js Lines 33 to 36 in 3e639a2
@plouc consider closing this issue? |
any updates? |
Anybody here? Rlly need this fix |
Would be nice if this could be fixed, the package is unusable now with latest (18) react version |
@ErwinJapie i encounter the same issue. this is really problematic. |
I don't mean disrespect, but I hope nothing has happened to @plouc :( The issues of past 6 months piled up so badly, and zero comment from him to any of those - very disconcerting! |
- Updated the graph title circle to not have a negative margin so it doesn't overflow out of the sticky date filter container element when scrolling - Updated the native radio button to not have a display of 'none', but instead be absolute, hidden and with opacity of 0. This keeps the date filters tabbale through tab roving. Added radiogroup role to the date filter container - Downgraded nivo core and nivo line to 0.79.0 as version 0.80.0 breaks mouse and tooltip interaction for canvas charts. More on this, here: plouc/nivo#2162
Same problem here. Nivo is unusable now regarding canvas-components. |
Same here. Really wish I could use ResponseLiveCanvas for a chart with many points, but the tooltips don't show due to this issue. |
+1 to above (I tried a workaround but was foiled by lerna/lerna#2074) |
OK! Here's a workaround that I just tested! Seems like it might unblock some of you. You can shim HTMLCanvasElement.prototype.getBBox = function () {
return { width: this.offsetWidth, height: this.offsetHeight };
}; For my use case in Next.js, I wrapped it in an effect hook to run once on the client: React.useEffect(() => {
HTMLCanvasElement.prototype.getBBox = function () {
return { width: this.offsetWidth, height: this.offsetHeight };
};
}, []); This is almost identical to the fix in #2125. Just use with care until we see a version bump 🥲 |
@sighrobot : Works, thanks. Sadly, @plouc merged #2125 right after 0.80 release, so it isn't part of any release. |
This issue has been fixed when updating to v0.82.0 |
0.82 isn't installable :) We all are stuck with 0.80 or 0.81, I don't even remember. |
hmmm, that's strange. My packages are all up to date without a problem:
|
I installed v0.83.0 today and can confirm the issue is fixed 🎉 |
Not installable due to #2310. |
Canvas charts log an error on mouse move. Can be reproduced on nivo.rocks just by choosing a canvas and hovering over the chart.
Uncaught TypeError: t.getBBox is not a function
Device info:
MacBook Pro — running macOS Monterey 12.5
Mac Pro — running macOS Monterey 12.5
The text was updated successfully, but these errors were encountered: