Skip to content

Commit 0cbc292

Browse files
authored
Refined grammar and updated overall .md documentation files (#11324)
1 parent f0b8bea commit 0cbc292

27 files changed

+60
-60
lines changed

docs/axes/cartesian/linear.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Namespace: `options.scales[scaleId].ticks`
3838

3939
If set, the scale ticks will be enumerated by multiple of `stepSize`, having one tick per increment. If not set, the ticks are labeled automatically using the nice numbers algorithm.
4040

41-
This example sets up a chart with a y axis that creates ticks at `0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5`.
41+
This example sets up a chart with a y-axis that creates ticks at `0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5`.
4242

4343
```javascript
4444
let options = {

docs/axes/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ Axes are an integral part of a chart. They are used to determine how data maps t
44

55
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/).
66

7-
Scales in Chart.js >v2.0 are significantly more powerful, but also different than those of v1.0.
7+
Scales in Chart.js >v2.0 are significantly more powerful, but also different from those of v1.0.
88

99
* Multiple X & Y axes are supported.
10-
* A built-in label auto-skip feature detects would-be overlapping ticks and labels and removes every nth label to keep things displaying normally.
10+
* A built-in label auto-skip feature detects would-be overlapping ticks and labels and removes every nth label to keep things displayed normally.
1111
* Scale titles are supported.
1212
* New scale types can be extended without writing an entirely new chart type.
1313

1414
## Default scales
1515

16-
The default `scaleId`'s for carterian charts are `'x'` and `'y'`. For radial charts: `'r'`.
17-
Each dataset is mapped to a scale for each axis (x, y or r) it requires. The scaleId's that a dataset is mapped to, is determined by the `xAxisID`, `yAxisID` or `rAxisID`.
18-
If the ID for an axis is not specified, first scale for that axis is used. If no scale for an axis is found, a new scale is created.
16+
The default `scaleId`'s for cartesian charts are `'x'` and `'y'`. For radial charts: `'r'`.
17+
Each dataset is mapped to a scale for each axis (x, y or r) it requires. The scaleId's that a dataset is mapped to is determined by the `xAxisID`, `yAxisID` or `rAxisID`.
18+
If the ID for an axis is not specified, the first scale for that axis is used. If no scale for an axis is found, a new scale is created.
1919

2020
Some examples:
2121

@@ -94,15 +94,15 @@ let chart = new Chart(ctx, {
9494
## Common Configuration
9595

9696
:::tip Note
97-
These are only the common options supported by all axes. Please see specific axis documentation for all of the available options for that axis.
97+
These are only the common options supported by all axes. Please see specific axis documentation for all the available options for that axis.
9898
:::
9999

100100
!!!include(axes/_common.md)!!!
101101

102102
## Tick Configuration
103103

104104
:::tip Note
105-
These are only the common tick options supported by all axes. Please see specific axis documentation for all of the available tick options for that axis.
105+
These are only the common tick options supported by all axes. Please see specific axis documentation for all the available tick options for that axis.
106106
:::
107107

108108
!!!include(axes/_common_ticks.md)!!!
@@ -111,7 +111,7 @@ These are only the common tick options supported by all axes. Please see specifi
111111

112112
Given the number of axis range settings, it is important to understand how they all interact with each other.
113113

114-
The `suggestedMax` and `suggestedMin` settings only change the data values that are used to scale the axis. These are useful for extending the range of the axis while maintaining the auto fit behaviour.
114+
The `suggestedMax` and `suggestedMin` settings only change the data values that are used to scale the axis. These are useful for extending the range of the axis while maintaining the auto-fit behaviour.
115115

116116
```javascript
117117
let minDataValue = Math.min(mostNegativeValue, options.suggestedMin);
@@ -145,7 +145,7 @@ In contrast to the `suggested*` settings, the `min` and `max` settings set expli
145145

146146
## Stacking
147147

148-
By default data is not stacked. If the `stacked` option of the value scale (y-axis on horizontal chart) is `true`, positive and negative values are stacked separately. Additionally a `stack` option can be defined per dataset to further divide into stack groups [more...](../general/data-structures/#dataset-configuration).
148+
By default, data is not stacked. If the `stacked` option of the value scale (y-axis on horizontal chart) is `true`, positive and negative values are stacked separately. Additionally, a `stack` option can be defined per dataset to further divide into stack groups [more...](../general/data-structures/#dataset-configuration).
149149
For some charts, you might want to stack positive and negative values together. That can be achieved by specifying `stacked: 'single'`.
150150

151151
## Callbacks

docs/axes/radial/linear.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Namespace: `options.scales[scaleId]`
1818
| `pointLabels` | `object` | | Point label configuration. [more...](#point-label-options)
1919
| `startAngle` | `number` | `0` | Starting angle of the scale. In degrees, 0 is at top.
2020

21-
### Common options to all axes
21+
### Common options for all axes
2222

2323
Namespace: `options.scales[scaleId]`
2424

@@ -75,7 +75,7 @@ The scriptable context is described in [Options](../general/options.md#tick) sec
7575

7676
Given the number of axis range settings, it is important to understand how they all interact with each other.
7777

78-
The `suggestedMax` and `suggestedMin` settings only change the data values that are used to scale the axis. These are useful for extending the range of the axis while maintaining the auto fit behaviour.
78+
The `suggestedMax` and `suggestedMin` settings only change the data values that are used to scale the axis. These are useful for extending the range of the axis while maintaining the auto-fit behaviour.
7979

8080
```javascript
8181
let minDataValue = Math.min(mostNegativeValue, options.ticks.suggestedMin);

docs/charts/bar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Sample: |==================|
272272

273273
## Data Structure
274274

275-
All of the supported [data structures](../general/data-structures.md) can be used with bar charts.
275+
All the supported [data structures](../general/data-structures.md) can be used with bar charts.
276276

277277
## Stacked Bar Chart
278278

@@ -298,7 +298,7 @@ const stackedBar = new Chart(ctx, {
298298
## Horizontal Bar Chart
299299

300300
A horizontal bar chart is a variation on a vertical bar chart. It is sometimes used to show trend data, and the comparison of multiple data sets side by side.
301-
To achieve this you will have to set the `indexAxis` property in the options object to `'y'`.
301+
To achieve this, you will have to set the `indexAxis` property in the options object to `'y'`.
302302
The default for this property is `'x'` and thus will show vertical bars.
303303

304304
```js chart-editor

docs/charts/doughnut.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ We can also change these default values for each Doughnut type that is created,
201201

202202
## Data Structure
203203

204-
For a pie chart, datasets need to contain an array of data points. The data points should be a number, Chart.js will total all of the numbers and calculate the relative proportion of each.
204+
For a pie chart, datasets need to contain an array of data points. The data points should be a number, Chart.js will total all the numbers and calculate the relative proportion of each.
205205

206206
You also need to specify an array of labels so that tooltips appear correctly.
207207

docs/charts/line.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ If left untouched (`undefined`), the global `options.elements.line.cubicInterpol
163163

164164
### Segment
165165

166-
Line segment styles can be overridden by scriptable options in the `segment` object. Currently all of the `border*` and `backgroundColor` options are supported. The segment styles are resolved for each section of the line between each point. `undefined` fallbacks to main line styles.
166+
Line segment styles can be overridden by scriptable options in the `segment` object. Currently, all of the `border*` and `backgroundColor` options are supported. The segment styles are resolved for each section of the line between each point. `undefined` fallbacks to main line styles.
167167

168168
:::tip
169169
To be able to style gaps, you need the [`spanGaps`](#line-styling) option enabled.
@@ -204,7 +204,7 @@ Chart.overrides.line.spanGaps = true;
204204

205205
## Data Structure
206206

207-
All of the supported [data structures](../general/data-structures.md) can be used with line charts.
207+
All the supported [data structures](../general/data-structures.md) can be used with line charts.
208208

209209
## Stacked Area Chart
210210

@@ -227,7 +227,7 @@ const stackedLine = new Chart(ctx, {
227227
## Vertical Line Chart
228228

229229
A vertical line chart is a variation on the horizontal line chart.
230-
To achieve this you will have to set the `indexAxis` property in the options object to `'y'`.
230+
To achieve this, you will have to set the `indexAxis` property in the options object to `'y'`.
231231
The default for this property is `'x'` and thus will show horizontal lines.
232232

233233
```js chart-editor

docs/charts/scatter.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Scatter Chart
22

3-
Scatter charts are based on basic line charts with the x axis changed to a linear axis. To use a scatter chart, data must be passed as objects containing X and Y properties. The example below creates a scatter chart with 4 points.
3+
Scatter charts are based on basic line charts with the x-axis changed to a linear axis. To use a scatter chart, data must be passed as objects containing X and Y properties. The example below creates a scatter chart with 4 points.
44

55
```js chart-editor
66
// <block:setup:1>
@@ -56,10 +56,10 @@ Namespaces:
5656
* `options.elements.point` - options for all [point elements](../configuration/elements.md#point-configuration)
5757
* `options` - options for the whole chart
5858

59-
The scatter chart supports all of the same properties as the [line chart](./line.md#dataset-properties).
59+
The scatter chart supports all the same properties as the [line chart](./line.md#dataset-properties).
6060
By default, the scatter chart will override the showLine property of the line chart to `false`.
6161

62-
The index scale is of the type `linear`. This means if you are using the labels array the values have to be numbers or parsable to numbers, the same applies to the object format for the keys.
62+
The index scale is of the type `linear`. This means, if you are using the labels array, the values have to be numbers or parsable to numbers, the same applies to the object format for the keys.
6363

6464
## Data Structure
6565

docs/configuration/animations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,4 @@ const chart = new Chart(ctx, {
282282
});
283283
```
284284

285-
Another example usage of these callbacks can be found [in this progress bar sample.](../samples/advanced/progress-bar.md) which displays a progress bar showing how far along the animation is.
285+
Another example usage of these callbacks can be found [in this progress bar sample,](../samples/advanced/progress-bar.md) which displays a progress bar showing how far along the animation is.

docs/configuration/device-pixel-ratio.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Device Pixel Ratio
22

3-
By default the chart's canvas will use a 1:1 pixel ratio, unless the physical display has a higher pixel ratio (e.g. Retina displays).
3+
By default, the chart's canvas will use a 1:1 pixel ratio, unless the physical display has a higher pixel ratio (e.g. Retina displays).
44

5-
For applications where a chart will be converted to a bitmap, or printed to a higher DPI medium it can be desirable to render the chart at a higher resolution than the default.
5+
For applications where a chart will be converted to a bitmap, or printed to a higher DPI medium, it can be desirable to render the chart at a higher resolution than the default.
66

77
Setting `devicePixelRatio` to a value other than 1 will force the canvas size to be scaled by that amount, relative to the container size. There should be no visible difference on screen; the difference will only be visible when the image is zoomed or printed.
88

docs/configuration/elements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Elements
22

3-
While chart types provide settings to configure the styling of each dataset, you sometimes want to style **all datasets the same way**. A common example would be to stroke all of the bars in a bar chart with the same colour but change the fill per dataset. Options can be configured for four different types of elements: **[arc](#arc-configuration)**, **[lines](#line-configuration)**, **[points](#point-configuration)**, and **[bars](#bar-configuration)**. When set, these options apply to all objects of that type unless specifically overridden by the configuration attached to a dataset.
3+
While chart types provide settings to configure the styling of each dataset, you sometimes want to style **all datasets the same way**. A common example would be to stroke all the bars in a bar chart with the same colour but change the fill per dataset. Options can be configured for four different types of elements: **[arc](#arc-configuration)**, **[lines](#line-configuration)**, **[points](#point-configuration)**, and **[bars](#bar-configuration)**. When set, these options apply to all objects of that type unless specifically overridden by the configuration attached to a dataset.
44

55
## Global Configuration
66

7-
The element options can be specified per chart or globally. The global options for elements are defined in `Chart.defaults.elements`. For example, to set the border width of all bar charts globally you would do:
7+
The element options can be specified per chart or globally. The global options for elements are defined in `Chart.defaults.elements`. For example, to set the border width of all bar charts globally, you would do:
88

99
```javascript
1010
Chart.defaults.elements.bar.borderWidth = 2;

0 commit comments

Comments
 (0)