Making a Bar Chart
✓ Published0🌍 Public
This example shows a horizontal bar chart ranking API endpoints by hit count, with values from a CSV file rendered as steel-blue rectangles. The chart is built using D3 v5, with `d3.csv` loading the data and `d3.scaleLinear` and `d3.scaleBand` positioning the bars. Axis labels are generated via `d3.axisLeft` and `d3.axisBottom`, and the SVG output is styled with CSS. The bars extend horizontally from the left margin, and the chart uses a fixed 960×500 pixel canvas.
AI-generated descriptionMIT Licensed