ICE-6:
✓ Published0🌍 Public
NNaveed945
Last edited Jun 25, 2022
Created on Jun 25, 2022
This visualization displays the profit for the top 12 grocery products using a horizontal bar chart rendered as SVG through React. The code uses React hooks (useState, useEffect, useCallback) to load CSV data via d3.csv, then constructs scales with d3.scaleBand and d3.scaleLinear to map product names and profit values. Profit bars are drawn as SVG rect elements, with gridlines and tick labels generated manually from scale ticks. The data comes from a GitHub-hosted Grocery.csv file, and the chart title appears above the visualization.
AI-generated descriptionA whole smiley face
MIT Licensed