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)
- Customizing Area Bump Chart Colors Based on Ending Date in Data Series HOT 1
- Add new word cloud component HOT 1
- 0.85.1 of @nivo/bar breaks tooltips that use position: fixed style HOT 4
- [Boxplot] Horizontal -> Vertical mode transition does not work
- Add support for hierarchy/dendrograms. HOT 1
- Add Icons as Labels HOT 1
- BarChart setting enableTotals not working HOT 6
- X gridlines extend past the bottom of the chart into tick labels HOT 3
- Infinite renders with custom legend HOT 3
- Additional Color Scale Options in Nivo Choropleth
- Bar Component: TypeError: Axes is not a function - When using ES module (@nivo/bar/dist/nivo-bar.es.js) HOT 2
- [@nivo/bar v.0.86.0] React warning about unique key prop when using bar totals
- [Bar] Option to decide label position HOT 2
- The prop `defs` is marked as required in `Ge2`, but its value is `undefined HOT 4
- Warning: A props object containing a "key prop is being spread into JSX:
- Error t.useMemo using React 16.14.0 HOT 3
- The size of the SVG does not adapt to the size of the graph HOT 2
- Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' HOT 1
- π©Custom Legend causes infinite re-render! π© HOT 1
- Nivo Bar Chart: Incorrect Decimal Rounding in Labels
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.