Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

STACKBAR Group Colours

Public visualization

Viewing a saved revision (read-only)

f591888e4b9743cf92a7887db3f1fa72

STACKBAR Group Colours

0 stars1🌍 Public
JJimMaltby
Last edited Nov 23, 2020
Created on Nov 20, 2020

This stacked bar chart displays animal categories across four quantitative segments (A, B, C, D), with each bar colored by a group such as Domestic, Pest, Africa, or Marine. The visualization uses D3 v5 with SVG rendering to create horizontal stacked bars, where the length of each segment corresponds to its value. The code employs d3.stack(), d3.scaleBand(), d3.scaleLinear(), and d3.scaleOrdinal() to process the CSV data and assign differential shading based on animal group membership, producing a color-coded breakdown of totals across species.

AI-generated description

Simplified Stack bar for colouring bars by different groups V5 http://bl.ocks.org/JimMaltby/844ca313589e488b249b86ead0d621a9