Examples · A radial area generator is like the Cartesian area generator except the x and y accessors are replaced with angle and radius accessors. Radial areas are positioned relative to the origin; use a transform to change the origin.

Source · Constructs a new radial area generator with the default settings.

js
``const area = d3.areaRadial();``

Source · Equivalent to area.

js
``svg.append("path").attr("d", area(data));``

Source · Equivalent to area.x, except the accessor returns the angle in radians, with 0 at -y (12 o’clock).

js
``const area = d3.areaRadial().angle((d) => a(d.Date));``

Source · Equivalent to area.x0, except the accessor returns the angle in radians, with 0 at -y (12 o’clock). Note: typically angle is used instead of setting separate start and end angles.

Source · Equivalent to area.x1, except the accessor returns the angle in radians, with 0 at -y (12 o’clock). Note: typically angle is used instead of setting separate start and end angles.

Source · Equivalent to area.y, except the accessor returns the radius: the distance from the origin.

js
``const area = d3.areaRadial().radius((d) => r(d.temperature));``

Source · Equivalent to area.y0, except the accessor returns the radius: the distance from the origin.

js
``const area = d3.areaRadial().radius((d) => r(d.low));``

Source · Equivalent to area.y1, except the accessor returns the radius: the distance from the origin.

js
``const area = d3.areaRadial().radius((d) => r(d.high));``

Source · Equivalent to area.defined.

js
``const area = d3.areaRadial().defined((d) => !isNaN(d.temperature));``

Source · Equivalent to area.curve. Note that curveMonotoneX or curveMonotoneY are not recommended for radial areas because they assume that the data is monotonic in x or y, which is typically untrue of radial areas.

js
``const area = d3.areaRadial().curve(d3.curveBasisClosed);``

Source · Equivalent to area.context.

js
``````const context = canvas.getContext("2d");

Source · Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s inner radius accessor.