]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix typos found by codespell (#10103)
authorDimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Thu, 27 Jan 2022 14:24:55 +0000 (15:24 +0100)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 14:24:55 +0000 (09:24 -0500)
16 files changed:
docs/charts/doughnut.md
docs/charts/polar.md
docs/configuration/animations.md
docs/configuration/subtitle.md
docs/getting-started/v3-migration.md
docs/samples/information.md
src/helpers/helpers.config.js
src/helpers/helpers.extras.js
src/plugins/plugin.tooltip.js
test/specs/controller.line.tests.js
test/specs/core.animations.tests.js
test/specs/core.controller.tests.js
test/specs/helpers.interpolation.tests.js
test/specs/scale.time.tests.js
types/helpers/helpers.extras.d.ts
types/index.esm.d.ts

index d6a91912ffeb6443938aa841a10faa567af66c54..c1927b1db6ac2a42533fe72b83bdbb4e74ac5e96 100644 (file)
@@ -111,7 +111,7 @@ The doughnut/pie chart allows a number of properties to be specified for each da
 | [`circumference`](#general) | `number` | - | - | `undefined`
 | [`clip`](#general) | `number`\|`object` | - | - | `undefined`
 | [`data`](#data-structure) | `number[]` | - | - | **required**
-| [`hoverBackgroundColor`](#interations) | [`Color`](../general/colors.md) | Yes | Yes | `undefined`
+| [`hoverBackgroundColor`](#interactions) | [`Color`](../general/colors.md) | Yes | Yes | `undefined`
 | [`hoverBorderColor`](#interactions) | [`Color`](../general/colors.md) | Yes | Yes | `undefined`
 | [`hoverBorderJoinStyle`](#interactions) | `'round'`\|`'bevel'`\|`'miter'` | Yes | Yes | `undefined`
 | [`hoverBorderWidth`](#interactions) | `number` | Yes | Yes | `undefined`
index 9ec9bb27ea2ef46fafe3e807985e2e63e5cc63b8..6c27700a4d24b6fb13458a836605b0db7a015be3 100644 (file)
@@ -62,7 +62,7 @@ The following options can be included in a polar area chart dataset to configure
 | [`borderWidth`](#styling) | `number` | Yes | Yes | `2`
 | [`clip`](#general) | `number`\|`object` | - | - | `undefined`
 | [`data`](#data-structure) | `number[]` | - | - | **required**
-| [`hoverBackgroundColor`](#interations) | [`Color`](../general/colors.md) | Yes | Yes | `undefined`
+| [`hoverBackgroundColor`](#interactions) | [`Color`](../general/colors.md) | Yes | Yes | `undefined`
 | [`hoverBorderColor`](#interactions) | [`Color`](../general/colors.md) | Yes | Yes | `undefined`
 | [`hoverBorderJoinStyle`](#interactions) | `'round'`\|`'bevel'`\|`'miter'` | Yes | Yes | `undefined`
 | [`hoverBorderWidth`](#interactions) | `number` | Yes | Yes | `undefined`
index 21b5994bf16638b439d2e06dae4b47cf58a0e635..0aaf7798dce90c861850d1dee2adb40f334ec82e 100644 (file)
@@ -123,7 +123,7 @@ These keys can be configured in following paths:
 * `datasets[type]` - dataset type options
 * `overrides[type]` - chart type options
 
-These paths are valid under `defaults` for global confuguration and `options` for instance configuration.
+These paths are valid under `defaults` for global configuration and `options` for instance configuration.
 
 ## animation
 
@@ -183,7 +183,7 @@ Namespace: `options.transitions[mode]`
 | `'active'` | animation.duration | 400 | Override default duration to 400ms for hover animations
 | `'resize'` | animation.duration | 0 | Override default duration to 0ms (= no animation) for resize
 | `'show'` | animations.colors | `{ type: 'color', properties: ['borderColor', 'backgroundColor'], from: 'transparent' }` | Colors are faded in from transparent when dataset is shown using legend / [api](../developers/api.md#showdatasetIndex).
-| `'show'` | animations.visible | `{ type: 'boolean', duration: 0 }` | Dataset visiblity is immediately changed to true so the color transition from transparent is visible.
+| `'show'` | animations.visible | `{ type: 'boolean', duration: 0 }` | Dataset visibility is immediately changed to true so the color transition from transparent is visible.
 | `'hide'` | animations.colors | `{ type: 'color', properties: ['borderColor', 'backgroundColor'], to: 'transparent' }` | Colors are faded to transparent when dataset id hidden using legend / [api](../developers/api.md#hidedatasetIndex).
 | `'hide'` | animations.visible | `{ type: 'boolean', easing: 'easeInExpo' }` | Visibility is changed to false at a very late phase of animation
 
index e50f08f022cfe68c323fbccd3ec66faea2f75459..c3822af31ab0721e43dfd84dfb79070660129954 100644 (file)
@@ -6,7 +6,7 @@ Subtitle is a second title placed under the main title, by default. It has exact
 
 Namespace: `options.plugins.subtitle`. The global defaults for subtitle are configured in `Chart.defaults.plugins.subtitle`.
 
-Excactly the same configuration options with [title](./title.md) are available for subtitle, the namespaces only differ.
+Exactly the same configuration options with [title](./title.md) are available for subtitle, the namespaces only differ.
 
 ## Example Usage
 
index 7e4ba2ad0e0102b0cb70ab9cb41dd6eee4b0e766..129ee08c0e2b89bca606b97e7f749b6d594c2cc8 100644 (file)
@@ -75,7 +75,7 @@ A number of changes were made to the configuration options passed to the `Chart`
 * Polar area `startAngle` option is now consistent with `Radar`, 0 is at top and value is in degrees. Default is changed from `-½π` to  `0`.
 * Doughnut `rotation` option is now in degrees and 0 is at top. Default is changed from `-½π` to  `0`.
 * Doughnut `circumference` option is now in degrees. Default is changed from `2π` to `360`.
-* Doughnut `cutoutPercentage` was renamed to `cutout`and accepts pixels as numer and percent as string ending with `%`.
+* Doughnut `cutoutPercentage` was renamed to `cutout`and accepts pixels as number and percent as string ending with `%`.
 * `scale` option was removed in favor of `options.scales.r` (or any other scale id, with `axis: 'r'`)
 * `scales.[x/y]Axes` arrays were removed. Scales are now configured directly to `options.scales` object with the object key being the scale Id.
 * `scales.[x/y]Axes.barPercentage` was moved to dataset option `barPercentage`
index 4f1d676e0de3adb35286e4f2bb4f50522f044428..49634066fac65088b22b77d50160e8084d7555e1 100644 (file)
@@ -2,10 +2,10 @@
 
 ## Out of the box working samples
 These samples are made for demonstration purposes only. They won't work out of the box if you copy paste them into your own website. This is because of how the docs are getting built. Some boilerplate code gets hidden.
-For a sample that can be copyed and pasted and used directly you can check the [usage page](../getting-started/usage.md).
+For a sample that can be copied and pasted and used directly you can check the [usage page](../getting-started/usage.md).
 
 ## Autogenerated data
 The data used in the samples is autogenerated using custom functions. These functions do not ship with the library, for more information about this you can check the [utils page](./utils.md).
 
 ## Actions block
-The samples have an `actions` code block. These actions are not part of chart.js. They are internally transformed to seperate buttons together with onClick listeners by a plugin we use in the documentation. To implement such actions yourself you can make some buttons and add onClick event listeners to them. Then in these event listeners you can call your variable in which you made the chart and do the logic that the button is supposed to do.
+The samples have an `actions` code block. These actions are not part of chart.js. They are internally transformed to separate buttons together with onClick listeners by a plugin we use in the documentation. To implement such actions yourself you can make some buttons and add onClick event listeners to them. Then in these event listeners you can call your variable in which you made the chart and do the logic that the button is supposed to do.
index ef86bfaa5b738dcaa21b1f8af393c76580829532..e6b30b73226ebdf415fee4e470a3a044c23062c8 100644 (file)
@@ -203,7 +203,7 @@ function _resolveWithContext(target, prop, receiver) {
     value = _resolveArray(prop, value, target, descriptors.isIndexable);
   }
   if (needsSubResolver(prop, value)) {
-    // if the resolved value is an object, crate a sub resolver for it
+    // if the resolved value is an object, create a sub resolver for it
     value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);
   }
   return value;
index fd7608b9cc55d93a3745c886d3b4449a27ac26f7..2b73328f9ac453eb61fd6b5a751e44b792a7fb5f 100644 (file)
@@ -17,7 +17,7 @@ export const requestAnimFrame = (function() {
 
 /**
  * Throttles calling `fn` once per animation frame
- * Latest argments are used on the actual call
+ * Latest arguments are used on the actual call
  * @param {function} fn
  * @param {*} thisArg
  * @param {function} [updateFn]
index 76db6bef5fa01eafa390c2fc3eb52f2ce4fb6c37..7706a2980da5886528143d013e611c421d230919 100644 (file)
@@ -1013,7 +1013,7 @@ export class Tooltip extends Element {
         * Handle an event
         * @param {ChartEvent} e - The event to handle
         * @param {boolean} [replay] - This is a replayed event (from update)
-   * @param {boolean} [inChartArea] - The event is indide chartArea
+        * @param {boolean} [inChartArea] - The event is inside chartArea
         * @returns {boolean} true if the tooltip changed
         */
   handleEvent(e, replay, inChartArea = true) {
@@ -1054,11 +1054,11 @@ export class Tooltip extends Element {
   /**
         * Helper for determining the active elements for event
         * @param {ChartEvent} e - The event to handle
-   * @param {Element[]} lastActive - Previously active elements
+        * @param {Element[]} lastActive - Previously active elements
         * @param {boolean} [replay] - This is a replayed event (from update)
-   * @param {boolean} [inChartArea] - The event is indide chartArea
+        * @param {boolean} [inChartArea] - The event is inside chartArea
         * @returns {Element[]} - Active elements
-   * @private
+        * @private
         */
   _getActiveElements(e, lastActive, replay, inChartArea) {
     const options = this.options;
index 684b1919bb24edc5f7160bec8b0cb7dde290f0b0..222726fa30a653f05516649d52bde3faca5187b1 100644 (file)
@@ -603,7 +603,7 @@ describe('Chart.controllers.line', function() {
       expect(options.cubicInterpolationMode).toBe('monotone');
     });
 
-    it('should be overriden by user-supplied values', function() {
+    it('should be overridden by user-supplied values', function() {
       Chart.helpers.merge(Chart.defaults.datasets.line, {
         spanGaps: true,
         tension: 0.231
index 6b1d26fd1a75c996b0e75ccfe29c4924ae632449..6fddb20445fbeaa13e02d8f811bfa5b49df99541 100644 (file)
@@ -44,7 +44,7 @@ describe('Chart.animations', function() {
     })).toBeUndefined();
   });
 
-  it('should assing options directly, if target does not have previous options', function() {
+  it('should assign options directly, if target does not have previous options', function() {
     const chart = {};
     const anims = new Chart.Animations(chart, {option: {duration: 200}});
     const target = {};
index 6c4af91b7c829e4eef1b8bdcadf0ca8b9f2c9c1c..a4adae97094e54e23bcd7c2fe1b093de92edc674 100644 (file)
@@ -252,7 +252,7 @@ describe('Chart', function() {
         expect(chart.options.hover).toBeFalse();
       });
 
-      it('when options.interation=false and options.hover is not defined', function() {
+      it('when options.interaction=false and options.hover is not defined', function() {
         var chart = acquireChart({
           type: 'line',
           options: {
@@ -262,7 +262,7 @@ describe('Chart', function() {
         expect(chart.options.hover).toBeFalse();
       });
 
-      it('when options.interation=false and options.hover is defined', function() {
+      it('when options.interaction=false and options.hover is defined', function() {
         var chart = acquireChart({
           type: 'line',
           options: {
index 5d436deae32d5bf391bd2bd58e28957ca4c7ba58..55f728056905d6bb1c5cdd584f7db4941668fa46 100644 (file)
@@ -7,7 +7,7 @@ describe('helpers.interpolation', function() {
     expect(_pointInLine({x: 10, y: 10}, {x: 20, y: 20}, 1)).toEqual({x: 20, y: 20});
   });
 
-  it('Should intepolate a point in stepped line', function() {
+  it('Should interpolate a point in stepped line', function() {
     expect(_steppedInterpolation({x: 10, y: 10}, {x: 20, y: 20}, 0, 'before')).toEqual({x: 10, y: 10});
     expect(_steppedInterpolation({x: 10, y: 10}, {x: 20, y: 20}, 0.4, 'before')).toEqual({x: 14, y: 20});
     expect(_steppedInterpolation({x: 10, y: 10}, {x: 20, y: 20}, 0.5, 'before')).toEqual({x: 15, y: 20});
index 6e673157fc2728017c1c4a72327f24b33cc9b5b3..4daa7d750dbae9e7904aaa7900b4e49a7527b740 100644 (file)
@@ -286,7 +286,7 @@ describe('Time scale tests', function() {
     it('should have ticks with accurate labels', function() {
       var scale = this.scale;
       var ticks = scale.getTicks();
-      // pixelsPerTick is an aproximation which assumes same number of milliseconds per year (not true)
+      // pixelsPerTick is an approximation which assumes same number of milliseconds per year (not true)
       // we use a threshold of 1 day so that we still match these values
       var pixelsPerTick = scale.width / (ticks.length - 1);
 
index a6b6594bd0111fc93ce785405a26fadca98f550f..cb445c32793c51bf7c2f2c6eba5e0db8e8f9bac0 100644 (file)
@@ -7,7 +7,7 @@ export function requestAnimFrame(cb: () => void): void;
 
 /**
  * Throttles calling `fn` once per animation frame
- * Latest argments are used on the actual call
+ * Latest arguments are used on the actual call
  * @param {function} fn
  * @param {*} thisArg
  * @param {function} [updateFn]
index aa5821c497a5ce98c182f5f0185fbaae4d885e65..a42d4fe4b69d46f76437e7658f285e3dec506067 100644 (file)
@@ -927,7 +927,7 @@ export interface Plugin<TType extends ChartType = ChartType, O = AnyObject> exte
    */
   afterDataLimits?(chart: Chart, args: { scale: Scale }, options: O): void;
   /**
-   * @desc Called before scale bulds its ticks. This hook is called separately for each scale in the chart.
+   * @desc Called before scale builds its ticks. This hook is called separately for each scale in the chart.
    * @param {Chart} chart - The chart instance.
    * @param {object} args - The call arguments.
    * @param {Scale} args.scale - The scale.