Skip to content

Commit

Permalink
more version badges
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 5, 2023
1 parent 72831bb commit 0de63df
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/features/shorthand.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const gene = "AAAAGAGTGAAGATGCTGGAGACGAGTGAAGCATTCACTTTAGGGAAAGCGAGGCAAGAGCGTTTC

</script>

# Shorthand
# Shorthand <VersionBadge version="0.4.2" />

The most concise form of Plot is its **shorthand** syntax where no options are specified — only data. To use this shorthand, the data must have a specific structure: either a one-dimensional array of values [*v₀*, *v₁*, *v₂*, …] or a two-dimensional array of tuples [[*x₀*, *y₀*], [*x₁*, *y₁*], [*x₂*, *y₂*], …].

Expand Down
6 changes: 3 additions & 3 deletions docs/features/transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ You can specify a custom initializer by specifying a function as the mark **init

If an initializer desires a channel that is not supported by the downstream mark, additional channels can be declared using the mark **channels** option.

## transform(*options*, *transform*) {#transform}
## transform(*options*, *transform*) <VersionBadge version="0.4.3" /> {#transform}

```js
Plot.transform(options, (data, facets) => {
Expand All @@ -203,7 +203,7 @@ Plot.transform(options, (data, facets) => {
```
Given an *options* object that may specify some basic transforms (**filter**, **sort**, or **reverse**) or a custom **transform** function, composes those transforms if any with the given *transform* function, returning a new *options* object. If a custom **transform** function is present on the given *options*, any basic transforms are ignored. Any additional input *options* are passed through in the returned *options* object. This method facilitates applying the basic transforms prior to applying the given custom *transform* and is used internally by Plot’s built-in transforms.

## initializer(*options*, *initializer*) {#initializer}
## initializer(*options*, *initializer*) <VersionBadge version="0.5.0" /> {#initializer}

This helper composes the *initializer* function with any other transforms present in the *options*, and returns a new *options* object. It is used internally by Plot’s built-in initializer transforms.

Expand All @@ -226,7 +226,7 @@ If *type* is specified, it must be Array or a similar class that implements the

valueof is not guaranteed to return a new array. When a transform method is used, or when the given *value* is an array that is compatible with the requested *type*, the array may be returned as-is without making a copy.

## column(*source*) {#column}
## column(*source*) <VersionBadge version="0.4.3" /> {#column}

```js
const [X, setX] = Plot.column();
Expand Down
2 changes: 1 addition & 1 deletion docs/marks/hexgrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import penguins from "../data/penguins.ts";

</script>

# Hexgrid mark
# Hexgrid mark <VersionBadge version="0.5.0" />

The **hexgrid mark** draws a hexagonal grid spanning the frame. It can be used with the [hexbin transform](../transforms/hexbin.md) to show how points are binned. The **binWidth** option specifies the distance between centers of neighboring hexagons in pixels; it defaults to 20, matching the hexbin transform.

Expand Down
2 changes: 1 addition & 1 deletion docs/transforms/normalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ The **basis** option specifies how to normalize the series values; it is one of:
* a function to be passed an array of values, returning the desired basis
* a function to be passed an index and channel value array, returning the desired basis

## normalize(*basis*) {#normalize}
## normalize(*basis*) <VersionBadge version="0.2.3" /> {#normalize}

```js
Plot.map({y: Plot.normalize("first")}, {x: "Date", y: "Close", stroke: "Symbol"})
Expand Down
2 changes: 1 addition & 1 deletion docs/transforms/window.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ The following named reducers are supported:

A reducer may also be specified as a function to be passed an index of size **k** and the corresponding input channel array; or if the function only takes one argument, an array of **k** values.

## window(*k*) {#window}
## window(*k*) <VersionBadge version="0.2.3" /> {#window}

```js
Plot.map({y: Plot.window(24)}, {x: "Date", y: "Close", stroke: "Symbol"})
Expand Down

0 comments on commit 0de63df

Please sign in to comment.