You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
40
40
41
-
This example sets up a chart with a yaxis 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`.
Copy file name to clipboardExpand all lines: docs/axes/index.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,18 @@ Axes are an integral part of a chart. They are used to determine how data maps t
4
4
5
5
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/).
6
6
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.
8
8
9
9
* 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.
11
11
* Scale titles are supported.
12
12
* New scale types can be extended without writing an entirely new chart type.
13
13
14
14
## Default scales
15
15
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.
19
19
20
20
Some examples:
21
21
@@ -94,15 +94,15 @@ let chart = new Chart(ctx, {
94
94
## Common Configuration
95
95
96
96
:::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.
98
98
:::
99
99
100
100
!!!include(axes/_common.md)!!!
101
101
102
102
## Tick Configuration
103
103
104
104
:::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.
106
106
:::
107
107
108
108
!!!include(axes/_common_ticks.md)!!!
@@ -111,7 +111,7 @@ These are only the common tick options supported by all axes. Please see specifi
111
111
112
112
Given the number of axis range settings, it is important to understand how they all interact with each other.
113
113
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 autofit 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.
115
115
116
116
```javascript
117
117
let minDataValue =Math.min(mostNegativeValue, options.suggestedMin);
@@ -145,7 +145,7 @@ In contrast to the `suggested*` settings, the `min` and `max` settings set expli
145
145
146
146
## Stacking
147
147
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).
149
149
For some charts, you might want to stack positive and negative values together. That can be achieved by specifying `stacked: 'single'`.
| `pointLabels` | `object` | | Point label configuration. [more...](#point-label-options)
19
19
| `startAngle` | `number` | `0` | Starting angle of the scale. In degrees, 0 is at top.
20
20
21
-
### Common options to all axes
21
+
### Common options for all axes
22
22
23
23
Namespace: `options.scales[scaleId]`
24
24
@@ -75,7 +75,7 @@ The scriptable context is described in [Options](../general/options.md#tick) sec
75
75
76
76
Given the number of axis range settings, it is important to understand how they all interact with each other.
77
77
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 autofit 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.
79
79
80
80
```javascript
81
81
let minDataValue =Math.min(mostNegativeValue, options.ticks.suggestedMin);
Copy file name to clipboardExpand all lines: docs/charts/bar.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,7 +272,7 @@ Sample: |==================|
272
272
273
273
## Data Structure
274
274
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.
276
276
277
277
## Stacked Bar Chart
278
278
@@ -298,7 +298,7 @@ const stackedBar = new Chart(ctx, {
298
298
## Horizontal Bar Chart
299
299
300
300
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'`.
302
302
The default for this property is `'x'` and thus will show vertical bars.
Copy file name to clipboardExpand all lines: docs/charts/doughnut.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ We can also change these default values for each Doughnut type that is created,
201
201
202
202
## Data Structure
203
203
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.
205
205
206
206
You also need to specify an array of labels so that tooltips appear correctly.
Copy file name to clipboardExpand all lines: docs/charts/line.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,7 @@ If left untouched (`undefined`), the global `options.elements.line.cubicInterpol
163
163
164
164
### Segment
165
165
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.
167
167
168
168
:::tip
169
169
To be able to style gaps, you need the [`spanGaps`](#line-styling) option enabled.
Copy file name to clipboardExpand all lines: docs/charts/scatter.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Scatter Chart
2
2
3
-
Scatter charts are based on basic line charts with the xaxis 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.
4
4
5
5
```js chart-editor
6
6
// <block:setup:1>
@@ -56,10 +56,10 @@ Namespaces:
56
56
*`options.elements.point` - options for all [point elements](../configuration/elements.md#point-configuration)
57
57
*`options` - options for the whole chart
58
58
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).
60
60
By default, the scatter chart will override the showLine property of the line chart to `false`.
61
61
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.
Copy file name to clipboardExpand all lines: docs/configuration/animations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -282,4 +282,4 @@ const chart = new Chart(ctx, {
282
282
});
283
283
```
284
284
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.
Copy file name to clipboardExpand all lines: docs/configuration/device-pixel-ratio.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Device Pixel Ratio
2
2
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).
4
4
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.
6
6
7
7
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.
Copy file name to clipboardExpand all lines: docs/configuration/elements.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Elements
2
2
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.
4
4
5
5
## Global Configuration
6
6
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:
0 commit comments