These are the code examples from my talk on Charts in React with D3.
- View the slides: http://bit.ly/2j1rcNZ
All of the examples are created using create-react-app and they upon the previous one to add more functionality.
Created from by https://bl.ocks.org/mbostock/3887235.
This implements the Pie Chart as a Component that renders the static DOM output from the D3 example.
2. pie-chart
This extends the Component to allow the data to be passed as props.
This extends the Component to resize when the window resizes.
Created from by https://bl.ocks.org/mbostock/22994cc97fefaeede0d861e6815a847e.
This implements the basic React version of the D3 chart.
This extends the chart to only allow circles to be dragged within the SVG.
This extends the application to store the circles state in Redux.
This extends the application to add undo and redo buttons.