Rendering Marks and Channels with React & D3
✓ Published0🌍 Public
Ssrivalliwuyyuru
Last edited Jun 24, 2022
Created on Jun 24, 2022
This example shows the top 10 films by category and sales from a Superstore dataset, rendered as a horizontal bar chart using React and D3. It loads CSV data from a GitHub gist and maps sales values to bar widths via `d3.scaleLinear`, with categories positioned by `d3.scaleBand`. The SVG output marks axes with `scaleBand.ticks` and renders each bar as a `rect` element created through React components. The chart updates dynamically when the data loads, demonstrating a hybrid approach where React manages the DOM while D3 handles scales and data parsing.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed