final exam question 1
This example draws the flag of the Red Cross using D3. It shows a white square with a centered red cross, where the cross’s width equals 80% of the flag’s 400-pixel width. The code appends three SVG `rect` elements to an `svg` container: one for the white background and two overlapping red rectangles forming the cross’s horizontal and vertical bars. D3’s selection and `.attr` methods set coordinates and dimensions explicitly, while `.style` applies fill colors and a black stroke to the background. The rendering uses SVG within an HTML page.
AI-generated descriptionUsing D3, draw the flag of the Red Cross. As an example, look at the first flag here:
http://www.crwflags.com/fotw/flags/int-red.html#cross
Use an aspect ratio of 1:1, with a width and height of 400 pixels. The width of the cross should be 80% of the width of the flag. (15 points)
forked from <a href='http://bl.ocks.org/scresawn/'>scresawn</a>'s block: <a href='http://bl.ocks.org/scresawn/ac8dcde01f39b9525a1285cccd4bac2a'>final exam question 1</a>
forked from <a href='http://bl.ocks.org/anonymous/'>anonymous</a>'s block: <a href='http://bl.ocks.org/anonymous/3ebcb8084741076a01a07c98b7449644'>final exam question 1</a>