Fork of refectored bar chart of stock market with react and d3
✓ Published0🌍 Public
Mmeghshah612
Last edited Feb 21, 2022
Created on Feb 21, 2022
This visualization displays the dividend yields of twelve companies as horizontal bars, with company names on the y-axis and dividend values on the x-axis. The React component fetches CSV data from a GitHub gist using `d3.csv`, then renders the chart as SVG. D3 scales (`scaleBand` and `scaleLinear`) position the bars, while separate React components (`AxisBottom`, `AxisLeft`, `Marks`) handle the axes and rectangular marks. The code leverages React's `useState` and `useEffect` hooks for data loading.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed