Skip to main content
100%

Food Production Stacked Bar Chart

✓ Published3🌍 Public
Llrsavoie@wpi.edu
Last edited Apr 30, 2024
Created on Apr 24, 2024

A stacked bar chart visualizes estimated food production across seven continents for 2021, with each bar segmented by food type in millions of tonnes. Hovering over a legend item highlights the corresponding segment and fades others, while the matching bar segment is raised with a black stroke. Built with D3.js v7, the example uses `d3.stack`, `scaleOrdinal` with `schemeCategory10`, and `flatRollup` to transform data from the world food production dataset.

AI-generated description

Stacked bars showing estimated food production breakdown of the continents. Based on an example from the tutorial

https://www.kaggle.com/datasets/rafsunahmad/world-food-production

https://raw.githubusercontent.com/lukesavoie/dataviz/main/world%20food%20production.csv loaded and parsed as CSV.

MIT Licensed

Similar vizzes