Skip to main content
100%

Charts Web Component

✓ Published0🌍 Public
AAlexCamp2112
Last edited Jul 26, 2021
Created on Jul 26, 2021
Forked from React Starter

This React web component renders a horizontal bar chart where a blue rectangle represents each data category, with the bar’s width proportional to its score value. The code defines the bars through D3’s `svg.selectAll`, `enter()`, and `.append("rect")` operations, while explicitly using `x`, `y`, `d3.scaleBand`, `d3.scaleLinear` (implied by the x/y domains) and `d3.axisBottom` for the time-scaled axes. The example includes commented-out D3 code for loading CSV data via `d3.csv`, though the active implementation relies on hard-coded data passed to React’s `ReactDOM.render`.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes