Skip to main content
Public

Share visualization

Loading preview…

ICE-6 Bar Chart Cereals and their calories

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

ICE-6 Bar Chart Cereals and their calories

0
Ssreeramyamini@gmail.com
Last edited Mar 20, 2024
Created on Mar 20, 2024
Forked from Simple Bar Chart

This bar chart displays the calorie content of 77 cereals, using green vertical bars sorted by cereal name along the x-axis and calorie values on the y-axis. The visualization loads CSV data from a GitHub gist via d3.csv, then uses React hooks (useState, useEffect) to manage asynchronous data loading and rendering. The chart employs d3.scaleBand for categorical x-axis positioning, d3.scaleLinear for the continuous y-axis, and d3.max to compute the domain. SVG rendering occurs through React components, with rotated x-axis labels for readability and horizontal gridlines generated from y-axis ticks.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed