ICE-6: Rendering Marks and Channels with React & D3
✓ Published0🌍 Public
This example displays a horizontal bar chart of the base salaries for the top 15 employee position titles from a CSV of U.S. salary data. The React component fetches the remote CSV with d3.csv, then uses d3.scaleBand and d3.scaleLinear to map position titles and salaries to SVG rectangles. The chart uses d3.axisBottom for the x-axis ticks and d3.format for tick labels. Data loading is handled with a useEffect hook, and the SVG is rendered directly within the React return statement.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed