Skip to main content
100%

customizing axis

✓ Published1🌍 Public
RRemy-dev
Last edited Jan 14, 2022
Created on Jan 14, 2022
Forked from Making a Bar char

This example displays a horizontal bar chart of the top 10 most populous countries, with population values on the x-axis and country names on the y-axis. Using D3.v7, the code loads data from a CSV file and scales it by 1,000. It customizes the axes by removing the y-axis domain and tick lines, applying a custom tick formatter that converts values from G to B (billions), and styling grid lines and axis labels via CSS. The chart is rendered as SVG within a React-like setup, though the implementation uses direct DOM selection and appending.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

This bar chart shows population of the top 20 most populous countries

MIT Licensed

Similar vizzes