Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customise Axis

Public visualization

Viewing a saved revision (read-only)

b82f4242c66d4d3998f21f41ac1f7127

Customise Axis

0 stars0🌍 Public
Kkrishv2
Last edited Jun 19, 2020
Created on Jun 19, 2020
Forked from Hello VizHub

This example displays population data for ten countries using both horizontal and vertical bar charts. The horizontal chart shows countries on the y-axis and population on the x-axis, while the vertical chart reverses these roles. Using d3.scaleLinear, d3.scaleBand, and d3.axisBottom/axisLeft, the code renders SVG rectangles styled in steelblue and red, with population values formatted using d3.format. The data is loaded from a CSV file and multiplied by 1000 before rendering.

AI-generated description

Horizontal and verical bar charts