question 1
✓ Published0🌍 Public
This example visualizes the population of ten countries in the year 2000 using horizontal bar marks. It loads data from a remote CSV via the d3.csv API within React, slicing the dataset to the first ten rows. The React implementation uses d3.scaleBand for the categorical y-axis and d3.scaleLinear for the quantitative x-axis, with SVG rectangles drawn through the Marks component. Rendered as an SVG, the chart includes labeled axes, a custom tick formatter that converts values to billions, and tooltips using SVG `<title>` elements.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed