Skip to main content
100%

Customizing Axis

✓ Published0🌍 Public
RRenato Francia Castillo
Last edited Oct 29, 2018
Created on Oct 29, 2018
Forked from Making a Bar Chart

This example shows a horizontal bar chart of population data for ten countries, with a customized axis layout using margins to position the labels and tick marks. The visualization uses D3 v5 with an SVG rendering approach, importing `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` from the D3 library. Population values from the CSV file are multiplied by 1000 before being mapped to the x-axis scale, while country names are mapped to the y-axis band scale. The chart displays the data as steelblue rectangles, with the bottom axis explicitly translated to the inner chart height.

AI-generated description
MIT Licensed

Similar vizzes