Skip to main content
100%

Sai Nikitha ICE 6

✓ Published0🌍 Public
NNikitha123171
Last edited Mar 11, 2023
Created on Mar 11, 2023
Forked from D3 Starter

This visualization displays a horizontal bar chart comparing the cost of living index for fifteen countries, sourced from a CSV file loaded via d3.csv. The chart uses React with useState and useEffect to fetch and render the data as SVG rectangles, with scales created using d3.scaleBand and d3.scaleLinear. Axes are manually constructed by mapping tick values to text and line elements, without using d3.axisBottom or d3.axisLeft. The bars’ widths are proportional to each country’s index value, and the chart includes explicit margins and a black gridline for each x-axis tick.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes