Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept iterables. #153

Merged
merged 18 commits into from
Aug 19, 2020
Prev Previous commit
Next Next commit
document shorthand notation and ES6
  • Loading branch information
Fil committed Jul 17, 2020
commit 4501d8728783658977ab3144ac20fe20d8363a77
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ var data = [
];

var area = d3.area()
.x(function(d) { return x(d.date); })
.y1(function(d) { return y(d.value); })
.x(d => x(d.date))
.y1(d => y(d.value))
.y0(y(0));
```

Expand Down Expand Up @@ -637,9 +637,7 @@ While [lines](#lines) are defined as a sequence of two-dimensional [*x*, *y*] po
Curves are typically not constructed or used directly, instead being passed to [*line*.curve](#line_curve) and [*area*.curve](#area_curve). For example:

```js
var line = d3.line()
.x(function(d) { return x(d.date); })
.y(function(d) { return y(d.value); })
var line = d3.line(d => d.date, d => d.value)
.curve(d3.curveCatmullRom.alpha(0.5));
```

Expand Down