Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
TThomas Nield
Last edited Nov 24, 2019
Created on Nov 24, 2019
Forked from Hello VizHub

This example demonstrates how to customize D3 axes by rendering a horizontal bar chart of country populations as a CSV dataset. The visualization uses `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis, mapping population values to bar widths and country names to vertical positions. Bars are drawn as SVG `rect` elements, with the band scale’s `bandwidth` method determining each bar’s height. The code applies a dark blue background and the Ubuntu font via CSS.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes