Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE-6 Bar chart SDV

Public visualization

Viewing a saved revision (read-only)

e18e4d6e478e4ca08e95d3f335d1bfc2

ICE-6 Bar chart SDV

0 stars0🌍 Public
Ssreeramyamini@gmail.com
Last edited Mar 20, 2024
Created on Mar 20, 2024

This bar chart displays the distribution of calories across different cereal brands, with each bar representing a specific cereal’s calorie count. The visualization uses D3.js v7 to load CSV data from a GitHub gist, parse the numeric calorie values, and render the chart as SVG. The code employs `d3.scaleBand` for the categorical x-axis and `d3.scaleLinear` for the continuous y-axis, with axes formatted via `d3.axisBottom` and `d3.axisLeft`. Cereal names on the x-axis are rotated for readability, while bar heights encode the calorie values directly. The chart’s layout and margins are defined programmatically, and error handling logs any data-loading issues.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.