🌍 Public
Viewing a saved revision (read-only)
22ccf2e7f79c4d5eb43b3435b4e9932d
Making a bar chart
This example demonstrates a basic bar chart of country populations, with each country represented by a fixed-size rectangle positioned sequentially from the top-left of the SVG canvas. The code loads population data from a CSV file using `d3.csv`, converts the population values to numbers by multiplying them by 1000, and renders the rectangles with `d3.select` and `selection.append`. While the bars are currently all the same width and height, the example illustrates the core pattern of binding data to SVG elements in D3 v5.
AI-generated descriptionAn example showing the capabilities of VizHub.