Making a Bar Chart
This example demonstrates a horizontal bar chart comparing the populations of ten countries, with China leading and Mexico trailing. The chart is built using D3 version 6’s `scaleLinear`, `scaleBand`, `axisBotom`, and `axisLeft` to position bars and ticks. Data is loaded from a JSON file via `d3.json`, with population values multiplied by 1000. Axis labels and a chart title are added as SVG text elements, styled via CSS classes.