Basic Bar Chart
✓ Published0🌍 Public
This example displays a horizontal bar chart comparing the populations of ten countries, with bars extending from a shared baseline. The visualization maps each country’s population to bar length using D3’s `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis. It reads the data from a CSV file, multiplies each population value by 1000, and renders the SVG elements with `axisLeft`, `axisBottom`, and appended `rect` shapes. The chart uses a steelblue fill for the bars.
AI-generated descriptionMIT Licensed