Skip to content

Commit 531d4c0

Browse files
docs: Grammar fixes for cartesian and radial docs (chartjs#7875)
1 parent fcc20bf commit 531d4c0

File tree

17 files changed

+45
-45
lines changed

17 files changed

+45
-45
lines changed

docs/docs/axes/cartesian/category.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: Category Axis
33
---
44

5-
If global configuration is used, labels are drawn from one of the label arrays included in the chart data. If only `data.labels` is defined, this will be used. If `data.xLabels` is defined and the axis is horizontal, this will be used. Similarly, if `data.yLabels` is defined and the axis is vertical, this property will be used. Using both `xLabels` and `yLabels` together can create a chart that uses strings for both the X and Y axes.
5+
If the global configuration is used, labels are drawn from one of the label arrays included in the chart data. If only `data.labels` is defined, this will be used. If `data.xLabels` is defined and the axis is horizontal, this will be used. Similarly, if `data.yLabels` is defined and the axis is vertical, this property will be used. Using both `xLabels` and `yLabels` together can create a chart that uses strings for both the X and Y axes.
66

7-
Specifying any of the settings above defines the x axis as `type: 'category'` if not defined otherwise. For more fine-grained control of category labels it is also possible to add `labels` as part of the category axis definition. Doing so does not apply the global defaults.
7+
Specifying any of the settings above defines the x-axis as `type: 'category'` if not defined otherwise. For more fine-grained control of category labels, it is also possible to add `labels` as part of the category axis definition. Doing so does not apply the global defaults.
88

99
## Category Axis Definition
1010

docs/docs/axes/cartesian/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ All of the included cartesian axes support a number of common options. These opt
2020
| `type` | `string` | | Type of scale being employed. Custom scales can be created and registered with a string key. This allows changing the type of an axis for a chart.
2121
| `position` | `string` | | Position of the axis. [more...](#axis-position)
2222
| `axis` | `string` | | Which type of axis this is. Possible values are: `'x'`, `'y'`. If not set, this is inferred from the first character of the ID which should be `'x'` or `'y'`.
23-
| `min` | `number` | | User defined minimum value for the scale, overrides minimum value from data.
24-
| `max` | `number` | | User defined maximum value for the scale, overrides maximum value from data.
23+
| `min` | `number` | | User-defined minimum value for the scale, overrides minimum value from data.
24+
| `max` | `number` | | User-defined maximum value for the scale, overrides maximum value from data.
2525
| `offset` | `boolean` | `false` | If true, extra space is added to the both edges and the axis is scaled to fit into the chart area. This is set to `true` for a bar chart by default.
2626
| `gridLines` | `object` | | Grid line configuration. [more...](../styling.md#grid-line-configuration)
2727
| `scaleLabel` | `object` | | Scale title configuration. [more...](../labelling.md#scale-title-configuration)
@@ -54,7 +54,7 @@ The following options are common to all cartesian axes but do not apply to other
5454
| `sampleSize` | `number` | `ticks.length` | The number of ticks to examine when deciding how many labels will fit. Setting a smaller value will be faster, but may be less accurate when there is large variability in label length.
5555
| `autoSkip` | `boolean` | `true` | If true, automatically calculates how many labels can be shown and hides labels accordingly. Labels will be rotated up to `maxRotation` before skipping any. Turn `autoSkip` off to show all labels no matter what.
5656
| `autoSkipPadding` | `number` | `0` | Padding between the ticks on the horizontal axis when `autoSkip` is enabled.
57-
| `labelOffset` | `number` | `0` | Distance in pixels to offset the label from the centre point of the tick (in the x direction for the x axis, and the y direction for the y axis). *Note: this can cause labels at the edges to be cropped by the edge of the canvas*
57+
| `labelOffset` | `number` | `0` | Distance in pixels to offset the label from the centre point of the tick (in the x-direction for the x-axis, and the y-direction for the y-axis). *Note: this can cause labels at the edges to be cropped by the edge of the canvas*
5858
| `maxRotation` | `number` | `50` | Maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. *Note: Only applicable to horizontal scales.*
5959
| `minRotation` | `number` | `0` | Minimum rotation for tick labels. *Note: Only applicable to horizontal scales.*
6060
| `mirror` | `boolean` | `false` | Flips tick labels around axis, displaying the labels inside the chart instead of outside. *Note: Only applicable to vertical scales.*

docs/docs/axes/cartesian/linear.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Linear Axis
33
---
44

5-
The linear scale is use to chart numerical data. It can be placed on either the x or y axis. The scatter chart type automatically configures a line chart to use one of these scales for the x axis. As the name suggests, linear interpolation is used to determine where a value lies on the axis.
5+
The linear scale is used to chart numerical data. It can be placed on either the x or y-axis. The scatter chart type automatically configures a line chart to use one of these scales for the x-axis. As the name suggests, linear interpolation is used to determine where a value lies on the axis.
66

77
## Configuration Options
88

@@ -16,14 +16,14 @@ These options extend the [common configuration for all cartesian axes](index.md#
1616

1717
## Tick Configuration Options
1818

19-
The following tick options are provided by the linear scale. They are all located in the `ticks` sub options. These options extend the [common tick configuration](index.md#tick-configuration).
19+
The following tick options are provided by the linear scale. They are all located in the `ticks` sub-options. These options extend the [common tick configuration](index.md#tick-configuration).
2020

2121
| Name | Type | Default | Description
2222
| ---- | ---- | ------- | -----------
2323
| `format` | `object` | | The [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) options used by the default label formatter
2424
| `maxTicksLimit` | `number` | `11` | Maximum number of ticks and gridlines to show.
2525
| `precision` | `number` | | if defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
26-
| `stepSize` | `number` | | User defined fixed step size for the scale. [more...](#step-size)
26+
| `stepSize` | `number` | | User-defined fixed step size for the scale. [more...](#step-size)
2727

2828
## Axis Range Settings
2929

@@ -83,4 +83,4 @@ let options = {
8383

8484
## Internal data format
8585

86-
Internally, linear scale uses numeric data
86+
Internally, the linear scale uses numeric data

docs/docs/axes/cartesian/logarithmic.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
title: Logarithmic Axis
33
---
44

5-
The logarithmic scale is use to chart numerical data. It can be placed on either the x or y axis. As the name suggests, logarithmic interpolation is used to determine where a value lies on the axis.
5+
The logarithmic scale is used to chart numerical data. It can be placed on either the x or y-axis. As the name suggests, logarithmic interpolation is used to determine where a value lies on the axis.
66

77
## Tick Configuration Options
88

9-
The following options are provided by the logarithmic scale. They are all located in the `ticks` sub options. These options extend the [common tick configuration](index.md#tick-configuration).
9+
The following options are provided by the logarithmic scale. They are all located in the `ticks` sub-options. These options extend the [common tick configuration](index.md#tick-configuration).
1010

1111
| Name | Type | Default | Description
1212
| ---- | ---- | ------- | -----------
1313
| `format` | `object` | | The [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) options used by the default label formatter
1414

1515
## Internal data format
1616

17-
Internally logarithmic scale uses numeric data
17+
Internally, the logarithmic scale uses numeric data.

docs/docs/axes/cartesian/time.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The time scale is used to display times and dates. Data are spread according to
66

77
## Date Adapters
88

9-
The time scale **requires** both a date library and corresponding adapter to be present. Please choose from the [available adapters](https://github.com/chartjs/awesome#adapters).
9+
The time scale **requires** both a date library and a corresponding adapter to be present. Please choose from the [available adapters](https://github.com/chartjs/awesome#adapters).
1010

1111
## Data Sets
1212

@@ -16,7 +16,7 @@ See [data structures](../../general/data-structures.md).
1616

1717
### Date Formats
1818

19-
When providing data for the time scale, Chart.js uses timestamps defined as milliseconds since the epoch (midnight January 1, 1970 UTC) internally. However, Chart.js also supports all of the formats that your chosen date adapter accepts. You should use timestamps if you'd like to set `parsing: false` for better performance.
19+
When providing data for the time scale, Chart.js uses timestamps defined as milliseconds since the epoch (midnight January 1, 1970, UTC) internally. However, Chart.js also supports all of the formats that your chosen date adapter accepts. You should use timestamps if you'd like to set `parsing: false` for better performance.
2020

2121
## Configuration Options
2222

@@ -125,7 +125,7 @@ The `ticks.source` property controls the ticks generation.
125125

126126
If this property is defined as a string, it is interpreted as a custom format to be used by the date adapter to parse the date.
127127

128-
If this is a function, it must return a type which can be handled by your date adapter's `parse` method.
128+
If this is a function, it must return a type that can be handled by your date adapter's `parse` method.
129129

130130
### Internal data format
131131

docs/docs/axes/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Axes
33
---
44

5-
Axes are an integral part of a chart. They are used to determine how data maps to a pixel value on the chart. In a cartesian chart, there is 1 or more X axis and 1 or more Y axis to map points onto the 2 dimensional canvas. These axes are known as ['cartesian axes'](./cartesian/index.md#cartesian-axes).
5+
Axes are an integral part of a chart. They are used to determine how data maps to a pixel value on the chart. In a cartesian chart, there is 1 or more X-axis and 1 or more Y-axis to map points onto the 2-dimensional canvas. These axes are known as ['cartesian axes'](./cartesian/index.md#cartesian-axes).
66

77
In a radial chart, such as a radar chart or a polar area chart, there is a single axis that maps points in the angular and radial directions. These are known as ['radial axes'](./radial/index.md#radial-axes).
88

docs/docs/axes/labelling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The scale label configuration is nested under the scale configuration in the `sc
1919
## Creating Custom Tick Formats
2020

2121
It is also common to want to change the tick marks to include information about the data type. For example, adding a dollar sign ('$'). To do this, you need to override the `ticks.callback` method in the axis configuration.
22-
In the following example, every label of the Y axis would be displayed with a dollar sign at the front.
22+
In the following example, every label of the Y-axis would be displayed with a dollar sign at the front.
2323

2424
If the callback returns `null` or `undefined` the associated grid line will be hidden.
2525

docs/docs/axes/radial/linear.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: Linear Radial Axis
33
---
44

5-
The linear radial scale is used to chart numerical data. As the name suggests, linear interpolation is used to determine where a value lies in relation the center of the axis.
5+
The linear radial scale is used to chart numerical data. As the name suggests, linear interpolation is used to determine where a value lies in relation to the center of the axis.
66

77
The following additional configuration options are provided by the radial linear scale.
88

99
## Configuration Options
1010

11-
The axis has configuration properties for ticks, angle lines (line that appear in a radar chart outward from the center), pointLabels (labels around the edge in a radar chart). The following sections define each of the properties in those sections.
11+
The axis has configuration properties for ticks, angle lines (lines that appear in a radar chart outward from the center), pointLabels (labels around the edge in a radar chart). The following sections define each of the properties in those sections.
1212

1313
| Name | Type | Default | Description
1414
| ---- | ---- | ------- | -----------
@@ -24,7 +24,7 @@ The axis has configuration properties for ticks, angle lines (line that appear i
2424

2525
## Tick Options
2626

27-
The following options are provided by the linear radial scale. They are all located in the `ticks` sub options. The [common tick configuration](../styling.md#tick-configuration) options are supported by this axis.
27+
The following options are provided by the linear radial scale. They are all located in the `ticks` sub-options. The [common tick configuration](../styling.md#tick-configuration) options are supported by this axis.
2828

2929
| Name | Type | Scriptable | Default | Description
3030
| ---- | ---- | ------- | ------- | -----------
@@ -139,4 +139,4 @@ The scriptable context is the same as for the [Angle Line Options](#angle-line-o
139139

140140
## Internal data format
141141

142-
Internally linear radial scale uses numeric data
142+
Internally, the linear radial scale uses numeric data

docs/docs/axes/styling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ The grid line configuration is nested under the scale configuration in the `grid
1414
| `borderColor` | [`Color`](../general/colors.md) | | | | If set, used as the color of the border line. If unset, the first `color` option is resolved and used.
1515
| `borderWidth` | `number` | | | | If set, used as the width of the border line. If unset, the first `lineWidth` option is resolved and used.
1616
| `circular` | `boolean` | | | `false` | If true, gridlines are circular (on radar chart only).
17-
| `color` | [`Color`](../general/colors.md) | Yes | Yes | `'rgba(0, 0, 0, 0.1)'` | The color of the grid lines. If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on.
17+
| `color` | [`Color`](../general/colors.md) | Yes | Yes | `'rgba(0, 0, 0, 0.1)'` | The color of the grid lines. If specified as an array, the first color applies to the first grid line, the second to the second grid line, and so on.
1818
| `borderDash` | `number[]` | | | `[]` | Length and spacing of dashes on grid lines. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash).
1919
| `borderDashOffset` | `number` | Yes | | `0.0` | Offset for line dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset).
2020
| `lineWidth` | `number` | Yes | Yes | `1` | Stroke width of grid lines.
21-
| `drawBorder` | `boolean` | | | `true` | If true, draw border at the edge between the axis and the chart area.
21+
| `drawBorder` | `boolean` | | | `true` | If true, draw a border at the edge between the axis and the chart area.
2222
| `drawOnChartArea` | `boolean` | | | `true` | If true, draw lines on the chart area inside the axis lines. This is useful when there are multiple axes and you need to control which grid lines are drawn.
2323
| `drawTicks` | `boolean` | | | `true` | If true, draw lines beside the ticks in the axis area beside the chart.
2424
| `tickMarkLength` | `number` | | | `10` | Length in pixels that the grid lines will draw into the axis area.

docs/docs/charts/area.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Area Chart
33
---
44

5-
Both [line](line.md) and [radar](radar.md) charts support a `fill` option on the dataset object which can be used to create area between two datasets or a dataset and a boundary, i.e. the scale `origin`, `start` or `end` (see [filling modes](#filling-modes)).
5+
Both [line](line.md) and [radar](radar.md) charts support a `fill` option on the dataset object which can be used to create space between two datasets or a dataset and a boundary, i.e. the scale `origin`, `start,` or `end` (see [filling modes](#filling-modes)).
66

77
> **Note:** this feature is implemented by the [`filler` plugin](https://github.com/chartjs/Chart.js/blob/master/src/plugins/plugin.filler.js).
88

docs/docs/charts/bar.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ the color of the bars is generally set this way.
100100
| `clip` | How to clip relative to chartArea. Positive value allows overflow, negative value clips that many pixels inside chartArea. `0` = clip at chartArea. Clipping can also be configured per side: `clip: {left: 5, top: false, right: -2, bottom: 0}`
101101
| `indexAxis` | The base axis of the dataset. `'x'` for vertical bars and `'y'` for horizontal bars.
102102
| `label` | The label for the dataset which appears in the legend and tooltips.
103-
| `order` | The drawing order of dataset. Also affects order for stacking, tooltip and legend.
104-
| `xAxisID` | The ID of the x axis to plot this dataset on.
105-
| `yAxisID` | The ID of the y axis to plot this dataset on.
103+
| `order` | The drawing order of dataset. Also affects order for stacking, tooltip, and legend.
104+
| `xAxisID` | The ID of the x-axis to plot this dataset on.
105+
| `yAxisID` | The ID of the y-axis to plot this dataset on.
106106

107107
### Styling
108108

@@ -124,7 +124,7 @@ This setting is used to avoid drawing the bar stroke at the base of the fill.
124124
In general, this does not need to be changed except when creating chart types
125125
that derive from a bar chart.
126126

127-
**Note:** for negative bars in vertical chart, `top` and `bottom` are flipped. Same goes for `left` and `right` in horizontal chart.
127+
**Note:** for negative bars in a vertical chart, `top` and `bottom` are flipped. Same goes for `left` and `right` in a horizontal chart.
128128

129129
Options are:
130130

@@ -138,7 +138,7 @@ Options are:
138138

139139
#### borderWidth
140140

141-
If this value is a number, it is applied to all sides of the rectangle (left, top, right, bottom), except [`borderSkipped`](#borderskipped). If this value is an object, the `left` property defines the left border width. Similarly the `right`, `top` and `bottom` properties can also be specified. Omitted borders and [`borderSkipped`](#borderskipped) are skipped.
141+
If this value is a number, it is applied to all sides of the rectangle (left, top, right, bottom), except [`borderSkipped`](#borderskipped). If this value is an object, the `left` property defines the left border width. Similarly, the `right`, `top`, and `bottom` properties can also be specified. Omitted borders and [`borderSkipped`](#borderskipped) are skipped.
142142

143143
### Interactions
144144

@@ -200,7 +200,7 @@ The bar chart sets unique default values for the following configuration from th
200200

201201
| Name | Type | Default | Description
202202
| ---- | ---- | ------- | -----------
203-
| `offset` | `boolean` | `true` | If true, extra space is added to the both edges and the axis is scaled to fit into the chart area.
203+
| `offset` | `boolean` | `true` | If true, extra space is added to both edges and the axis is scaled to fit into the chart area.
204204
| `gridLines.offsetGridLines` | `boolean` | `true` | If true, the bars for a particular data point fall between the grid lines. The grid line will move to the left by one half of the tick interval. If false, the grid line will go right down the middle of the bars. [more...](#offsetgridlines)
205205

206206
### Example Usage
@@ -343,8 +343,8 @@ var myBarChart = new Chart(ctx, {
343343

344344
### Config Options
345345

346-
The configuration options for the horizontal bar chart are the same as for the [bar chart](#scale-configuration). However, any options specified on the x axis in a bar chart, are applied to the y axis in a horizontal bar chart.
346+
The configuration options for the horizontal bar chart are the same as for the [bar chart](#scale-configuration). However, any options specified on the x-axis in a bar chart, are applied to the y-axis in a horizontal bar chart.
347347

348348
## Internal data format
349349

350-
`{x, y, _custom}` where `_custom` is optional object defining stacked bar properties: `{start, end, barStart, barEnd, min, max}`. `start` and `end` are the input values. Those two are repeated in `barStart` (closer to origin), `barEnd` (further from origin), `min` and `max`.
350+
`{x, y, _custom}` where `_custom` is an optional object defining stacked bar properties: `{start, end, barStart, barEnd, min, max}`. `start` and `end` are the input values. Those two are repeated in `barStart` (closer to origin), `barEnd` (further from origin), `min` and `max`.

0 commit comments

Comments
 (0)