Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

D3 and React-Native

Does react-native support D3 library/npm modules like d3-select?

For me, it is throwing error - querySelectionAll(selection) undefined.

It is working fine on reactJS but not on react-native.

Please help.Totally Stuck.

like image 598
user3559569 Avatar asked Apr 20 '18 20:04

user3559569


People also ask

Can I use D3 With react native?

D3. js is the best, most powerful tool we have in React-Native (and maybe even all mobile development) for creating charts and data visualizations 📈.

Is D3 compatible with React?

Developers can now take their existing D3 code and use React-D3-Library to create React components.

Is D3 js still relevant?

The JavaScript ecosystem has completely changed during this time, in terms of libraries, best practices and even language features. Nevertheless, D3 is still here. And it's more popular than ever.


2 Answers

Check this out: https://hswolff.com/blog/react-native-art-and-d3/

Basically you can use ART (of react-native) and D3 together to create lovely graphs. I'm not sure exactly what the limitations are, but it seems like the best option for now.

like image 125
liquidpenguins Avatar answered Sep 21 '22 21:09

liquidpenguins


npm install d3 —-save , npm install d3-shape —-save and npm install art —-save

These are 3 packages for making D3 shapes and utilizing them. Here in this article, writer uses these packages.

like image 29
Amir Gorji Avatar answered Sep 19 '22 21:09

Amir Gorji