BarChar - Religioni + Color Legend
✓ Published0🌍 Public
This example shows the top 10 most populated countries with horizontal bars, where each bar’s length represents the total population (in billions) and the y-axis orders countries categorically. The chart uses a color legend in the form of steelblue rectangles, and the visualization reads from a CSV file containing country, religion, and population data. Built with D3 v5, it applies `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisBottom` with custom tick formatting to display populations in compact notation. The rendering uses SVG elements appended within a fixed-width `<svg>` container.
AI-generated descriptionMIT Licensed