Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Customizing Axes

0 stars1🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed