Skip to main content
100%

ICE-7 line chart

✓ Published0🌍 Public
UUday Kiran
Last edited Apr 1, 2025
Created on Apr 1, 2025

This line chart displays the price (USD) of grocery items from an ICE-6 CSV dataset, using D3.js v7 with SVG rendering. It maps item names on the x-axis and price values on the y-axis, scaling the linear y-axis with `d3.scaleLinear` and `d3.max` for the domain. A categorical band scale (`d3.scaleBand`) positions items, and x-axis labels appear at the band centers. The chart is created by loading external CSV data via `d3.csv`, parsing numeric columns, and generating a path with `d3.line` while adding axes and labels through `d3.axisBottom`, `d3.axisLeft`, and SVG text elements.

AI-generated description
MIT Licensed

Similar vizzes