Skip to main content
100%

task_1 sekhar

✓ Published0🌍 Public
SSekharofficial2022@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

This example displays a horizontal bar chart of 2020 population data for 30 countries, with country names on the y-axis and population on the x-axis. The visualization uses React with D3 v5, employing `scaleBand` and `scaleLinear` for positioning, while `AxisBottom`, `AxisLeft`, and `Marks` components render the SVG elements. Population values are parsed from a CSV file using `d3.csv` and formatted with `d3.format` to abbreviate large numbers (e.g., "1.2B"). The chart includes custom tick styling and a labeled x-axis; hovering over a bar triggers a native tooltip showing the formatted population value.

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.
MIT Licensed

Similar vizzes