Skip to main content
100%

Fork of Fork of Fork of React & D3 Starter

✓ Published1🌍 Public
Ppvvaishnavi93@gmail.com
Last edited Mar 4, 2026
Created on Mar 4, 2026

This bar chart displays the average calories for each fast-food restaurant, using a dataset of individual menu items with their nutritional information. The visualization is rendered as an SVG using the D3.js v7 library. The code loads the CSV data, groups it by restaurant, and computes the mean calorie value for each. It then applies `d3.scaleBand` for the categorical x-axis and `d3.scaleLinear` for the numeric y-axis, drawing bars via appended `rect` elements. Axes are generated with `d3.axisBottom` and `d3.axisLeft`, and the x-axis labels are rotated for readability.

AI-generated description
MIT Licensed

Similar vizzes