Skip to main content
100%

Waffles

✓ Published0🌍 Public
PPatrick Wojda
Last edited Jan 17, 2020
Created on May 16, 2018

Three waffle charts compare party percentages, each rendered as a 10-by-10 grid of 100 squares, with filled cells in party colors (steelblue, red, green) and unfilled cells in gray. Each chart labels its party and value, such as “M 72%,” using d3 v4 selections to append SVG `<rect>` elements and `<text>` labels. The code derives square positions via nested `for` loops and applies CSS classes for coloring, with the source data hardcoded in a `scores` array.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes