Loop over JSON data to create d3 pie charts
问题 I've succeeded in creating my first pie chart with d3 and JSON, but I'm struggling to get more than one pie chart to appear. I've reviewed numerous examples, including Mike Bostock's donut-multiples, and it appears I need a for-each loop in my code. Here's a simplified version of my program which produces one pie chart instead of two: <!doctype html> <html> <head> <title>Pie Chart Test</title> <meta charset="UTF-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"><