Making a bar chart
✓ Published0🌍 Public
This example shows a horizontal bar chart of employee salaries from a CSV file, with each bar’s length proportional to salary and labeled by first name. It uses d3.csv to load data, d3.scaleLinear and d3.scaleBand for positioning, and appends SVG rectangles. The chart omits axes and text labels, instead focusing on the core scaling and data-binding workflow. Bars are styled steelblue via CSS, and the rendering is static SVG in a 960×500 viewport.
AI-generated descriptionMIT Licensed