arrow_back React app with Apollo + GraphQL
D3.js with React
Submitted by john venigalla (@johnvenigalla) on Monday, 26 February 2018
D3.js (data driven documents) is dynamic data visuvalization libarary based on SVG,Canvas,html. one can create data visvalizations from basic charts to complex diagrams using out of the box functions it provides. in words of mike bostock(one of the creator of d3)”D3 allows you to bind arbitrary data to a Document Object Model (DOM), and then apply data-driven transformations to the document. For example, you can use D3 to generate an HTML table from an array of numbers. Or, use the same data to create an interactive SVG bar chart with smooth transitions and interaction”.
React is a high performance driven dynamic UI library.React makes it painless to create interactive UIs. with out worrying about DOM mutations. React keeps a copy DOM as Virtual Dom and on change copmutes a minimal set of dom tree mutations to update the dom.
Each of the libarary’s have their own sterengths, one is good at calucaltions, animations with graphics. the other with high performance and solid state management with batch updates to dom.
Now how do we combine these two libararys such that we get max out of individual strengths.
some challenges we see stright away is both library’s need dom extensively to create UI’s. One is good with transitions and transformations of data the other with state management & performace how to combine both what are the tradeoff’s
Key Take aways.
a. what is d3.js how does it work? what problems does it solve ? b. what are its major strengths and weaknesses. c. what is React how does it work? what problems does it solve? strengths & weakness d. Approach’s to combine both to to get maximum out of respective strengths.
what is d3.js
how does it work update pattern strengths of d3 what is react
how does it work React strengths Challenges of integrating d3 and React
how to overcome the challenges
Handover approach. Respective strengths. Final conclusions.
hi this is john iam a front-end/dataviz developer at aline-consulting. i have been working on d3 & react since past year and half.