Skip to content

Commit 07b3e05

Browse files
committed
update README
1 parent 9814fb4 commit 07b3e05

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -573,15 +573,15 @@ Returns a new area with the given *data* and *options*. Plot.area is rarely used
573573
Plot.areaX(aapl, {y: "Date", x: "Close"})
574574
```
575575

576-
Returns a new area with the given *data* and *options*. This constructor is used when the baseline and topline share *y* values, as in a time-series area chart where time goes up↑. If neither the **x1** nor **x2** option is specified, the **x** option may be specified as shorthand to apply an implicit [stackX transform](#plotstackxoptions); this is the typical configuration for an area chart with a baseline at *x* = 0. If the **x** option is not specified, it defaults to the identity function. The **y** option specifies the **y1** channel; and the **y1** and **y2** options are ignored.
576+
Returns a new area with the given *data* and *options*. This constructor is used when the baseline and topline share *y* values, as in a time-series area chart where time goes up↑. If neither the **x1** nor **x2** option is specified, the **x** option may be specified as shorthand to apply an implicit [stackX transform](#plotstackxoptions-inputs); this is the typical configuration for an area chart with a baseline at *x* = 0. If the **x** option is not specified, it defaults to the identity function. The **y** option specifies the **y1** channel; and the **y1** and **y2** options are ignored.
577577

578578
#### Plot.areaY(*data*, *options*)
579579

580580
```js
581581
Plot.areaY(aapl, {x: "Date", y: "Close"})
582582
```
583583

584-
Returns a new area with the given *data* and *options*. This constructor is used when the baseline and topline share *x* values, as in a time-series area chart where time goes right→. If neither the **y1** nor **y2** option is specified, the **y** option may be specified as shorthand to apply an implicit [stackY transform](#plotstackyoptions); this is the typical configuration for an area chart with a baseline at *y* = 0. If the **y** option is not specified, it defaults to the identity function. The **x** option specifies the **x1** channel; and the **x1** and **x2** options are ignored.
584+
Returns a new area with the given *data* and *options*. This constructor is used when the baseline and topline share *x* values, as in a time-series area chart where time goes right→. If neither the **y1** nor **y2** option is specified, the **y** option may be specified as shorthand to apply an implicit [stackY transform](#plotstackyoptions-inputs); this is the typical configuration for an area chart with a baseline at *y* = 0. If the **y** option is not specified, it defaults to the identity function. The **x** option specifies the **x1** channel; and the **x1** and **x2** options are ignored.
585585

586586
### Bar
587587

@@ -602,7 +602,7 @@ Returns a new horizontal bar↔︎ with the given *data* and *options*. The foll
602602
* **x1** - the starting horizontal position; bound to the *x* scale
603603
* **x2** - the ending horizontal position; bound to the *x* scale
604604

605-
If neither the **x1** nor **x2** option is specified, the **x** option may be specified as shorthand to apply an implicit [stackX transform](#plotstackxoptions); this is the typical configuration for a horizontal bar chart with bars aligned at *x* = 0. If the **x** option is not specified, it defaults to the identity function.
605+
If neither the **x1** nor **x2** option is specified, the **x** option may be specified as shorthand to apply an implicit [stackX transform](#plotstackxoptions-inputs); this is the typical configuration for a horizontal bar chart with bars aligned at *x* = 0. If the **x** option is not specified, it defaults to the identity function.
606606

607607
In addition to the [standard bar channels](#bar), the following optional channels are supported:
608608

@@ -621,7 +621,7 @@ Returns a new vertical bar↕︎ with the given *data* and *options*. The follow
621621
* **y1** - the starting vertical position; bound to the *y* scale
622622
* **y2** - the ending vertical position; bound to the *y* scale
623623

624-
If neither the **y1** nor **y2** option is specified, the **y** option may be specified as shorthand to apply an implicit [stackY transform](#plotstackyoptions); this is the typical configuration for a vertical bar chart with bars aligned at *y* = 0. If the **y** option is not specified, it defaults to the identity function.
624+
If neither the **y1** nor **y2** option is specified, the **y** option may be specified as shorthand to apply an implicit [stackY transform](#plotstackyoptions-inputs); this is the typical configuration for a vertical bar chart with bars aligned at *y* = 0. If the **y** option is not specified, it defaults to the identity function.
625625

626626
In addition to the [standard bar channels](#bar), the following optional channels are supported:
627627

@@ -811,15 +811,15 @@ Returns a new rect with the given *data* and *options*.
811811
Plot.rectX(athletes, Plot.binY({x: "count"}, {y: "weight"}))
812812
```
813813

814-
Equivalent to [Plot.rect](#plotrectdata-options), except that if neither the **x1** nor **x2** option is specified, the **x** option may be specified as shorthand to apply an implicit [stackX transform](#plotstackxoptions); this is the typical configuration for a histogram with rects aligned at *x* = 0. If the **x** option is not specified, it defaults to the identity function.
814+
Equivalent to [Plot.rect](#plotrectdata-options), except that if neither the **x1** nor **x2** option is specified, the **x** option may be specified as shorthand to apply an implicit [stackX transform](#plotstackxoptions-inputs); this is the typical configuration for a histogram with rects aligned at *x* = 0. If the **x** option is not specified, it defaults to the identity function.
815815

816816
#### Plot.rectY(*data*, *options*)
817817

818818
```js
819819
Plot.rectY(athletes, Plot.binX({y: "count"}, {x: "weight"}))
820820
```
821821

822-
Equivalent to [Plot.rect](#plotrectdata-options), except that if neither the **y1** nor **y2** option is specified, the **y** option may be specified as shorthand to apply an implicit [stackY transform](#plotstackyoptions); this is the typical configuration for a histogram with rects aligned at *y* = 0. If the **y** option is not specified, it defaults to the identity function.
822+
Equivalent to [Plot.rect](#plotrectdata-options), except that if neither the **y1** nor **y2** option is specified, the **y** option may be specified as shorthand to apply an implicit [stackY transform](#plotstackyoptions-inputs); this is the typical configuration for a histogram with rects aligned at *y* = 0. If the **y** option is not specified, it defaults to the identity function.
823823

824824
### Rule
825825

@@ -1439,53 +1439,53 @@ In addition to the **y1** and **y2** output channels, Plot.stackY computers a **
14391439

14401440
If two arguments are passed to the stack transform functions below, the stack-specific options (**offset**, **order**, and **reverse**) are pulled exclusively from the first *options* argument, while any channels (*e.g.*, **x**, **y**, and **z**) are pulled from second *options* argument. Options from the second argument that are not consumed by the stack transform will be passed through. Using two arguments is sometimes necessary is disambiguate the option recipient when chaining transforms.
14411441

1442-
#### Plot.stackY(*options*)
1442+
#### Plot.stackY([*options*, ]*inputs*)
14431443

14441444
```js
14451445
Plot.stackY({x: "year", y: "revenue", z: "format", fill: "group"})
14461446
```
14471447

1448-
Creates new channels **y1** and **y2**, obtained by stacking the original **y** channel for data points that share a common **x** (and possibly **z**) value. A new **y** channel is also returned, which lazily computes the middle value of **y1** and **y2**. The input **y** channel defaults to a constant 1, resulting in a count of the data points.
1448+
Creates new channels **y1** and **y2**, obtained by stacking the original **y** channel for data points that share a common **x** (and possibly **z**) value. A new **y** channel is also returned, which lazily computes the middle value of **y1** and **y2**. The input **y** channel defaults to a constant 1, resulting in a count of the data points. The stack options (*offset*, *order*, and *reverse*) may be specified as part of the *inputs* or as a separate *options* argument.
14491449

1450-
#### Plot.stackY1(*options*)
1450+
#### Plot.stackY1([*options*, ]*inputs*)
14511451

14521452
```js
14531453
Plot.stackY1({x: "year", y: "revenue", z: "format", fill: "group"})
14541454
```
14551455

1456-
Equivalent to [Plot.stackY](#plotstackyoptions), except that the **y1** channel is returned as the **y** channel. This can be used, for example, to draw a line at the bottom of each stacked area.
1456+
Equivalent to [Plot.stackY](#plotstackyoptions-inputs), except that the **y1** channel is returned as the **y** channel. This can be used, for example, to draw a line at the bottom of each stacked area.
14571457

1458-
#### Plot.stackY2(*options*)
1458+
#### Plot.stackY2([*options*, ]*inputs*)
14591459

14601460
```js
14611461
Plot.stackY2({x: "year", y: "revenue", z: "format", fill: "group"})
14621462
```
14631463

1464-
Equivalent to [Plot.stackY](#plotstackyoptions), except that the **y2** channel is returned as the **y** channel. This can be used, for example, to draw a line at the top of each stacked area.
1464+
Equivalent to [Plot.stackY](#plotstackyoptions-inputs), except that the **y2** channel is returned as the **y** channel. This can be used, for example, to draw a line at the top of each stacked area.
14651465

1466-
#### Plot.stackX(*options*)
1466+
#### Plot.stackX([*options*, ]*inputs*)
14671467

14681468
```js
14691469
Plot.stackX({y: "year", x: "revenue", z: "format", fill: "group"})
14701470
```
14711471

14721472
See Plot.stackY, but with *x* as the input value channel, *y* as the stack index, *x1*, *x2* and *x* as the output channels.
14731473

1474-
#### Plot.stackX1(*options*)
1474+
#### Plot.stackX1([*options*, ]*inputs*)
14751475

14761476
```js
14771477
Plot.stackX1({y: "year", x: "revenue", z: "format", fill: "group"})
14781478
```
14791479

1480-
Equivalent to [Plot.stackX](#plotstackxoptions), except that the **x1** channel is returned as the **x** channel. This can be used, for example, to draw a line at the left edge of each stacked area.
1480+
Equivalent to [Plot.stackX](#plotstackxoptions-inputs), except that the **x1** channel is returned as the **x** channel. This can be used, for example, to draw a line at the left edge of each stacked area.
14811481

1482-
#### Plot.stackX2(*options*)
1482+
#### Plot.stackX2([*options*, ]*inputs*)
14831483

14841484
```js
14851485
Plot.stackX2({y: "year", x: "revenue", z: "format", fill: "group"})
14861486
```
14871487

1488-
Equivalent to [Plot.stackX](#plotstackxoptions), except that the **x2** channel is returned as the **x** channel. This can be used, for example, to draw a line at the right edge of each stacked area.
1488+
Equivalent to [Plot.stackX](#plotstackxoptions-inputs), except that the **x2** channel is returned as the **x** channel. This can be used, for example, to draw a line at the right edge of each stacked area.
14891489

14901490
## Curves
14911491

0 commit comments

Comments
 (0)