ICE 6 - Rendering Marks and Channels with React & D3
✓ Published1🌍 Public
Ssenthilrajendran1
Last edited Mar 23, 2023
Created on Mar 23, 2023
This example visualizes the total victims of mass shootings in the top 30 U.S. states using a horizontal bar chart. Built with React and D3 v5, the SVG rendering maps each state to a band scale on the y-axis and a linear scale on the x-axis, encoding victim counts as bar widths. The code loads CSV data via `d3.csv`, applies `scaleBand` and `scaleLinear`, and manually renders axes and gridlines using `d3.axisBottom` and `d3.axisLeft` alternatives. State names are labeled alongside each bar, with tick marks drawn as blue lines.
AI-generated descriptionA bare minimum HTML page.
MIT Licensed