plouc / nivo

nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
https://nivo.rocks
MIT License
13.08k stars 1.02k forks source link

Network - error w/ annotations #1343

Closed outspokeio closed 3 years ago

outspokeio commented 3 years ago

Describe/explain the bug When adding a ResponsiveNetwork (or other Network) component, receiving error "TypeError: Cannot read property 'map' of undefined" at hooks.js - in useComputedAnnotation(). If I remove the Network component, all other nivo components render fine.

image

image

image

image

Desktop (please complete the following information):

Additional context Have tried updating and reverting version types btwn 0.66.0 and 0.67.0 along with peerDependencies, etc. All other charts work in same environment with same patterns.

peterampazzo commented 3 years ago

I experienced the same issue (#1332) - you should pass the data to node and links 😄

wyze commented 3 years ago

Duplicate #1332. You should spread devData, ({...devData}), into the component or pass nodes and links separately.

We need to update the website do display this properly.

outspokeio commented 3 years ago

@peterampazzo @wyze Thank you both. I appreciate the support & apologize for not seeing the duplicate. Really thought I did my diligence but it appears I did not!

Again - thanks for your time.