Customizing Axes
This example shows the loss of forest area in Morocco across years as a horizontal bar chart, with each bar representing a year and its length corresponding to the area lost in hectares. The visualization uses D3 v5 APIs including `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to customize tick formatting with `format('.3s')` and remove default domain lines for a cleaner look. Data is loaded from a CSV file and rendered as SVG, with labels for the title and x-axis provided in French.
AI-generated descriptionThis bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.
See also the first bar chart visualization that this one builds on: Making a Bar Chart.