source: node_modules/d3-shape/src/areaRadial.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 944 bytes
Line 
1import curveRadial, {curveRadialLinear} from "./curve/radial.js";
2import area from "./area.js";
3import {lineRadial} from "./lineRadial.js";
4
5export default function() {
6 var a = area().curve(curveRadialLinear),
7 c = a.curve,
8 x0 = a.lineX0,
9 x1 = a.lineX1,
10 y0 = a.lineY0,
11 y1 = a.lineY1;
12
13 a.angle = a.x, delete a.x;
14 a.startAngle = a.x0, delete a.x0;
15 a.endAngle = a.x1, delete a.x1;
16 a.radius = a.y, delete a.y;
17 a.innerRadius = a.y0, delete a.y0;
18 a.outerRadius = a.y1, delete a.y1;
19 a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;
20 a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;
21 a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;
22 a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;
23
24 a.curve = function(_) {
25 return arguments.length ? c(curveRadial(_)) : c()._curve;
26 };
27
28 return a;
29}
Note: See TracBrowser for help on using the repository browser.