Skip to main content
100%

Fork of Fork of Fork of ICE-6: Rendering Marks and Channels (Bar Chart)

✓ Published0🌍 Public

This example visualizes the 2022 populations of movies in the "RICH" dataset as a bar chart using React and D3.js. The chart displays each movie’s runtime as a vertical bar, with movie names on the x-axis and runtime values on the y-axis. The code uses `d3.scaleBand` for the categorical x-axis, `d3.scaleLinear` for the continuous y-axis, and `d3.csv` to load data from a remote CSV file. SVG elements render the bars, axis ticks, and gridlines, with margins and dimensions explicitly defined. React’s `useState` and `useEffect` hooks manage asynchronous data fetching and re-rendering.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes