Skip to content

Commit

Permalink
Merge pull request #2454 from FormidableLabs/docs/typos
Browse files Browse the repository at this point in the history
Docs: fix typos and grammatical errors
  • Loading branch information
narinluangrath authored Sep 25, 2022
2 parents 149f399 + 12d27ae commit 80d64f4
Show file tree
Hide file tree
Showing 29 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Note that Chromatic internally runs `npm run build-storybook` around which we ha

We use [changesets](https://github.com/changesets/changesets) to create package versions and publish them.

### Using changsets
### Using changesets

Our official release path is to use automation to perform the actual publishing of our packages. The steps are to:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Projects using Victory should also depend on [React][]. Victory works with React

## Victory Native

Victory Native shares most of its code with Victory, and has a nearly identical API! To learn more, check out the [Victory Native package REAMDE](./packages/victory-native/README.md).
Victory Native shares most of its code with Victory, and has a nearly identical API! To learn more, check out the [Victory Native package README](./packages/victory-native/README.md).

## Contributing
Please see the [Contributing guide](CONTRIBUTING.md).
Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/common-props/common-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ scope:

Not every component uses all of these props. These are all common to things like `VictoryBar`, `VictoryScatter`, but other components like `VictoryStack` use only some of them.

The props explanations given here are general. Each component docs page should be considered as the the source of truth for a component's props, and any caveats will be listed there.
The props explanations given here are general. Each component docs page should be considered as the source of truth for a component's props, and any caveats will be listed there.

## animate

Expand Down Expand Up @@ -292,7 +292,7 @@ ReactDOM.render(<CustomStyledBarChart/>, mountNode);

`type: array[low, high] || { x: [low, high], y: [low, high] }`

The `domain` prop describes the range of data the component will include. This prop can be given as a array of the minimum and maximum expected values of the data or as an object that specifies separate arrays for x and y. If this prop is not provided, a domain will be calculated from data, or other available information.
The `domain` prop describes the range of data the component will include. This prop can be given as an array of the minimum and maximum expected values of the data or as an object that specifies separate arrays for x and y. If this prop is not provided, a domain will be calculated from data, or other available information.

_note:_ The `x` value supplied to the `domain` prop refers to the _independent_ variable, and the `y` value refers to the _dependent_ variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to the y axis.

Expand Down Expand Up @@ -350,7 +350,7 @@ Identifying properties include:

- `childName`: the name of the component the event should be attached to. When events are specified in `VictorySharedEvents` or on a component that renders several Victory components as children (_i.e._ `VictoryChart`, `VictoryGroup`, `VictoryStack`), it is necessary to specify which child events should apply to. The given `childName` should match the `name` prop of a child component. This identifier can be given as a string, an array of strings, or as "all".

- `target`: the type of element the event should be attached to. Valid targets for most Victory components will be `"parent"`, `"data"`, and `"labels"`. Events with the "parent" target will be attached to to the top level svg. Events with `"data"` and `"labels"` targets will be attached to `dataComponent` and `labelComponent` elements respectively. Some components, like `VictoryAxis` use non-standard targets like `"grid"`. Refer to individual API docs for additional caveats.
- `target`: the type of element the event should be attached to. Valid targets for most Victory components will be `"parent"`, `"data"`, and `"labels"`. Events with the "parent" target will be attached to the top level svg. Events with `"data"` and `"labels"` targets will be attached to `dataComponent` and `labelComponent` elements respectively. Some components, like `VictoryAxis` use non-standard targets like `"grid"`. Refer to individual API docs for additional caveats.

- `eventKey`: the specific element to be targeted. Events may be attached to specific elements by `eventKey`. By default, `eventKey` corresponds to the index in the `data` array (or `tickValues` array) corresponding to a rendered element. This value may be given as a single string or number, an array of strings or numbers, or as "all". It is not typically necessary to specify an individual `eventKey` for attaching events. When no `eventKey` is given, events will be attached to all elements that match a given `childName` and `target`. Some components like `VictoryArea` and `VictoryLine` render only a single element for an entire series of data. For these, the `eventKey` should be "all".

Expand Down Expand Up @@ -880,7 +880,7 @@ _default:_ `sortOrder="ascending"`

`type: boolean`

The `standalone` props specifies whether the component should be rendered in a independent `<svg>` element or in a `<g>` tag. This prop defaults to true, and renders an `svg`, however, wrapper components like `VictoryChart`, `VictoryStack`, and `VictoryGroup` force children to use `standalone={false}`.
The `standalone` props specifies whether the component should be rendered in an independent `<svg>` element or in a `<g>` tag. This prop defaults to true, and renders an `svg`, however, wrapper components like `VictoryChart`, `VictoryStack`, and `VictoryGroup` force children to use `standalone={false}`.

_default:_ `standalone={true}`

Expand Down Expand Up @@ -923,7 +923,7 @@ _note_ The `style` prop used by `VictoryAxis` has a different format than the st

_note_ When a component is rendered as a child of another Victory component, or within a custom `<svg>` element with `standalone={false}` parent styles will be applied to the enclosing `<g>` tag. Many styles that can be applied to a parent `<svg>` will not be expressed when applied to a `<g>`.

_note_ custom `angle` and `verticalAnchor` properties maybe included in labels styles.
_note_ custom `angle` and `verticalAnchor` properties may be included in labels styles.

_default (provided by default theme):_ See [grayscale theme][] for more detail

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ _default:_ `standalone={true}`

`VictoryArea` uses the standard `style` prop. [Read about it here](/docs/common-props#style)

*note:* Since `VictoryArea` renders a single element to represent an entire dataset, it is not possible to use functional styles to change the style of the line as a function of individual `datum`. Instead, try using [gradient fills](/docs/faq/#how-can-i-use-gradient-fills-in-victory) for styling continuous data.
*note:* Since `VictoryArea` renders a single element to represent an entire dataset, it is not possible to use functional styles to change the style of the line as a function of an individual `datum`. Instead, try using [gradient fills](/docs/faq/#how-can-i-use-gradient-fills-in-victory) for styling continuous data.

_default (provided by default theme):_ See [grayscale theme][] for more detail

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-axis.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ axisLabelComponent={<VictoryLabel dy={20}/>}

## axisValue

The `axisValue` prop may be used to position the dependent axis. Ths prop is useful when dependent axes should line up with values on the independent axis.
The `axisValue` prop may be used to position the dependent axis. This prop is useful when dependent axes should line up with values on the independent axis.

```playground
<VictoryChart>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-boxplot.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ data={[
```

- As an array of data objects with pre-calculated summary statistics(`min`, `median`, `max`, `q1`, `q3`)
When given in this format, `VictoryBoxPlot` _will not_ preform statistical analysis. Pre-calculating summary statistics for large datasets will improve performance.
When given in this format, `VictoryBoxPlot` _will not_ perform statistical analysis. Pre-calculating summary statistics for large datasets will improve performance.

```jsx
data={[
Expand Down
8 changes: 4 additions & 4 deletions docs/src/content/docs/victory-brush-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ _default:_ `brushComponent={<rect/>}`

`type: "x" || "y"`

When the `brushDimension` prop is set, brushing will only be specific to the to the given dimension
When the `brushDimension` prop is set, brushing will only be specific to the given dimension
(either "x" or "y"), and the entire domain of the other dimension will be highlighted. When this prop
is not specified, highlighting will occur along both dimensions.

Expand Down Expand Up @@ -206,23 +206,23 @@ _default:_ `handleWidth={8}`

`type: function`

The optional `onBrushCleared` prop accepts an function to be called when tha active brush area is cleared. The function accepts the parameters of `domain` (the updated domain), and `props` (the props used by `VictoryBrushContainer`).
The optional `onBrushCleared` prop accepts a function to be called when the active brush area is cleared. The function accepts the parameters of `domain` (the updated domain), and `props` (the props used by `VictoryBrushContainer`).

_example:_ `onBrushCleared={(domain, props) => handleBrushCleared(domain, props)}`

## onBrushDomainChange

`type: function`

The optional `onBrushDomainChange` prop accepts an function to be called on each update to the highlighted domain. The function accepts the parameters of `domain` (the updated domain), and `props` (the props used by `VictoryBrushContainer`).
The optional `onBrushDomainChange` prop accepts a function to be called on each update to the highlighted domain. The function accepts the parameters of `domain` (the updated domain), and `props` (the props used by `VictoryBrushContainer`).

_example:_ `onBrushDomainChange={(domain, props) => handleDomainChange(domain, props)}`

## onBrushDomainChangeEnd

`type: function`

The optional `onBrushDomainChangeEnd` prop accepts an function to be called only on mouse up events. The function accepts the parameters of `domain` (the updated domain), and `props` (the props used by `VictoryBrushContainer`).
The optional `onBrushDomainChangeEnd` prop accepts a function to be called only on mouse up events. The function accepts the parameters of `domain` (the updated domain), and `props` (the props used by `VictoryBrushContainer`).

_example:_ `onBrushDomainChangeEnd={(domain, props) => handleDomainChangeEnd(domain, props)}`

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-brush-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The `brushAreaWidth` prop is used to specify the width of the interactive brush

`type: element`

The `brushComponent` prop specifies the component to be rendered for active brush.
The `brushComponent` prop specifies the component to be rendered for the active brush.
This component will be supplied with the following props: x, y, width, height, and style.
When this prop is not specified, a [`Box`][] component will be rendered.

Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/docs/victory-candlestick.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,15 +543,15 @@ Use `open` data accessor prop to define the open value of a candle.

_examples:_ `open="opening_value"`

**function:** use a function to translate each element in a data array into a open value
**function:** use a function to translate each element in a data array into an open value

_examples:_ `open={() => 10}`

**array index:** specify which index of an array should be used as a open value when data is given as an array of arrays
**array index:** specify which index of an array should be used as an open value when data is given as an array of arrays

_examples:_ `open={1}`

**path string or path array:** specify which property in an array of nested data objects should be used as a open value
**path string or path array:** specify which property in an array of nested data objects should be used as an open value

_examples:_ `open="bonds.open"`, `open={["bonds", "open"]}`

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ animate={{

`type: element`

The `backgroundComponent` prop takes a component instance which will be responsible for rendering a background if the `VictoryChart`'s `style` component includes `background` styles. The new element created from the passed `backgroundComponent` will be provided with the following properties calculated by `VictoryChart`: `height`, `polar`, `scale`, `style`, `x`, `y`, `width`. All of these props on `Background` should take prececence over what `VictoryChart` is trying to set.
The `backgroundComponent` prop takes a component instance which will be responsible for rendering a background if the `VictoryChart`'s `style` component includes `background` styles. The new element created from the passed `backgroundComponent` will be provided with the following properties calculated by `VictoryChart`: `height`, `polar`, `scale`, `style`, `x`, `y`, `width`. All of these props on `Background` should take precedence over what `VictoryChart` is trying to set.

_default:_ `<Background/>`

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-clip-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ _default:_ `<g/>`

`type: { x: number, y: number }`

Victory components will pass an `origin` prop is to define the center point in svg coordinates for polar charts. **This prop should not be set manually.**
Victory components will pass an `origin` prop to define the center point in svg coordinates for polar charts. **This prop should not be set manually.**

## polar

Expand Down
8 changes: 4 additions & 4 deletions docs/src/content/docs/victory-errorbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ _examples:_ `errorX={() => 10}`

_examples:_ `errorX={1}`

**path string or path array:** specify which property in an array of nested data objects should be used as a errorX value
**path string or path array:** specify which property in an array of nested data objects should be used as an errorX value

_examples:_ `errorX="measurement.uncertainty"`, `errorX={["measurement", "uncertainty"]}`

Expand All @@ -161,15 +161,15 @@ Use `errorY` data accessor prop to define the y error bar.

_examples:_ `errorY="uncertainty"`

**function:** use a function to translate each element in a data array into a errorY value
**function:** use a function to translate each element in a data array into an errorY value

_examples:_ `errorY={() => 10}`

**array index:** specify which index of an array should be used as a errorY value when data is given as an array of arrays
**array index:** specify which index of an array should be used as an errorY value when data is given as an array of arrays

_examples:_ `errorY={1}`

**path string or path array:** specify which property in an array of nested data objects should be used as a errorY value
**path string or path array:** specify which property in an array of nested data objects should be used as an errorY value

_examples:_ `errorY="measurement.uncertainty"`, `errorY={["measurement", "uncertainty"]}`

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ name = "series-1";

`type: number`

The `offset` prop determines the number of pixels each element in a group should be offset from its original position of the on the independent axis. In the case of groups of bars, this number should be equal to the width of the bar plus the desired spacing between bars.
The `offset` prop determines the number of pixels each element in a group should be offset from its original position on the independent axis. In the case of groups of bars, this number should be equal to the width of the bar plus the desired spacing between bars.

```playground
<VictoryGroup
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-histogram.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ The `cornerRadius` prop specifies a radius to apply to each bar. If this prop is

`type: array[object]`

`VictoryHistogram` uses the standard `data` prop, except for it only expects each object within the array to have `x` properties. The `x` data accessor prop can be used to defined a custom data format. [Read about it here](/docs/common-props#data)
`VictoryHistogram` uses the standard `data` prop, except for it only expects each object within the array to have `x` properties. The `x` data accessor prop can be used to define a custom data format. [Read about it here](/docs/common-props#data)

Because each bar represents a bin rather than a particular data point (like with `VictoryScatter` for example), when accessing `datum` via a prop that passes `datum` such as `style`, datum will have properties `x`, `x0`, `x1`, `y`, and `binnedData`. `x` is the midpoint between the bin, `x0` is the beginning of the bin, `x1` is the end of the bin, `y` is the aggregate amount of data points within that bin, and `binnedData` is an array of the original data points that were grouped into this bin.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-label.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ _default:_ `false`

`type: "parallel" || "perpendicular" || "vertical"`

The `labelPlacement` prop is used to specify the placement of labels relative to the data point they represent. This prop may be given as "vertical", "parallel" or "perpendicular". This props is particularly useful in polar charts, where it may be desireable to position a label either parallel or perpendicular to its corresponding angle. When this prop is not set, perpendicular label placement will be used for polar charts, and vertical label placement will be used for cartesian charts.
The `labelPlacement` prop is used to specify the placement of labels relative to the data point they represent. This prop may be given as "vertical", "parallel" or "perpendicular". This props is particularly useful in polar charts, where it may be desirable to position a label either parallel or perpendicular to its corresponding angle. When this prop is not set, perpendicular label placement will be used for polar charts, and vertical label placement will be used for cartesian charts.

## lineHeight

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-legend.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ _default:_ `<VictoryLabel/>`

`type: "top" || "bottom" || "left" || "right"`

The `titleOrientation` prop specifies where the a title should be rendered in relation to the rest of the legend. Possible values for this prop are "top", "bottom", "left", and "right".
The `titleOrientation` prop specifies where the title should be rendered in relation to the rest of the legend. Possible values for this prop are "top", "bottom", "left", and "right".

_default (provided by default theme):_ `titleOrientation="top"`

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ _default:_ `standalone={true}`

`VictoryLine` uses the standard `style` prop. [Read about it here](/docs/common-props#style)

*note:* Since `VictoryLine` renders a single element to represent an entire dataset, it is not possible to use functional styles to change the style of the line as a function of individual `datum`. Instead, try using [gradient fills](/docs/faq/#how-can-i-use-gradient-fills-in-victory) for styling continuous data.
*note:* Since `VictoryLine` renders a single element to represent an entire dataset, it is not possible to use functional styles to change the style of the line as a function of an individual `datum`. Instead, try using [gradient fills](/docs/faq/#how-can-i-use-gradient-fills-in-victory) for styling continuous data.

_default (provided by default theme):_ See [grayscale theme][] for more detail

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-polar-axis.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ axisLabelComponent={<VictoryLabel dy={20}/>}

`type: number`

The `axisValue` prop may be used instead of `axisAngle` to position the dependent axis. Ths prop is useful when dependent axes should line up with values on the independent axis.
The `axisValue` prop may be used instead of `axisAngle` to position the dependent axis. This prop is useful when dependent axes should line up with values on the independent axis.

```playground
<VictoryChart polar
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/victory-primitives.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ _note_ `Box` also exported as `Border`
- `shapeRendering` _string_ the shape rendering attribute to apply to the rendered path
- `slice` _object_ an object specifying the startAngle, endAngle, padAngle, and data of the slice
- `sliceEndAngle` _number or function_ the end angle the slice. When this prop is given as a function it will be called with the rest of the props supplied to `Slice`.
- `sliceStartAngle` _number or function_ the start angle the slice. When this prop is given as a function it will be called with the rest of the props supplied to `Slice`.
- `sliceStartAngle` _number or function_ the start angle of the slice. When this prop is given as a function it will be called with the rest of the props supplied to `Slice`.
- `style` _object_ the styles to apply to the rendered element
- `tabIndex` _number or function_ number will be applied to the rendered path. When this prop is given as a function it will be called with the rest of the props supplied to `Slice`.
- `transform` _string_ a transform that will be supplied to elements this component renders
Expand Down
Loading

0 comments on commit 80d64f4

Please sign in to comment.