Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of refectored bar chart of stock market with react and d3

Public visualization

Viewing a saved revision (read-only)

5a3137d2807d48548ecf3042d49c5122

Fork of refectored bar chart of stock market with react and d3

0 stars0🌍 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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.