Comments (22)
This fix has been released in v0.87.0
.
from nivo.
Great news! Thanks!
from nivo.
Do you mean "adding all the optional props in the client code explicitly"? If so, that's not really a "solution" :)
from nivo.
Or - drop back to the previous version until the bug is fixed 😝
That's what I've done.
from nivo.
Damn... well... misery loves company and here we are <3
FML... I migrating from cra/craco to vite and updating all my libs in on shot was not ideal. This wasn't the only lib to break on update. Optimizely had to be downgraded and so did Playwright, both had regressions.
Gonna go back on this one too. PR is already big enough.
from nivo.
I am having this same issue. Been troubleshooting since yesterday and not found a good fix. I'll stay tuned here.
from nivo.
adding in all the props is the only way to get rid of the console warnings currently
from nivo.
^^ that's the likely cause.
from nivo.
having the same isssues
from nivo.
I can confirm that adding missing props solves the issue.
from nivo.
if you go back to the previous version you get back to get the "defaultProps" deprecated warning (depending on your version of react).
from nivo.
what could I set as "tooltip" and "sliceTooltip" props to get rid of their warnings without affecting the behavior of the line chart component?
from nivo.
dude,i've resolve this problem by update nodejs to version 18.0.0 above, i use 18.2.0 now,and this function can render svg/canvas components normally
from nivo.
it seems that nodejs 17 may trigger this multiple errors
from nivo.
im using node js 21, still get the same console.log warnings
from nivo.
Same.
Can this be interpreted - no offense please - as "the devs do not really use this project themselves (anymore)"? Which can happen everywhere, but in that case, a deprecation warning on the front page would be nice, I guess.
from nivo.
I'm also experiencing this with @nivo/line 0.85.1 - node V20.11.
Downgrading to @nivo0.84.0 removed a ton of warnings, but introduced the Support for defaultProps
error that @codeams mentioned.
from nivo.
I'm also experiencing this with @nivo/line 0.85.1 - node V20.11.
Downgrading to @nivo0.84.0 removed a ton of warnings, but introduced the
Support for defaultProps
error that @codeams mentioned.
Same issue
from nivo.
The same issue here with node 20.11 & @nivo/line 0.85.1.
Any updates?
from nivo.
As the project I'm working on uses TS I suppressed warnings using a hook:
import { useEffect } from 'react'
const useSuppressConsoleWarnings = () => {
useEffect(() => {
const originalConsoleWarn = console.error
console.error = (message, ...args) => {
if (
message.includes('Warning: Failed %s type: %s%s')
) {
return
}
originalConsoleWarn(message, ...args)
}
return () => {
// Restore original console.error on cleanup
console.error = originalConsoleWarn
}
}, [])
}
export default useSuppressConsoleWarnings
It uses useEffect to ensure the warning is supresed in the client in case you're using server components.
You can bring this hook into components that use @nivo/line
.
Hopefully this is resolved soon, but if you take a look at nivo projects in github, you'll notice the intention to move @nivo/line
to TS has been open for more than a couple of years. It doesn't seem simple so I don't think this will be resolved in the short term.
Downgrading the react/node version is not a satisfactory solution, as warnings of "defaultProps" being deprecated might appear instead. In fact, the attempt to solve this deprecation warning is what triggered this even more annoying issue.
from nivo.
Thanks for sharing that. We'll stick on 0.84 till something compelling makes us move, but that's handy to know.
from nivo.
Unfortunately, 0.84 contains multiple high severity ReDoS vulnerabilities related to the d3-color dependency.
from nivo.
Related Issues (20)
- Wrong `PointMouseHandler` type on event handlers like `onMouseMove` HOT 1
- Nivo Sankey Chart adjustable node thickness HOT 2
- React 19 Support HOT 4
- @nivo/bump chart is missing properties HOT 4
- Nivo calendar zero value color
- Add Repobeats (metrics) to README
- Pie Chart tooltip not showing HOT 1
- @nivo/sankey turn off node legend text and custom nodes HOT 6
- isInteractive hover functionality stops working when using `cellComponent` prop for a custom cell HOT 1
- Nivo unable to SSR with Next 13+ HOT 6
- Documentation Missing the Most Basic Info: How to Get Started
- Line Chart Sample Missing
- Colors Documentation Page Doesn't Explain Custom Colors HOT 1
- Line Graph - Cannot read from undefined property (reading 'x') when useMesh is enabled.
- <Line> type definition does not include <Container> properties
- Add Support for Independent Axis Label Styling in @nivo/heatmap via theme.axis Configuration
- ChoroplethCanvas: Failed prop type / required properties (v0.87.0)
- @nivo/Sankey enableLinkGradient not supported in Safari Desktop, and all browsers on mobile HOT 1
- X property is not correctly set for ticks when using custom `tickValues` for the bottom axis HOT 2
- Fix tooltip context and position on click
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nivo.