Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
TTheRoadSign
Last edited Nov 25, 2019
Created on Nov 25, 2019

This example shows a simple bar chart of population data for eight countries, loaded from a CSV file. The chart renders as a single black square because the code only appends a rectangle for each data row and sets its width and height to 400 pixels, without scaling or positioning them. The implementation uses D3 v5’s `select` and `csv` functions to select the SVG element and parse the data, converting the population strings to numbers with `+d.population * 1000`.

AI-generated description
MIT Licensed

Similar vizzes