Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axis

Public visualization

Customizing Axis

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed