Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing axes

Public visualization

Viewing a saved revision (read-only)

ebc8f59e3f3045598ef1a2ae30428cf6

Customizing axes

0 stars0🌍 Public
YYvan Brito
Last edited Jun 10, 2021
Created on May 27, 2021
Forked from Barchart

This example demonstrates how to customize chart axes in a horizontal bar chart showing the populations of the top ten most populous countries. It uses D3 version 5 to load data from a CSV file and render SVG graphics. The code applies custom tick formatting with `d3.format`, removes default axis domain lines and tick lines, and adds labels for the x-axis and chart title. The y-axis uses `d3.scaleBand`, while the x-axis uses `d3.scaleLinear`.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.