Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Countries table

Public visualization

Viewing a saved revision (read-only)

461da447849743a49f15fea423e0e9b2

Countries table

0 stars0🌍 Public
Tthakurnikhitha4@gmail.com
Last edited Apr 26, 2024
Created on Apr 26, 2024
Forked from Hello VizHub

This bar chart displays the top 30 countries by land area, using a horizontal layout where each bar’s length corresponds to the country’s area in square kilometers. The visualization is rendered as an SVG using React and D3 v5, with data loaded from a CSV file via `d3.csv`. It employs `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the quantitative x-axis, while custom React components (`AxisBottom`, `AxisLeft`, `Marks`) draw the axes and rectangles. Tooltips show formatted area values, and axis tick labels are formatted using `d3.format`. The chart also includes a blue x-axis gridline and a labeled “LANDAREA” axis title.

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.