Skip to main content
100%

Arc Corners II

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Dec 29, 2015

This example demonstrates the `cornerRadius` option for D3’s arc generator, which rounds the corners of pie-slice shapes. Seven arcs, sized by Fibonacci numbers, are drawn in translucent colors over a white stroke on a Canvas. The code uses `d3.pie()` to compute angles, `d3.arc()` with `cornerRadius` to generate paths, and the Canvas 2D API (`context.fill`, `stroke`) for rendering. A second pass overlays small circles at each corner to highlight the rounded geometry.

AI-generated description

A demonstration of arc.cornerRadius.

gpl-3.0 Licensed

Similar vizzes